clearinghouseState
Full clearinghouse state (positions + margin summary) for one sub-account.
clearinghouseStateLoad the Positions panel: every position plus the margin summary, for the perp or outcome sub-account.
Optional account type: `perp` or `outcome`.
curl -X POST https://rpc.txflow-testnet.xyz/info \
-H "Content-Type: application/json" \
-H "x-api-version: 2026-08-16" \
-d '{
"accountType": "perp",
"type": "clearinghouseState",
"user": "0x0000000000000000000000000000000000000000"
}'`0` on success.
Total account equity plus pending withdrawals = accountValue + withdrawHold.
Cross-margin ratio = (balance + crossUnRealPnl) / (crossMaintenanceMargin + crossLiqFee). OKX-style: higher is safer; liquidation triggers when the ratio drops to `<= 1.0`.
Total raw USD balance plus pending withdrawals = totalRawUsd + withdrawHold.
`false` on error, with `code` set and the text in `message` instead of `data`.
{
"success": true,
"code": 0,
"data": {
"accountValuePlusWithdrawHold": "",
"activeReverseJobs": [
{
"asset": "4",
"coin": "4",
"filledCloseQty": "",
"marginMode": "",
"phase": "",
"positionSzAtStart": ""
}
],
"assetPositions": [
{
"position": {
"adlQuantile": 0,
"asset": "4",
"coin": "4",
"cumFunding": {
"allTime": "",
"sinceChange": "",
"sinceOpen": ""
},
"entryPx": "0",
"leverage": {
"rawUsd": "",
"type": "",
"value": 0
},
"liquidationPx": "0",
"marginRatio": "",
"marginUsed": "",
"markPx": "0",
"maxLeverage": 0,
"positionValue": "",
"returnOnEquity": "",
"szi": "",
"unrealizedPnl": "",
"updateTime": 1700000000000
},
"tpsl": [
{
"createTime": 1700000000000,
"quantity": "0",
"slOid": "",
"slOrderPrice": "0",
"slOrderType": "",
"slTriggerPrice": "0",
"tpOid": "",
"tpOrderPrice": "0",
"tpOrderType": "",
"tpTriggerPrice": "0"
}
],
"type": ""
}
],
"crossMaintenanceMarginUsed": "",
"crossMarginRatio": "",
"crossMarginSummary": {
"accountValue": "",
"totalMarginUsed": "",
"totalNtlPos": "",
"totalRawUsd": ""
},
"marginSummary": {
"accountValue": "",
"totalMarginUsed": "",
"totalNtlPos": "",
"totalRawUsd": ""
},
"time": 1700000000000,
"totalRawUsdPlusWithdrawHold": "",
"vaultEquity": "",
"withdrawable": ""
}
}accountType selects the sub-account: perp or outcome. For Outcome,
exchangeId optionally limits the result to one channel. For the token balances of the perp sub-account, use
perpClearinghouseState; for Outcome
positions alone, use outcomePositions.