python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

Futures

Open eduardomaas82 opened this issue 3 years ago • 3 comments

It is not listing open trades in futures.

client.futures_get_open_orders()

eduardomaas82 avatar Mar 24 '22 14:03 eduardomaas82

That endpoint will only list open orders, not trades.

To view your open positions you need to use the following and filter by symbol:

client.futures_position_information()

mhawry avatar Mar 26 '22 13:03 mhawry

To cancel the order, I could not. what procedure to search ID and cancel the order?

eduardomaas82 avatar Mar 28 '22 12:03 eduardomaas82

You can view your open orders with the following:

client.futures_get_open_orders()

You can also filter by symbol:

client.futures_get_open_orders(symbol='BTCUSDT')

These will return the orderId which you can then use to cancel the order. Both the symbol and orderId parameters are required (replace orderId with the value that was returned by the previous endpoint):

client.futures_cancel_order(symbol='BTCUSDT', orderId=orderId)

mhawry avatar Apr 09 '22 13:04 mhawry