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
GTE_GTC - for TAKE_PROFIT_MARKET and STOP_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.
I don’t use developer tools to dynamically insert the parameters into the call to the api with python. I only used it as a reference to see what the parameters should be when making a trade that included a TP/SL.
If you look at my first post, you will see the parameters I used for each call. Creating a trade that includes a TP/SL cannot be done with one call to the api - as we have already established. It needs three calls, right?
So, I used developer to see how Binance were doing it. I then c…
The Futures API does not inherently support OCO orders, they must be handled by the client instead.