Stop Loss Order are not filled

Hey!

I’m setting OCO sell orders via the API. I face a common issue where my stop losses are skipped straight passed, even though the trigger is <=.

If you take a look at the attached screenshot, I end up stuck with these random unfilled stop losses that subsequently cause my app to lock.

I’ve scanned my code many times and tried with different order types, but the stop loss never seems to conform to the <= trigger.

It seems strange to me that I am the only one posting this. Does anyone have any ideas what could be causing this?

Thanks in advanced!

can you describe how to set OCO order?
I can’t send OCO orders by Binance-Python. can you help me?
thanks.

Hi, please specify your OCO request parameters and the mark price (moment you say orders should already be filled).

Hey @aisling thanks for your reply.

Querying the OCO order from the screenshot I provided gives this output :slight_smile:

{
  orderListId: *SANITZED*,
  contingencyType: 'OCO',
  listStatusType: 'EXEC_STARTED',
  listOrderStatus: 'EXECUTING',
  listClientOrderId: *SANITZED*,
  transactionTime: 1623765664625,
  symbol: 'ETHBUSD',
  orders: [
{
  symbol: 'ETHBUSD',
  orderId: *SANITZED*,
  clientOrderId: *SANITZED*
},
{
  symbol: 'ETHBUSD',
  orderId: *SANITZED*,
  clientOrderId: *SANITZED*
}
  ]
} 

In terms of the OCO order itself, it follows standard query params defined in the docs

'symbol=ETHBUSD&side=SELL&stopLimitTimeInForce=GTC&limitClientOrderId=*SANITIZED*&stopClientOrderId=*SANITIZED*&stopLimitPrice= 2586.85&listClientOrderId=*SANITIZED*&quantity= 0.00580&price= 2588.40&stopPrice=2586.85&timestamp=XXX'

Unless I’m missing something, I don’t expect this to be a client side code issue. A good amount of stoplosses execute perfectly, this seems to be when the markets are moving a little slower.

To me it seems like the OCO stop loss is not actually using the <=, but is instead executing a standard limit order, therefore it wont fill.

What are your thoughts?

Could this be a SPOT API bug?

Had this back from Binance, suspicions confirmed that the <= really means nothing.

When the price(Mark. Price or Last Price, according to your choice when you create the order) reaches your Stop Price, a Limit order is placed in the system - This Limit order works exactly like a normal Limit order.

A limit order does not guarantee that it will be executed. We kindly ask you to understand that for an order to be executed, an opposite order must be available in the order book. The system executes first the orders with the higher/lower prices, and in case of same price, it will first execute the oldest orders placed.

Note that even if the price on the chart has touched its Stop price, this does not ensure that your order will be executed, because as explained in the lines above, it is necessary that there are compatible orders in the book to execute your order.

One possible strategy to prevent Stop orders from not being executed is to place a limit price that is easier to execute - A Limit price that is lower, more distant from your Stop-Price. Thus, their order would have a higher priority to be executed by the system. Take into consideration that usually, the Stop-Limit order will be executed in the range between your Stop-Price and your Limit Price, so, creating an order with a larger range will easy the execution of the order.

We hope that this information will help you to better draw your trade strategy and that now your situation is better clarified.

Frustrating to hear this but will have to work around it.

1 Like