Take profit or stop loss expires without closing main position

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

Please, what could be the possible cause(s) of this behavior?

An order may be expired for different reasons. What time in force are you using?

I used as below:

GTC - for LIMIT and MARKET orders

If you are trying to replicate the Take Profit / Stop Loss OCO feature on futures, I suggest having a look at this thread.

The Futures API does not inherently support OCO orders, they must be handled by the client instead.