Closed raul-gherman closed 2 months ago
@amusleh-spotware-com could you please provide some feedback on this one? nobody else at Spotware seems to say anything...
Hi @raul-gherman, We don't use this repository for providing support as stated on readme file. Please use cTrader.com Open API forum and I'm sure somebody from Spotware will answer your question. Or you can also use Open API telegram group to get quick support.
hi @amusleh-spotware-com , I did, almost 2 months now... and yea, no answer, that is why I placed it here, wrongfully so... https://ctrader.com/forum/connect-api-support/43725 https://ctrader.com/forum/connect-api-support/44069
I referred those threads to our support.
ProtoOaOrderErrorEvent should populate orderId and / or positionId when emitted (most likely not an API issue, but rather implementation).
examples, also mentioned here:
ProtoOaOrderErrorEvent { payload_type: None, ctid_trader_account_id: 000redacted000, error_code: "POSITION_NOT_FOUND", order_id: Some( 0, ), position_id: Some( 0, ), description: Some( "Position not found with id 2416447", ), }
ProtoOaOrderErrorEvent { payload_type: None, ctid_trader_account_id: 000redacted000, error_code: "TRADING_BAD_STOPS", order_id: Some( 0, ), position_id: Some( 0, ), description: Some( "New TP for BUY position should be >= current BID price. current BID: 0.66466, TP: 0.66464", ), }
(example how orderId gets properly populated for OrderNotFound):
ProtoOaOrderErrorEvent { payload_type: None, ctid_trader_account_id: 000redacted000, error_code: "ORDER_NOT_FOUND", order_id: Some( 4747037, ), position_id: None, description: Some( "Order not found with id 4747037", ), }