Bitmex allows users to do leveraged trading on all asset by the use of Margin
Margin is essentially the collateral amount you need to put that cover your losses. If you are on 10x leverage then you only need to put in ~10% of the trading amount. As a consequence, if the loss on the trade exceeds the collateral amount the entire amount is lost. This is known as liquidation.
For Bitmex to be able to manage these liquidations they can only allow asset level collateral and as a result, asset level leverage. Hence whenever you set a leverage amount, it gets set at the asset/contract level and not at a trade level.
Mudrex provides users the ability to change the leverage amount directly while going live on a contract on Bitmex.
Because of the limitation set by Bitmex, any change that we do to the leverage amount gets applied to the asset as soon as a user sets the leverage. This leverage amount will be set for all positions taken on that asset either from Mudrex or any other platform.
Similarly, if the user changes the leverage amount from Bitmex or any other platform we automatically use that new leverage value while placing an order.
Because leverage is at an asset level and not at a trade level, the user can also change the leverage amount once a strategy has started and keep on changing it any number of time.
Note: Trading with leverage is risky and can lead to large unintended losses. Use leverage carefully and only if you know what you are doing.