Partial Fill or Partial Close

Created at 04 Jan 2022, 22:05
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!
BU

budda_dan2020

Joined 10.09.2020

Partial Fill or Partial Close
04 Jan 2022, 22:05


Hi,

Usually I request order with clientOrderId, so after the order is placed, I can identify the order with clientOrderId and get OrderId and PositionId.

If the order is partially filled, e.g. in two positions, is OrderId same in both positions? and PositionId too?

Will I get the two filled positions in ProtoOAExecutionEvent?

If the position is partially closed e.g. in two deals, is PositionId same in both deals? and OrderId too?

Kind regards


@budda_dan2020
Replies

amusleh
05 Jan 2022, 08:09

Hi,

If an order partially filled by multiple positions then the order/position ID will be same on subsequent ExecutionEvent calls.

Yes, you will get two ProtoOAExecutionEvent calls for each fill.

Yes, again the order/position ID will be same but it will have two different deal IDs.

 


@amusleh

budda_dan2020
05 Jan 2022, 12:28

Diffenence of multiple positions

Hi Amusleh,

if an order partially filled by multiple positions, and the positions have same order ID and position IDs, what are difference of these positions? How can I differentiate them? Are there any other IDs which differ from each other?

 


@budda_dan2020

amusleh
06 Jan 2022, 08:51

RE: Diffenence of multiple positions

budda_dan2020 said:

Hi Amusleh,

if an order partially filled by multiple positions, and the positions have same order ID and position IDs, what are difference of these positions? How can I differentiate them? Are there any other IDs which differ from each other?

 

Hi,

Each order is linked to a single position, it doesn't matter by how many deals it gets filled.

You can use the filled volume in ExecutionEvent or deals to differentiate between them, an order can be filled by one or more deals but it will always have one position ID.


@amusleh