PayloadType is not being transmitted to executionevent result

Created at 05 May 2023, 18:22
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!
HR

hroymiller

Joined 19.04.2023

PayloadType is not being transmitted to executionevent result
05 May 2023, 18:22


Hi there,

I am able to send commands to open and close postiions. However, when the execution event triggers the payload type does not tell me if the even was to open or to close! 

I get the same code: 2126 which I understand to be a general protoexecutionevent code.

 

case ProtoOAExecutionType.OrderFilled:

     if( executionEvent.PayloadType == ProtoOAPayloadType.ProtoOaNewOrderReq)
    {


    }
    break;


executionEvent.PayloadType always is 2126 which says   PROTO_OA_EXECUTION_EVENT    2126
                             It should be PROTO_OA_NEW_ORDER_REQ    2106 or PROTO_OA_CLOSE_POSITION_REQ    2111

 

Am I missing something?

Thank you!


@hroymiller
Replies

PanagiotisChar
08 May 2023, 08:19

Hi there,

Check ProtoOAExecutionEvent.ProtoOADeal.closePositionDetail. It includes data only if the position was closed.

Aieden Technologies

Need help? Join us on Telegram

Need premium support? Trade with us

 


@PanagiotisChar