bybit-exchange / pybit

Official Python3 API connector for Bybit's HTTP and WebSockets APIs.
Other
385 stars 129 forks source link

Get leverage of open orders #243

Closed pet93 closed 3 weeks ago

pet93 commented 1 month ago

Hi,

how can I retrieve the leverage applied to market open orders of perpetual contracts?

dextertd commented 3 weeks ago

On Bybit leverage is not considered at the order-level. It's at the position-level. You set leverage for a position and it applies to that open position and any open orders you may have at that time. You can use this endpoint to get the position's leverage https://bybit-exchange.github.io/docs/v5/position