sammchardy / python-binance

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

Configuring margin settings for futures_create_order #894

Open peacefulbadger opened 3 years ago

peacefulbadger commented 3 years ago

Every order I place with futures_create_order, the order is automatically set to 20x by default which is too risky for my tastes. Neither the wrapper nor raw binance API documentation mention anything about configuring margin for futures orders. Is it possible to manually configure the margin for each order?

Aarron-shaw commented 2 years ago

To configure leverage use

client.futures_change_leverage(symbol=coin, leverage=lev)