“Why is my leverage showing 6.3x when I have set the account limit at 5x?”
The Max Leverage is set at the account level. This is the maximum amount of leverage an account can take when entering new trades. If an account is at its Max Leverage then no new trades will be accepted. At this point the Initial Margin requirement will be the same as the Margin Assets Value in the account and the Available Margin will be zero.
The positions will be liquidated when the Margin Assets Value hits the Maintenance Margin Limit. This is 50% of the Initial Margin required for positions. Leverage is defined as Notional Position Value / Margin Assets Value. Margin Assets Value includes unrealised P&L. So if a position were to lose money, then Margin Assets Value declines and due to leverage it will decline faster than the Notional Position Value, increasing the leverage. Because the Margin Maintenance Value is set at 50% of the Initial Margin, the effective leverage is actually double the Max Leverage at the point of liquidation.
For example, if an account has set the maximum leverage at 5x and has a Margin Assets Value of 1,000 GUSD then the account can trade up to 5,000 GUSD notional of perpetuals. If the account buys 5,000 GUSD notional of perpetuals, then at this point the account leverage is 5x. However, should the market decline by 5% then the unrealised P&L on this position will be -250 GUSD, reducing the Margin Assets Value to 750 GUSD. The notional will also have declined to 4,750 GUSD. As leverage is equal to Notional Position Value / Margin Assets Value, the leverage has increased to 6.3x (4,750 GUSD/750 GUSD).