Get comprehensive account state across all margin accounts

Retrieve the complete financial state for all margin accounts associated with an Ethereum address. This endpoint is essential for monitoring account health, risk management, and trading decisions.

No signature required - Only API key authentication is needed.

What This Endpoint Returns

For each margin account (one per trading pair), you'll receive:

Account Health Metrics:

  • equity: Total account value (collateral + unrealized P&L)
  • im: Initial margin - minimum equity required to open new positions
  • mm: Maintenance margin - minimum equity required to avoid liquidation
  • unrealised_pnl: Profit/loss on open positions at current mark prices

Position Details:

  • All open positions with sizes, entry prices, and fees
  • Current mark prices and Greeks for options
  • Instrument-specific P&L calculations

Risk Indicators:

  • matrix_risk: Portfolio risk matrix component
  • delta_risk: Delta risk component
  • roll_risk: Roll risk component
  • portfolio_greeks: Portfolio-level Greeks (delta, gamma, vega, theta, rho)

Additional Fields:

  • timestamp: Unix timestamp when state was calculated
  • margin_account: Unique margin account ID
  • pair: Trading pair for this margin account

Use Cases

  1. Risk Monitoring: Check if accounts are approaching liquidation
  2. Portfolio Management: View all positions and their current values
  3. Trading Decisions: Monitor risk metrics and margin requirements
  4. P&L Tracking: Monitor realized and unrealized profits/losses

Important Notes

  • Accounts are isolated by trading pair (e.g., separate ETH_USDC and BTC_USDC accounts)
  • All monetary values are in USDC with 6 decimal precision
  • Mark prices are updated in real-time from the orderbook
  • Greeks are calculated using the Black-Scholes model for options
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!