Introduction to Cross Margin Trading
Futures mode enables simultaneous trading across all business lines—spot, margin, futures, perpetual swaps, and options—using a unified cross margin account. Assets deposited into this account allow:
- Shared Margining: All positions settled in the same cryptocurrency pool their margin.
- PnL Netting: Profits and losses offset across products (e.g., futures gains can cover margin losses).
Risk Management
Positions settled in the same crypto are risk-assessed collectively. Insufficient equity may trigger:
- Partial/full liquidation
- Equity loss across all linked positions
👉 Isolated margin mode is recommended for risk segregation.
Key Asset Metrics
| Term | Description | API Parameter |
|---|---|---|
| Equity | Balance + Floating PnL (all positions). Calculated per crypto. | eq (details array) |
| Free Margin | Usable for trading margins: Max(0, Balance + Floating PnL – In Use) | availEq |
| Leverage | Position Value / (Balance + Floating PnL). Varies by product type. | notionalLever |
| Maintenance Margin Ratio | Risk indicator: (Balance + PnL – In Use) / (Maintenance Margin + Fees) | mgnRatio |
Trading Rules
Cross Margin Mode
Margin Verification:
- Futures/options (short): Free margin ≥ order requirement.
- Spot/options (long): Available balance ≥ order amount.
Example Workflow:
- Order Placement: Long BTC futures at 5x leverage needs 40 BTC margin (200 BTC position / 5).
- Equity Check: If
Free Margin = 185 BTC> required 40 BTC → Order succeeds.
Isolated vs. Cross Margin
| Feature | Cross Margin | Isolated Margin |
|---|---|---|
| Risk | Shared across positions | Per-position |
| Margin Efficiency | Higher (pooled) | Lower (dedicated) |
Position Management
Margin Positions
| Field | Description | API Parameter |
|---|---|---|
| Est. Liquidation Price | Reference price triggering liquidation. Excludes mixed-product accounts. | liqPx |
| Closing Methods | - Market/limit orders (reduce-only default). - Partial closes use available assets + equity. | N/A |
Futures & Options
- Hedge Mode: Supports long/short offsets (delta-neutral strategies).
Liquidation: Phased approach:
- Offset reverse contracts.
- Delta-hedge remaining positions.
- Liquidate unhedged positions by risk priority.
Risk Control Measures
Pre-Liquidation Safeguards
Order Cancellation:
- Triggered if
(Available Equity – In Use) < Maintenance Margin + Open Order Costs.
- Triggered if
Liquidation Alerts:
- Warn at 300% maintenance margin ratio.
- Cancel orders if ratio ≤ 100%, then liquidate.
Liquidation Phases
- Offset opposing contracts.
- Delta-hedge remaining.
- Liquidate highest-risk positions.
FAQ
1. Can I use cross and isolated margins simultaneously?
Yes, but risks are segregated—isolated positions don’t share equity with cross margin.
2. How does leverage affect maintenance margin?
Higher leverage increases position value, raising the required maintenance margin.
3. What happens if my equity turns negative?
Outstanding liabilities are deducted from remaining assets; negative balances may occur.
4. Why was my order canceled pre-liquidation?
To prevent cascading liquidations by reducing account risk below threshold levels.
5. Are options positions included in shared margining?
Only short options impact cross margin equity; longs are excluded.
👉 Master cross margin trading with OKX’s advanced tools. For a detailed guide on liquidation scenarios, visit our help center.