Account State
account_state Channel
Track account state changes including margin requirements, PnL, equity, and portfolio Greeks.
Subscribe
| Parameter | Required | Description |
|---|---|---|
account | Yes | EOA or Smart account address (42 characters with 0x prefix) |
pair | No | Trading pair (e.g., "BTC_USDC"). If omitted, returns updates for all pairs. |
{
"channel": "account_state",
"query": {
"account": "0x1234567890abcdef1234567890abcdef12345678",
"pair": "BTC_USDC"
}
}Event: account_state
{
"kind": "event",
"type": "account_state",
"timestamp_ms": 1677721600000,
"data": {
"timestamp": 1677721600000,
"margin_account": 12345,
"pair": "BTC_USDC",
"im": 5000.0,
"mm": 2500.0,
"matrix_risk": 1200.0,
"delta_risk": 800.0,
"roll_risk": 300.0,
"unrealised_pnl": 1500.0,
"equity": 15000.0,
"portfolio_greeks": {
"delta": 0.45,
"gamma": 0.0012,
"vega": 125.3,
"theta": -45.5,
"rho": 85.2
},
"liquidation": false
},
"subscription": {
"channel": "account_state",
"query": {
"account": "0x1234567890abcdef1234567890abcdef12345678"
}
}
}| Field | Type | Description |
|---|---|---|
timestamp | number | Event timestamp in milliseconds |
margin_account | number | Margin account identifier |
pair | string | Trading pair (e.g., "BTC_USDC", "ETH_USDC") |
im | number | Initial margin requirement |
mm | number | Maintenance margin requirement |
matrix_risk | number | Matrix-based risk value |
delta_risk | number | Delta risk exposure |
roll_risk | number | Roll risk value |
unrealised_pnl | number | Unrealized profit/loss |
equity | number | Total account equity |
portfolio_greeks | object | Aggregate Greeks (delta, gamma, vega, theta, rho) |
liquidation | boolean | Whether the account is in liquidation state |
For real-time position data with mark prices and per-position Greeks, subscribe to the
positionchannel.
Updated about 15 hours ago
