Hi Everyone, am having some weird scenarios, through API I place LIMIT or MARKET order with STOP_MARKET and TAKE_PROFIT_MARKET for futures trading, every thing works well most times but randomly STOP_MARKET or TAKE_PROFIT_MARKET order expires without closing the main order. WhatsApp Image 2022-03-28 at 11.45.53 PM|281x500
I have experienced the same issue recently. The answers so far seem to be focused on explaining that the Futures API does not support OCO linking of market orders and associated TP/SL orders. I am clear on what you were saying with your question. My code handles any straggling TP/SL orders when I close a position but with GTE_GTC, I have found that the Binance system seems to close them automatically despite statements that it doesn’t support OCO via the API.
However, your issue is identical to mine. My position remains open (my algo hasn’t triggered a close of position) and my SL GTE_GTC order expires or is cancelled and it doesn’t show up on my websocket monitor. Too many days have passed for me to look the old orders up but I know they were placed as “New” with GTE_GTC as I log from my client websocket monitor to a database. I also have a periodic (hourly) refresh to pull open positions and orders to a dashboard and I spotted my SL order gone with my position still open.
I take onboard tantialex’s comment “An order may be expired for different reasons” but I am at a loss to understand what would have caused the order to expire while the position remains open. This was a liquidation protection stoploss order and having SL orders just go expired is a real worry.