sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.96k stars 2.19k forks source link

How to create a future order at a specified price ? #1223

Open bmw7 opened 2 years ago

bmw7 commented 2 years ago

For example, the current price of ETH is 2000 usdt. And now, I want to create a SHORT future order at a specified price of 1500 usdt by the function " client.futures_create_order() " . So, when the price falls to 1500 usdt, the order will be triggered. How to do it? thanks!

halfelf commented 2 years ago

https://www.binance.com/en/support/faq/c-4?navId=4#18-62

https://binance-docs.github.io/apidocs/futures/en/#new-order-trade

Only when closing position can one set such order to be triggered. To open position, one needs to track orderbook or latest price from websocket API manually.