Portfolio margin
OCX uses portfolio margin: rather than charging margin position-by-position in isolation, it evaluates your positions together and recognizes offsetting risk. A hedged book (positions that partly cancel each other’s risk) requires less margin than the same positions would if margined separately. Two levels matter:Initial margin
The collateral required to open a position. Checked at order time — an order that would leave you under-collateralized is rejected.
Maintenance margin
The minimum collateral required to keep a position open. Falling below it puts the position at risk of liquidation.
perps for perpetuals and futures, options for options. Fund the bucket for the venue you trade in. See Balances & transfers.
Because the margin check runs at order acceptance, a preview call (
/perps/orders/preview) is the reliable way to see the margin required and whether an order will be approved before you send it.What triggers a liquidation
Your positions carry unrealized profit and loss as the mark price moves. When adverse price movement (or accruing funding on perps) erodes your collateral so that your account can no longer meet maintenance margin, the position becomes eligible for liquidation.Margin erodes
Losses, funding payments, or increased position risk push your account toward the maintenance-margin threshold.
Breach
Once maintenance margin is breached, the exchange steps in — you no longer control the timing.
The insurance fund
When a liquidation cannot fully cover a position’s losses, the shortfall (bad debt) is absorbed by the exchange’s insurance fund rather than passed to other traders. The insurance fund is a shared backstop that grows over time and cushions the system against gaps in extreme moves. The insurance-fund balance is public:Practical guidance
- Preview every order to see margin required and approval status before sending.
- Keep headroom above maintenance margin; don’t trade at the edge of your collateral.
- Use
reduceOnlyfor exit orders and protective stop / take-profit triggers for automated risk exits. - Wire
cancel-allinto your kill path so you can pull all resting orders instantly on a feed loss or risk breach.