Margin and liquidation
Understand margin requirements, leverage and the conditions that can lead to liquidation.
Distinguish initial and maintenance margin
Initial margin is the requirement used when admitting new exposure. Maintenance margin is the requirement used to assess ongoing position health. A position can be acceptable at entry and become unsafe after prices, funding, or account balances change.
Edel uses cross margin: account equity supports positions across the account, and maintenanceRequirementAtoms is the account-level maintenance requirement across those positions, not a separate requirement for each position. Position leverage is position notional divided by account equity when equity is positive.
Market metadata supplies initial margin, maximum leverage, and maintenance-margin tiers. The applicable maintenance requirement can change with position notional. Use the current market limits and the order preview; a limit observed on another market or at an earlier time may not apply.
Available for Orders is the account’s reported capacity for new orders, not a guaranteed cushion against every future price move.
Risk and liquidation
Risk and liquidation
- Step
10 parts and 10 connections.
Read as text
- Order intent → Order checks
- Account state → Order checks
- Order checks → Match (eligible)
- Order checks → Rejection with reason (refused)
- Match → Exposure + PnL
- Validated mark price → Exposure + PnL
- Exposure + PnL → Liquidation candidate
- Liquidation candidate → Resolution required (policy disabled)
- Liquidation candidate → Reduce-only IOC close intent (policy enabled)
- Reduce-only IOC close intent → Order checks
The execution engine calculates margin and fee reserves from exact amounts and current account state before admitting an order. Ongoing risk uses mark prices and maintenance requirements to identify positions that need resolution.
Pre-trade checks. The engine checks leverage, required reserves and available margin. Insufficient margin, bad debt or restricted risk-increasing exposure can cause rejection.
Reducing exposure. Risk-increasing orders and reduce-only orders follow different admission rules. A reducing instruction remains subject to its market status, position size and execution conditions.
Liquidation policy. Identifying a liquidation candidate does not mean a close has executed. Automated liquidation depends on the environment’s enabled policy; otherwise the candidate requires resolution. Monitor current risk and confirmed position state rather than assuming automatic liquidation is active in every environment.
Liquidation, insurance fund and auto-deleveraging
An account whose equity falls below its cross-margin maintenance requirement becomes a liquidation candidate. A candidate cannot withdraw collateral or add risk until its margin is restored. Being flagged does not mean that a close has executed.
Where automated liquidation is enabled for an environment, the venue resolves a candidate in this order:
- 01Cancel risk-adding orders. Resting orders that would add risk are cancelled and their reserved margin is released.
- 02Close through the order book. The venue submits a reduce-only immediate-or-cancel order at the position's bankruptcy price. The close can reduce part of the position, or all of it when the account's equity is at or below zero.
- 03Cover the deficit from the insurance fund. If the close leaves the account without positions and with a deficit, the insurance fund covers it up to its available balance.
- 04Auto-deleverage. When the order book cannot take the close of an account at or below zero equity, the venue reduces opposite positions held by accounts with positive equity, in queue order, at the remaining position's bankruptcy price. The price is limited so that a counterparty never closes at a better price than the mark price. These closes carry no trading fee.
- 05Record bad debt. Any loss that none of these steps covers is recorded on the account as explicit bad debt. The account remains a blocked candidate while bad debt remains.
The auto-deleveraging queue ranks eligible opposite positions by unrealized profit multiplied by leverage (position notional divided by margin), highest first, with a deterministic tie-break. Each position reports an ADL indicator from 1 to 5; positions at 5 are reduced first.
The liquidation fee is set per market and defaults to 0. Automated liquidation depends on the environment's enabled policy; where it is not enabled, a candidate stays flagged and requires resolution. Check the current account state rather than assuming that any step has run. Developers can read these values from account streams.
Read the account’s reported margin mode
The account view reports its margin mode. Cross margin generally assesses exposure against shared account collateral; isolated margin generally confines allocated margin to a position. The reported mode and current service calculations determine the account’s behavior.
The current terminal does not offer a margin-mode switch. Changing the order ticket’s leverage does not switch between cross and isolated margin. Do not assume a separate balance allocation that the application has not shown.
Review account equity, available collateral, open positions, and the fresh order preview together. See collateral and balances.
Treat liquidation prices as changing risk values
The preview provides an estimated liquidation price for the proposed order where available. Positions provides the current reported liquidation and margin status. These values can move as the position, account, mark price, fees, funding, or applicable tier changes.
Risk is assessed using reported mark information, which can differ from the chart’s Index or Trade series and from the last fill. A missing liquidation value is unavailable data, not zero risk.
A liquidation-candidate or bankrupt status requires attention to the current account state. Do not wait for an old chart level or a stale estimate to determine whether exposure remains safe. See trading risks.
Mark, index and last price
The terminal shows three prices with distinct roles. Last price is the most recent trade on the Edel order book. Index price tracks external reference venues for the underlying asset. Mark price is the fair valuation price used to calculate unrealized PnL, margin health and liquidation thresholds so a single thin print on the order book cannot unfairly liquidate a position.
When an external reference feed is stale or uncertain, the venue can pause new risk-increasing orders while still allowing position-reducing actions. For WebSocket price stream fields and feed health metadata, see Market data and candles.
Review available actions while risk changes
To reduce exposure, review a Reduce Only order or the position’s Close action. To remove unused resting orders, use Cancel and confirm the result. Additional collateral can help only after a supported deposit is actually credited; a pending transfer is not available margin.
If the application reports incomplete risk information, stale account data, or an unavailable preview, wait for recovery and inspect the reason. The service can refuse new exposure while required risk evidence is unavailable. An old successful preview cannot override that state.
No exit type, funding action, or displayed estimate guarantees that liquidation will be avoided.
Leverage increases the speed of losses
Perpetuals can create exposure larger than the collateral supporting it. A relatively small adverse move can materially reduce equity and lead to liquidation. You can lose collateral before you have time to react.
An estimated liquidation price is not a guarantee. Fees, funding, other positions, pending orders and changing account conditions can affect risk. Monitor current margin, not just entry price or unrealized PNL.
Profitable exposure is not protected from forced reduction: auto-deleveraging can reduce or close it when an opposite account cannot be liquidated through the order book. See auto-deleveraging.
An instruction is not a guaranteed outcome
A market order can experience slippage or partial execution. A limit order can remain unfilled. A stop or take-profit instruction depends on its trigger, eligibility and available execution conditions; it is not insurance against losses.
Closing a position also requires successful execution. A pending close must not be treated as a closed exposure. Read Orders and Positions.
Continuous markets can still have gaps
24/7 trading does not ensure deep liquidity or fresh reference data at every moment. Last, mark and index prices can differ. Spreads can widen, liquidity can disappear and an external reference market can be closed while a perpetual continues trading.
Do not rely on a single chart, stale quote or a previously displayed preview when deciding whether to submit an instruction.
Systems and dependencies can be unavailable
Connections, authentication, market-data sources, software, custody services and settlement networks can fail or become delayed. An account can show last-known information while current state is unconfirmed.
A successful sign-in, API response or WebSocket connection is not by itself proof of a successful trade or settlement. Keep order and withdrawal identifiers so you can check an uncertain result without blindly repeating it.
Security audits have not yet been completed. Review the current audit status.
Set limits for automated trading
Automated clients can place orders quickly, including orders that do not match your intent if a strategy or instruction is wrong. Use the narrowest required permissions and explicit limits for size, inventory and losses. Give the agent a defined trading task before enabling trade access.
Deposits, withdrawals and custody approvals remain owner actions. Review Agent permissions and Account security before connecting automation.
Check the terms that apply to you
Review the Terms of Service, Privacy Policy and Risk Disclosure before trading. Each network has its own purpose and risk profile: practise on TestNet with test money before you trade with real money on MainNet. See Networks and Product status.
Worked example: notional, equity and margin
Suppose you buy a 0.10 BTC perpetual position at a mark price of 70,000 USDCx (7,000 USDCx notional) with 10x leverage (700 USDCx initial margin) and a 5% maintenance requirement (350 USDCx). Your account holds 1,000 USDCx in collateral.
If the mark price rises to 71,000 USDCx, your unrealized profit is +100 USDCx and account equity is 1,100 USDCx before fees and funding. If the mark price falls toward 66,500 USDCx, your 350 USDCx loss brings account equity down toward the maintenance threshold, putting the position at risk of liquidation. Always read the live margin and liquidation figures in the terminal, which include funding, fees and all open positions.
| Quantity | Illustrative relation | Meaning |
|---|---|---|
| Notional at mark | N = |q| × Pmark | The magnitude of exposure valued at mark. |
| Initial margin | IM = N × IMR | A simple proportional requirement; actual admission also applies the configured risk rules and reserves. |
| Maintenance margin | MM = N × MMR(tier) | A tier-dependent maintenance relationship; read the applicable tier from current metadata. |
| Unrealized PNL | uPNL = q × (Pmark − Pentry) | The direction-sensitive valuation change in this simplified linear example. |
| Equity | E = C + uPNL | A simplified cash-plus-valuation relationship, before any additional account-specific components. |