Clarify ExecutionReport format in case of stop-loss orders

Hey there!

My question is about the “Margin User Data Streams”

Let’s say I am listening to my cross-margin user data stream /sapi/v1/margin/listen-key. If I earlier sent a stop-loss limit order (i.e. orderType=STOP_LOSS_LIMIT), and that my stop price is reached, what will the format of the execution report be?

In particular, I am interested in those keys

  • “c” clientOrderId
  • “C” originalClientOrderId
  • “o” orderType
  • “x” currentExecutionType
  • “x” currentOrderStatus

In particular, is there any way to link it to my initial order that was filled ?

Thanks for your help!
Best,
sbarde

Would you just get an order update using the same clientOrderId?

So in the end you would get 2 updates with the same clientOrderId? One when you get your first fill, and the second when your stop loss is hit?

Referring to the execution types documented on https://binance-docs.github.io/apidocs/spot/en/#payload-order-update, when your stop price is reached, there won’t be an “executionReport” event. This is because the stop price has only triggered your order, but there’s no execution yet.

You could try the behavior with https://testnet.binance.vision/. The sapi endpoints are not supported there, but I think “Margin” follows the same logic as “Spot” when concerning a Stop Loss Limit type of orders . Refer to: Binance API Documentation