ProtoOaOrderErrorEvent POSITION_NOT_FOUND | ORDER_NOT_FOUND
ProtoOaOrderErrorEvent POSITION_NOT_FOUND | ORDER_NOT_FOUND
13 May 2024, 16:53
Isn't the position_id field supposed to be populated if POSITION_NOT_FOUND error_code is returned by ProtoOaOrderErrorEvent?
Should this be covered by API (I think it is, right?), or it depends, it is something that broker can control?
(ProtoOaVersion 90)
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",
),
}
if error_code is ORDER_NOT_FOUND, order_id field seems to be properly populated:
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",
),
}
Thank you!