Get current max Leverage

The max leverage I am referring to, is the actively updated amount see image.

In this case the exact leverage ratio is not exactly x20 as selected its more like 19x
during extreme volatility this can even be x15
Which usually leads to “margin insufficient error”, when you send an order assuming a x20 when its actually x15

From the offical docs I can only get the leverage brackets with static values like x20 for upto 25,000 and not the dynamic leverage

is there a WebSocket implementation or REST API for getting the current dynamic max leverage ratio
or a formula for getting the dynamic ratio

Seems the solution is a bit of complex math found here

Cost Required to Open a Position in Perpetual Futures Contracts

1 Like