I open an order with futures_create_order like that : client.futures_create_order(symbol='BNBUSDT', type='MARKET', side='BUY', quantity=0.03, recudeOnly=False or True)
In a moment I want to close this order, but I dont have the information of quantity BUY so I tested that : client.futures_create_order(symbol='BNBUSDT', type='STOP_MARKET', side='BUY', stopPrice=price_close, closePosition='true')
Take note that the exchange’s prices moves quickly, so it’s possible that when you got bidPrice and placed new order with stopPrice=bidPrice, the latest orderbook’s bidPrice is already lower, so you will be buying at higher price than the askPrice, which leads to your “Order would immediately trigger.”.
Thank for your anwser it’s possible to see all open order in futures ?
I test client.futures_account_trades(symbol=‘BNBUSDT’, limit=1) but I dont have an anwser to see if it’s a close order or an open order.