Read nested/added positions

Created at 26 Apr 2024, 20:24
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!
SW

swapd0

Joined 07.10.2019

Read nested/added positions
26 Apr 2024, 20:24


How can I read a nested position with openAPI? 

 

With nested positions I mean when you open a position and later you add to that positions, after that I read two positions in my application but in cTrader I got just one position.

 

Is this handled by cTrader and not exposed into OpenAPI?

 

Thanks.


@swapd0
Replies

PanagiotisCharalampous
27 Apr 2024, 08:07

Hi there,

I did not understand what you mean with the below

after that I read two positions in my application but in cTrader I got just one position.

Can you please provide examples?

Best regards,

Panagiotis


@PanagiotisCharalampous

swapd0
27 Apr 2024, 13:34

Maybe on Monday I can capture some screen shots when the market is open.

I mean that, if I buy one lot of XAGUSD at 27.000$ and later when the silver is at 27.100$ I double the position. In cTrader web I got one position on XAGUSD with two lots at 27.050$

 

But if I send a ProtoOAReconcileReq message I receive two positions, one at 27.000$ with one lot and another one at 27.100$ with one lot. 


@swapd0

PanagiotisCharalampous
28 Apr 2024, 14:52

RE: Read nested/added positions

swapd0 said: 

Maybe on Monday I can capture some screen shots when the market is open.

I mean that, if I buy one lot of XAGUSD at 27.000$ and later when the silver is at 27.100$ I double the position. In cTrader web I got one position on XAGUSD with two lots at 27.050$

 

But if I send a ProtoOAReconcileReq message I receive two positions, one at 27.000$ with one lot and another one at 27.100$ with one lot. 

Hi swapd0,

If you are looking to modify a position, then you should add the position id in your ProtoOANewOrderReq message

Best regards,

Panagiotis


@PanagiotisCharalampous