Working with OrderMassStatusRequest

Created at 22 Dec 2017, 17:39
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
obaum1@gmail.com's avatar

obaum1@gmail.com

Joined 06.06.2017

Working with OrderMassStatusRequest
22 Dec 2017, 17:39


Hey Guys :)

 

When I call to OrderMassStatusRequest I don't get all of my open positions.
What I'm doing wrong?
I basically toke the example from the Roles Of Engagement.
*I do wait for the read buffer

 

Thanks!!


@obaum1@gmail.com
Replies

obaum1@gmail.com
25 Dec 2017, 00:56

Hey Again :)

Maybe the question should be, which request should I make to get all my open positions include the ClOrdID parameter, 
or how to get Execution Report (MsgType(35)=8) to each of my open positions?

I don't if I used OrderMassStatusRequest, but it OrderMassStatusRequest didn't return what I needed


Thanks!!


@obaum1@gmail.com

#EOL
27 Dec 2017, 14:34

With OrderMassStatusRequest you can receive only those orders that yet to be executed: LIMIT and STOP with OrdStatus NEW (39=0)

Meanwhile, a single opened position could be result of executing thousands orders and with current Spotware FIX implementation there is no way to receive any of them, unles you know each one's ClOrdID.

Could you please clarify what you want to do, maybe there is an easier workaround


@#EOL

obaum1@gmail.com
12 Jan 2018, 01:10

Hey #EOL

Thanks for repaying :)

I want to sync the robot db with the actual open positions.

**I would like to get all active positions with there ClOrdID if it possible.

 

I know its indicated on a bigger problem if the db and the broker positions are not sync, but it do happens once in awhile and would like to try to track down the bug.

So for now I wouldI like to be able to re-sync the db with the broker open positions.

 

For example:

- now I have a bug:

- The Settings:  400 active positions in the db, 401 active position in the broker

---

How can I found the missing one?

Thanks!!


@obaum1@gmail.com

#EOL
12 Jan 2018, 15:11

you can use Request For Positions (MsgType(35)=AN) (section 5.4.9 in the spec)


@#EOL