Subscribe
Request Body
| Parameter | Type | Description |
|---|---|---|
method* | string | Must be "subscribe" |
subscription* | object | See below |
subscription.type* | string | Must be "accountSummary" |
subscription.user* | string | Your wallet address (lowercase), e.g., "0x742d35cc6634c0532925a3b844bc9e7595f0beb" |
Response
Subscription Confirmation:Summary Fields
Account Level
| Field | Type | Description |
|---|---|---|
accountValue | number | Total account value in USDC |
totalMarginUsed | number | Margin allocated to positions |
availableMargin | number | Free margin for new positions |
crossMaintenanceMargin | number | Maintenance margin required |
withdrawable | number | Amount available for withdrawal |
Assets
| Field | Type | Description |
|---|---|---|
coin | string | Asset symbol (USDC, USDT, etc.) |
total | number | Total balance |
available | number | Available for trading/withdrawal |
Positions
| Field | Type | Description |
|---|---|---|
coin | string | Asset symbol (BTC, ETH, etc.) |
szi | string | Position size (+ long, - short) |
entryPx | string | Average entry price |
positionValue | string | Notional value |
unrealizedPnl | string | Current unrealized PnL |
marginUsed | string | Margin allocated |
leverage | string | Current leverage |
liqPx | string | Estimated liquidation price |
returnOnEquity | string | ROE as decimal |
Unsubscribe
Notes
- Initial snapshot sent immediately after subscription
- Updates sent only when account state changes
- User address must be lowercase
- All numeric values are numbers (not strings)