SPOT an OPEN order didnt excecute after the price cross it.

Hi guy!
I am testing a bot and a new strategy but is not the first time that the price pass over an opne order and do not excecuted it.

Let me share the resume:

  • bougth at 21184.29 (18:09:15 UTC)

  • after the price go up the algorithm puted an STOPLIMITORDER in 21222.4(18:30:58 UTC).

  • After some minutes the price went down passing by the price order but the order didtn excecute.

After wait for som minutes and study what happened, at 21106.72(18:58:38UTC) I canceled the order and sell manually.
I am using time force GTC.

Note: This is not the first time that happen this, I am writing code to do this for las two year and happen 5 time may by, but should not happend NEVER!

I am in Mexico, to let you check I am using UTC.

can you share the order details, should include:

  • symbol
  • side
  • type
  • price
  • timeInForce
  • created time
  • update time
  • status

Thanks

Hi, I was so busy to answer but NOW happend again:

The order “Stop Loss” is open, because was’t filled !!! the price is down …

Let me share the API return with all informatio about …

Thanks

Buy order => 13:00:00 UTC

{‘symbol’: ‘BTCUSDT’, ‘orderId’: 11257514141, ‘orderListId’: -1, ‘clientOrderId’: ‘SPOT_BOT_BUY_BTCUSDT5m’, ‘transactTime’: 1656334820436, ‘price’: ‘0.00000000’, ‘origQty’: ‘0.00051000’, ‘executedQty’: ‘0.00051000’, ‘cummulativeQuoteQty’: ‘10.82687160’, ‘status’: ‘FILLED’, ‘timeInForce’: ‘GTC’, ‘type’: ‘MARKET’, ‘side’: ‘BUY’, ‘fills’: [{‘price’: ‘21229.16000000’, ‘qty’: ‘0.00051000’, ‘commission’: ‘0.00003414’, ‘commissionAsset’: ‘BNB’, ‘tradeId’: 1426665679}], ‘url’: ‘https://api.binance.com/api/v3/order’}

Stop loss => Immediately

{‘symbol’: ‘BTCUSDT’, ‘orderId’: 11257514180, ‘orderListId’: -1, ‘clientOrderId’: ‘SPOT_BOT_SL_BTCUSDT5m’, ‘price’: ‘21161.97000000’, ‘origQty’: ‘0.00051000’, ‘executedQty’: ‘0.00000000’, ‘cummulativeQuoteQty’: ‘0.00000000’, ‘status’: ‘NEW’, ‘timeInForce’: ‘GTC’, ‘type’: ‘STOP_LOSS_LIMIT’, ‘side’: ‘SELL’, ‘stopPrice’: ‘21161.97000000’, ‘icebergQty’: ‘0.00000000’, ‘time’: 1656334820820, ‘updateTime’: 1656334820820, ‘isWorking’: False, ‘origQuoteOrderQty’: ‘0.00000000’, ‘url’: ‘https://api.binance.com/api/v3/order’}

The order is OPEN or status=NEW
{‘symbol’: ‘BTCUSDT’, ‘orderId’: 11257514180, ‘orderListId’: -1, ‘clientOrderId’: ‘SPOT_BOT_SL_BTCUSDT5m’, ‘price’: ‘21161.97000000’, ‘origQty’: ‘0.00051000’, ‘executedQty’: ‘0.00000000’, ‘cummulativeQuoteQty’: ‘0.00000000’, ‘status’: ‘NEW’, ‘timeInForce’: ‘GTC’, ‘type’: ‘STOP_LOSS_LIMIT’, ‘side’: ‘SELL’, ‘stopPrice’: ‘21161.97000000’, ‘icebergQty’: ‘0.00000000’, ‘time’: 1656334820820, ‘updateTime’: 1656336780310, ‘isWorking’: True, ‘origQuoteOrderQty’: ‘0.00000000’, ‘url’: ‘https://api.binance.com/api/v3/order’}

The stopPrice and price value are too close together, in fact, for your case, it is similar. The reason is because if the price is crashing very quickly, the price has already dropped pass your limit order’s sell price and thus your limit order will not be matched. Try to have the stopPrice at a higher value instead of setting it at your target sell price.

1 Like