Asset-Level Metrics
| Cross-Exchange Margin Mode | Per-Exchange Margin Mode | |
|---|---|---|
| Asset Balance | Actual spot quantity | Same as left |
| Available Balance | = Asset Balance - Spot Frozen Amount - ∑ Initial Margin for Isolated Contract Orders - ∑ Isolated Contract Margin; where Spot Frozen Amount is the amount frozen by spot orders | Same as left |
| Asset Unrealized P&L | = ∑(Unrealized P&L of Cross Margin Contract Positions + Unrealized P&L of Margin Positions) | Same as left |
| Liabilities | = ABS( Min( Available Balance + Cross Margin Unrealized P&L, 0)) | Same as left |
| Asset Equity | = Asset Balance + Cross Margin Unrealized P&L - ∑ Initial Margin for Isolated Contract Orders - ∑ Isolated Contract Margin; 0 for non-margin assets | Same as left |
| Asset Contract Initial Margin | = ∑(Initial Margin for Cross Margin Contracts in Each Settlement Asset + Initial Margin for Cross Margin Contract Orders) | Same as left |
| Asset Contract Maintenance Margin | = ∑(Maintenance Margin for Cross Margin Contracts in Each Settlement Asset) | Same as left |
| Asset Borrowing Initial Margin | = ∑(Initial Margin of Each Margin Position + Initial Margin of Margin Trading Orders) + Liabilities / Asset Leverage | =Liabilities / Asset Leverage |
| Asset Borrowing Maintenance Margin | = ∑(Maintenance Margin of Each Margin Position) + Liabilities × Borrowing Maintenance Margin Rate | =Liabilities × Borrowing Maintenance Margin Rate |
Account-Level Metrics
| Cross-Exchange Margin Mode | Per-Exchange Margin Mode | |
|---|---|---|
| Function Description | A unified margin pool is shared across different exchanges. Position P&L across exchanges can offset each other at the account level, while risk is calculated independently for the cross-exchange account. | Each exchange uses independent margin. Position P&L and risk are calculated independently by exchange, allowing risks from a single exchange to be isolated. |
| Margin | BTC, ETH, SOL, XRP, BNB, USDT, USDC, and USD serve as shared margin assets. After being converted according to the applicable discount rate, they are included in the unified margin pool and can be used to open positions on other exchanges. For example, converted BTC in a Gate wallet can be used to open a Hyperliquid perpetual position. Discount rates can be queried through GET /crossex/coin_discount_rate. | BTC, ETH, SOL, XRP, BNB, USDT, USDC, and USD can be selected as margin for the relevant exchange as needed. Actual support is subject to each exchange; margin can only be used on the corresponding exchange and is not shared across exchanges. |
| Products | Spot, USDT-Margined Contracts, Cross Margin | Spot, USDT-Margined Contracts |
| Total Margin Balance | = ∑(Positive Equity of Margin Assets × Index Price × Tiered Discount Rate) + ∑(Negative Equity of Margin Assets × Index Price) - Spot Order Loss | Same as left |
| Total Initial Margin | = ∑(Total Initial Margin of the Asset × Asset USDT-Quoted Index Price + Total Borrowing Initial Margin of the Asset × Asset USDT-Quoted Index Price) | Same as left |
| Total Maintenance Margin | = ∑(Total Maintenance Margin of the Asset × Asset USDT-Quoted Index Price) | Same as left |
| Total Initial Margin Rate | = Total Margin Balance / Total Initial Margin, used to determine whether orders are automatically canceled | Same as left |
| Total Maintenance Margin Rate | = Total Margin Balance / Total Maintenance Margin, used to determine whether liquidation is triggered | Same as left |
| Total Available Account Margin | = Total Margin Balance - Account Initial Margin; the remaining available margin balance after deducting occupied initial margin | Same as left |
Comparison of Cross Margin and Isolated Margin Modes
| Cross Margin | Isolated Margin | |
|---|---|---|
| Margin | Cross margin positions in the current cross-exchange account share the account's available margin | Margin is allocated separately to each position and is not shared with other positions in the current cross-exchange account |
| Risk Scope | Losses from a single position consume the available margin of the cross-exchange account and affect other cross margin positions in the account | Losses from a single position are generally limited to the margin allocated to that position and do not use the margin of other positions |
| P&L Offsetting | Unrealized P&L from cross margin positions in the current cross-exchange account is combined into account equity and jointly affects the overall account margin rate | P&L for each position is calculated independently and is not shared with or offset against other positions |
| Liquidation Assessment | Whether liquidation is triggered is determined based on the overall margin rate of the current cross-exchange account | Liquidation is triggered when isolated margin + unrealized P&L ≤ position maintenance margin |
| Liquidation Impact | When liquidation is triggered, one or more cross margin positions in the current cross-exchange account may be reduced or liquidated | When liquidation is triggered, only the relevant position is processed, without affecting other positions |
Cross-Exchange Account Liquidation Risk Control Process
1. Automatic Order Cancellation
When the total initial margin rate < 100%, the system automatically cancels open orders to reduce the initial margin occupied by these orders. Orders are canceled sequentially: spot orders are canceled first, followed by contract orders. The rules are as follows:
- Cancel spot buy orders in descending order of order value
- Cancel margin orders in descending order of occupied initial margin
- When canceling contract orders, opening orders without positions are canceled first. If none exist, position-increasing orders with positions are then canceled in descending order of occupied initial margin
For sequential order cancellation, after each order is canceled, the system checks whether the initial margin rate is ≥ 100%. If so, the cancellation process stops.
When the account's total initial margin rate < 100%, the account's available margin balance is negative. You cannot increase positions and can only place closing orders, because closing orders do not occupy initial margin.
2. Forced Liquidation
For cross margin liquidation, when the total maintenance margin rate ≤ 100%, the system initiates the forced liquidation process. If MMR > 100%, the liquidation process stops. The liquidation process is as follows:
- Cancel all open orders in parallel
- For margin positions, begin closing positions. The priority order is: long positions first, then short positions, followed by liquidity ranking. A liquidation fee is charged.
- For hedge-mode positions, directly hedge the smaller position at the mark price. A liquidation fee is charged.
- For each contract position, begin risk limit tier reduction. Based on liquidity ranking, reduce the risk limit tier to the level at which MMR becomes safe, then send all position-reduction orders to the exchange until MMR is safe or all positions reach Tier 1. A liquidation fee is charged.
- After all contract positions have been reduced to the first risk tier, liquidation-based position reductions may still continue to reduce user losses. When MMR > 100%, liquidation-based position reductions stop. Alternatively, the system may directly take over positions and settle them for users at the bankruptcy price, without charging a liquidation fee. After the internal system takeover account receives the positions, it immediately sells them at market price. If there is a profit, the positive USDT balance is transferred to the internal insurance fund. If there is a deficit, the internal insurance fund covers the negative USDT balance.
For isolated margin liquidation, when isolated margin + unrealized P&L ≤ position maintenance margin, the system initiates the forced liquidation process. A liquidation fee is charged after execution.
- If position value > 100,000, 20% of the position is closed each time until the position is fully closed or isolated margin + unrealized P&L > position maintenance margin, at which point forced liquidation stops
- If position value ≤ 100,000, 100% of the position is closed at once
3. Bankruptcy Price Calculation Rules
Long position: Bankruptcy Price = Mark Price at the Time of Liquidation × (1 - Maintenance Margin Rate of the Position's Risk Limit Tier)
Short position: Bankruptcy Price = Mark Price at the Time of Liquidation × (1 + Maintenance Margin Rate of the Position's Risk Limit Tier)
Margin Requirements for Margin Trading
1. Long Positions
Maintenance Margin for a Margin Position = Position Value × Maintenance Margin Rate of the Position Tier - Quick Calculation Amount + Estimated Fee for Fully Closing the Position
Initial Margin for a Margin Position = Position Value / Leverage + Estimated Fee for Fully Closing the Position
Initial Margin for a Margin Order = Order Value / Leverage + Estimated Closing Fee + Estimated Execution Fee
2. Short Positions
Maintenance Margin for a Margin Position = Position Value × Maintenance Margin Rate of the Position Tier - Quick Calculation Amount + Estimated Fee for Fully Closing the Position
Initial Margin for a Margin Position = Position Value × Index Price / Leverage + Estimated Fee for Fully Closing the Position
Initial Margin for a Margin Order = Order Value / Leverage + Estimated Closing Fee + Estimated Execution Fee
The platform does not require initial margin for platform orders or position-reduction orders. Estimated fees are calculated at a rate of 0.075%.
Estimated closing fee: This refers to the margin requirement for fees needed if the increased position size resulting from order execution is closed by the platform at the same price.
Margin Requirements for Contract Trading
1. One-Way Position Mode
Maintenance Margin for a Contract Position = abs(Position Size) × Mark Price × Maintenance Margin Rate Corresponding to the User's Risk Limit Tier - Quick Calculation Amount + Estimated Fee for Fully Closing the Position
Initial Margin for a Contract Position = abs(Position Size) × Mark Price × 1 / Leverage + Estimated Fee for Fully Closing the Position
Initial Margin for a Contract Order = abs(Opening Size) × Order Price × 1 / Leverage + Estimated Closing Fee + Estimated Execution Fee
The platform does not require initial margin for platform orders or position-reduction orders. Estimated fees are calculated at a rate of 0.075% (same below);
Estimated closing fee: This refers to the fee required if the position size increases as a result of order execution and the platform closes the position at the same price.
2. Hedge Mode
Maintenance Margin for Hedge Positions = sum(Maintenance Margin for Long Positions - Quick Calculation Amount + Estimated Fee for Fully Closing the Position, Maintenance Margin for Short Positions - Quick Calculation Amount + Estimated Fee for Fully Closing the Position)
Initial Margin for Hedge Positions = sum(Initial Margin for Long Positions + Estimated Fee for Fully Closing the Position, Initial Margin for Short Positions + Estimated Fee for Fully Closing the Position)
Initial Margin for Orders = abs(Order Size) × Order Price × 1 / Leverage + Estimated Closing Fee + Estimated Execution Fee
The platform does not require initial margin for platform orders or position-reduction orders;
Because the current margin assets are only USDT / USDC, the initial and maintenance margin requirements for contracts are applied to the USDT / USDC assets:
Total Maintenance Margin of USDT / USDC Assets for Contracts=sum(Maintenance Margin of All Contract Positions)
Total Initial Margin of USDT / USDC Assets for Contracts=sum(Initial Margin of All Contract Positions and Orders)
Cross-Exchange Margin Mode Example
Assume a user is in Cross-Exchange Margin Mode and has the following two contract positions:
| Trading Pair | Leverage | Position Size | Entry Price | Mark Price | Notional Value | Unrealized P&L |
|---|---|---|---|---|---|---|
| BINANCE_FUTURE_BTC_USDT | 5 | 0.5 | 100,000 | 110,000 | 55,000 | 5,000 |
| OKX_FUTURE_ETH_USDT | 10 | -2 | 4,000 | 4,500 | 9,000 | -1,000 |
One margin short position is as follows:
| Trading Pair | Leverage | Position Asset | Liabilities | Index Price | Unrealized P&L |
|---|---|---|---|---|---|
| BINANCE_MARGIN_XRP_USDT | 4 | 2000 USDT | 1500 XRP | 2 | -1,000 |
Risk limits for BINANCE_FUTURE_BTC_USDT:
| Tier | Minimum Risk Limit Value | Maximum Risk Limit Value | Maximum Leverage | Maintenance Margin Rate | Quick Calculation Amount |
|---|---|---|---|---|---|
| 1 | 0 | 10,000 | 20 | 0.0065 | 0 |
| 2 | 10,000 | 90,000 | 10 | 0.01 | 35 |
| 3 | 90,000 | 2,000,000 | 16 | 0.02 | 935 |
Risk limits for OKX_FUTURE_ETH_USDT:
| Tier | Minimum Risk Limit Value | Maximum Risk Limit Value | Maximum Leverage | Maintenance Margin Rate | Quick Calculation Amount |
|---|---|---|---|---|---|
| 1 | 0 | 10,000 | 20 | 0.008 | 0 |
| 2 | 10,000 | 50,000 | 10 | 0.02 | 120 |
Borrowing tier limits for BINANCE_MARGIN_XRP_USDT:
| Tier | Minimum Risk Limit Value | Maximum Risk Limit Value | Maximum Leverage | Maintenance Margin Rate | Quick Calculation Amount |
|---|---|---|---|---|---|
| 1 | 0 | 8,000 | 9 | 2% | 0 |
| 2 | 8,000 | 15,000 | 3 | 3% | 80 |
CrossEx uses tiered risk limits. The maintenance margin rate for the applicable tier is applied directly based on the position's notional value. The following is the margin calculation for the positions:
- BINANCE_FUTURE_BTC_USDT
Initial Margin: 55,000 × 1 / 5 + 55,000 × 0.00075 = 11,041.25
Maintenance Margin: 55,000 × 0.01 - 35 + 55,000 × 0.00075 = 556.25 - OKX_FUTURE_ETH_USDT
Initial Margin: 9,000 × 1 / 10 + 9,000 × 0.00075 = 906.75
Maintenance Margin: 9,000 × 0.008 + 9,000 × 0.00075 = 78.75 - BINANCE_MARGIN_XRP_USDT
Initial Margin: 1,500 × 2 / 4 + 1,500 × 2 × 0.00075 = 752.25
Maintenance Margin: 1,500 × 2 × 0.02 + 1,500 × 2 × 0.00075 = 62.25
Assume the user has 20,000 USDT, with no other assets or open orders. Based on the above, the user's account-level information is as follows:
| Field | API Field | Value |
|---|---|---|
| Total Margin Balance | Margin Balance | 20,000 + 5,000 - 1,000 - 1,000 = 23,000 |
| Total Initial Margin | Initial Margin | 11,041.25 + 906.75 + 752.25 = 12,700.25 |
| Total Maintenance Margin | Maintenance Margin | 556.25 + 78.75 + 92.25 = 697.25 |
| Total Initial Margin Rate | Initial Margin Rate | 23,000 / 12,700.25 ≈ 181.10% |
| Total Maintenance Margin Rate | Maintenance Margin Rate | 23,000 / 727.25 ≈ 3,298.67% |
| Total Available Account Margin | Available Margin | 23,000 - 12,700.25 = 10,299.75 |
USDT and USDC Margin Calculations for Gate and Hyperliquid Hedging Scenarios
Assume a user is in Cross-Exchange Margin Mode, holding a long position on Gate and a short position of a similar size on Hyperliquid, creating a cross-exchange hedge. After the market rises:
- Gate side: Unrealized profit on the long position increases;
- Hyperliquid side: Unrealized loss on the short position expands.
To make this easier to understand, the following example uses illustrative data (with a scale similar to an actual cross-exchange hedging account, and rounded values). The risk limit tiers and borrowing parameters for each trading pair are subject to GET /crossex/rule/risk_limits and the platform's latest rules.
Asset Level
| Asset | Balance | Unrealized P&L | Asset Equity | Liabilities | Contract Initial Margin | Contract Maintenance Margin | Borrowing Initial Margin | Borrowing Maintenance Margin |
|---|---|---|---|---|---|---|---|---|
| USDT | 400,000 | 340,000 | 740,000 | 0 | 160,000 | 55,000 | 0 | 0 |
| HYPERLIQUID_USDC | 3,500 | -340,000 | -336,500 | 336,500 | 195,000 | 99,000 | 67,300 | 33,650 |
USDT / USDC Asset Leverage = 5
USDT / USDC Borrowing Maintenance Margin Rate = 10%
Account Level
| Field | API Field | Calculation |
|---|---|---|
| Total Margin Balance | Margin Balance | 740,000 + (-336,500) = 403,500 |
| Total Initial Margin | Initial Margin | 160,000 + 195,000 + 67,300 = 422,300 |
| Total Maintenance Margin | Maintenance Margin | 55,000 + 99,000 + 33,650 = 187,650 |
| Total Initial Margin Rate | Initial Margin Rate | 403,500 ÷ 422,300 ≈ 95.5% |
| Total Maintenance Margin Rate | Maintenance Margin Rate | 403,500 ÷ 187,650 ≈ 215% |
| Total Available Account Margin | Available Margin | 403,500 - 422,300 ≈ -18,800 |
Note: CrossEx uses tiered risk limits. If a position's notional value falls within a given tier, the maintenance margin rate and quick calculation amount for that tier are applied.
Scenario Analysis
Sharing improves capital efficiency at the account level, but it does not mean that USDT and USDC are automatically exchanged, nor does it mean that margin usage on both sides automatically offsets each other.
When Hyperliquid losses cause HYPERLIQUID_USDC equity to become negative, please note:
- This creates asset liabilities. Liabilities ≈ ABS(MIN(Balance + Unrealized P&L, 0)) = ABS(MIN(3,500 + (-340,000), 0)) = 336,500
- Liabilities additionally occupy borrowing margin.
| Item | Formula | This Example |
|---|---|---|
| Borrowing Initial Margin | Liabilities ÷ Asset Leverage | 336,500 ÷ 5 = 67,300 |
| Borrowing Maintenance Margin | Liabilities × Borrowing Maintenance Margin Rate | 336,500 × 10% = 33,650 |
-
This portion is included in the account's total IM together with contract initial margin.
-
It is possible for “MMR to remain safe while IMR < 100%”
- MMR ≥ 100% :No liquidation has been triggered;
- IMR < 100% :Available margin is negative: positions cannot be increased, and only closing orders can be placed because closing orders do not occupy initial margin. This commonly occurs when hedged net equity changes little, but rising prices increase notional value and IM on both sides, or when Hyperliquid liabilities increase borrowing IM.
-
When liabilities are substantial, the portion exceeding the platform's rule threshold may accrue interest and continuously occupy borrowing margin, affecting returns and available capacity for opening positions. You can repay liabilities by adding USDC through instant swap or transfer, or reduce margin usage by reducing hedge positions.
Disclaimer
The content provided herein is for reference and educational purposes only and does not constitute any financial, investment, trading, or legal advice, nor does it constitute an offer or solicitation to buy or sell any digital assets. Gate makes no express or implied representations or warranties regarding the accuracy, completeness, or timeliness of the information contained herein. Product features, interfaces, rules, and fee structures may be updated or adjusted at any time. Please refer to the latest announcements and the actual information displayed on the Gate platform for the most accurate details.
Digital asset investments involve significant risk, and prices may fluctuate substantially. You may lose the entire amount of your investment. Please make decisions cautiously based on your own financial situation and risk tolerance after fully understanding the associated risks. If necessary, you are advised to consult an independent professional financial or legal advisor.
For more information about potential risks, please refer to Gate's Risk Disclosure and User Agreement.
