{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "AccountSummary",
"description": "Account summary. Hyperliquid and HIP-3 carry the perp clearinghouse fields of one account (HIP-3: one per dex). Lighter carries position aggregates only (`account_index`, totals, and counts). A total is null when any position in it has no mark, never a partial sum.",
"type": "object",
"required": [
"long_value",
"n_positions",
"quality",
"short_value",
"total_position_value",
"total_unrealized_pnl"
],
"properties": {
"account_index": {
"description": "Lighter only: account index as a string.",
"type": "string",
"example": "513030"
},
"account_mode": {
"description": "Hyperliquid and HIP-3 only: account abstraction mode, `standard`, `unified`, `portfolio`, `dex_abstraction`, or `unknown`.",
"type": "string",
"example": "standard"
},
"account_value": {
"description": "Hyperliquid and HIP-3 only: account value in USD.",
"type": "string",
"nullable": true,
"example": "125000.5"
},
"collateral": {
"description": "Hyperliquid and HIP-3 only: collateral in USD.",
"type": "string",
"nullable": true,
"example": "100000"
},
"cross_account_value": {
"description": "Hyperliquid and HIP-3 only: cross-margin account value in USD.",
"type": "string",
"nullable": true,
"example": "118000.25"
},
"cross_maintenance_margin_used": {
"description": "Hyperliquid and HIP-3 only: cross maintenance margin used in USD.",
"type": "string",
"nullable": true,
"example": "6100.2"
},
"dex": {
"description": "HIP-3 only: dex the account summary belongs to.",
"type": "string",
"example": "xyz"
},
"long_value": {
"description": "Value of long positions in USD.",
"type": "string",
"nullable": true,
"example": "300000"
},
"n_positions": {
"description": "Number of open positions.",
"type": "integer",
"example": 4
},
"quality": {
"description": "`complete`, `partial` (a total is null because a position has no mark), or `degraded`.",
"type": "string",
"example": "complete"
},
"short_value": {
"description": "Value of short positions in USD.",
"type": "string",
"nullable": true,
"example": "112000.5"
},
"snapshot_as_of": {
"description": "Hyperliquid and HIP-3 only: time the clearinghouse fields describe.",
"type": "string",
"format": "date-time",
"nullable": true
},
"snapshot_ts": {
"description": "Hour the row describes. Present on hourly history rows only.",
"type": "string",
"format": "date-time"
},
"total_margin_used": {
"description": "Hyperliquid and HIP-3 only: total margin used in USD.",
"type": "string",
"nullable": true,
"example": "20500.75"
},
"total_position_value": {
"description": "Sum of absolute position values in USD.",
"type": "string",
"nullable": true,
"example": "412000.5"
},
"total_unrealized_pnl": {
"description": "Sum of unrealized PnL in USD.",
"type": "string",
"nullable": true,
"example": "2510.25"
},
"withdrawable": {
"description": "Hyperliquid and HIP-3 only: withdrawable amount in USD. Null outside the periods where it was captured.",
"type": "string",
"nullable": true
}
}
}