Skip to main content
Margin requirements determine collateral needed to open and maintain positions.

Equity

Equity = Collateral + UnrealizedPnL(Mark) - FeesDue - FundingDue

Unrealized PnL

Long: PositionSize * (Mark - EntryPrice) Short: PositionSize * (EntryPrice - Mark)

Margin Requirements

Base Calculation

IM = Notional / L_max      // Initial Margin
MM = Notional / L_maint    // Maintenance Margin

Leverage Tiers

Position NotionalMax LeverageInitial MarginMaintenance Margin
00 - 50k10×10%5%
50k50k - 250k20%10%
250k250k - 1M33%16.7%
$1M+50%25%

Session Add-Ons

IM_effective = IM_base * (1 + m_session)
MM_effective = MM_base * (1 + m_session * 0.5)
SessionIM Add-OnExample (Base 10%)
Reference Open0%10%
Weekday Overnight10-25%11-12.5%
Weekend50-100%15-20%

Margin States

StateConditionBehavior
HealthyEquity ≥ IMNormal trading
Margin CallMM ≤ Equity < IMReduce-only mode
LiquidationEquity < MMLiquidation triggered

Margin Checks

Pre-Trade

  1. Compute new position after order fills
  2. Calculate IM_required (including session add-ons)
  3. Reject if Equity < IM_required

Continuous Monitoring

Every 1-3 seconds:
  • If Equity < MM → liquidation
  • If MM ≤ Equity < IM → reduce-only (optional)

Session Transitions

Market Opens

  • Remove session margin add-on
  • Accounts in margin call may return to healthy

Market Closes

  • Apply session margin add-on
  • Grace period (15 min) before liquidating due to add-on alone
  • Cancel orders violating new leverage limits

Deposits & Withdrawals

Deposits: Instantly increase equity Withdrawals: Require Equity_after ≥ IM_required

API Response

{
  "equity": 12500.00,
  "im_required": 10000.00,
  "mm_required": 6000.00,
  "margin_ratio": 2.08,
  "margin_state": "HEALTHY",
  "leverage_current": 4.8,
  "session_im_addon": 0.0
}