clearinghouseState
clearinghouseStateKeep the Positions panel and margin summary live.
{
"method": "subscribe",
"type": "clearinghouseState",
"subscription": {
"type": "clearinghouseState",
"user": "0x0000000000000000000000000000000000000000",
"dex": "txflow"
}
}"clearinghouseState"User to follow. Use the account address, not an agent's.
Optional perp dex name. Defaults to the first dex.
Filter by an instrument's configured exchange_id. Same three-state semantics as the HTTP /info ExchangeScope: missing, null, or 0 -> Default (only instruments with no configured exchange_id); the string "all" (case-insensitive) -> All (no filter, every exchange); a positive integer n -> Exchange(n) (only that exchange_id).
"clearinghouseState"Aggregate margin and position state for one user.
accountValue + withdrawHold.
Cross-margin maintenance margin requirement.
Cross margin ratio = (balance + crossUnrealizedPnl) / (crossMaintenanceMargin + crossLiquidationFee). Higher is safer; liquidation triggers at <= 1.0.
totalRawUsd + withdrawHold.
Ethereum-style account or token address, 0x-prefixed, 40 hex characters.
User's total equity across all vaults.
Amount currently withdrawable.
In-flight reverse-position jobs for this user. Omitted when empty.
{
"channel": "clearinghouseState",
"data": {
"user": "0x0000000000000000000000000000000000000000",
"marginSummary": {
"accountValue": "",
"totalMarginUsed": "",
"totalNtlPos": "",
"totalRawUsd": ""
},
"crossMarginSummary": {
"accountValue": "",
"totalMarginUsed": "",
"totalNtlPos": "",
"totalRawUsd": ""
},
"crossMaintenanceMarginUsed": "",
"crossMarginRatio": "",
"withdrawable": "",
"totalRawUsdPlusWithdrawHold": "",
"accountValuePlusWithdrawHold": "",
"vaultEquity": "",
"assetPositions": [
{
"type": "oneWay",
"position": {
"coin": "4",
"asset": "4",
"szi": "",
"leverage": {
"type": "Cross",
"value": 0,
"rawUsd": ""
},
"entryPx": "0",
"positionValue": "",
"unrealizedPnl": "",
"returnOnEquity": "",
"liquidationPx": "0",
"marginUsed": "",
"maxLeverage": 0,
"cumFunding": {
"allTime": "",
"sinceOpen": "",
"sinceChange": ""
},
"marginRatio": "",
"adlQuantile": 0,
"markPx": "0"
},
"tpsl": [
{}
]
}
],
"activeReverseJobs": [
{}
]
}
}