Browser leverage overriding API leverage

I’ve just noticed that leverage set by futures_change_leverage is invalidated if you have the browser open on the pair you are trying to set leverage for.

Example:

  1. I have my browser open on Binance Futures USDT for ETHUSDT. The leverage is currently set to 20x.

  2. My script instantiates a binance python client (using the python-binance package) and sets leverage=1 for ETHUSDT. It then checks the leverage for each position side of the pair by calling futures_position_information - the returned value is ‘leverage’: ‘1’, which is correct so I proceed to open a trade using futures_create_order.

  3. However the trade is opened at 20x, not 1x as was set with the API.

  4. If I refresh the browser, the leverage is only then switches to 1x and any future API trades are opened at 1x.

Is this is bug - should the API leverage update not take precedence?

Flagging this as a warning for other users.
Thanks

Hello,

If the UI was initially 20x and then user use the API to set the leverage to 1x, the after newly opened position will have 1x into consideration (you can use the position’s initial margin to confirm), even if UI is showing 20x because the page hasn’t being refreshed yet.

With this being said, I think there’s no need to worry about the processing, the only part that might not be so friendly, it’s not having the leverage section automatically updated in the UI, a page refresh is needed. I’ll send the feedback internally, Thanks for sharing!

Here the position you saw in UI is actually at 1x. As @aisling said, we have room to tuning the display, but the position is placed at the real leverage level as you set.