webData2
ChannelwebData2server → client · type
webData2One-subscription account view: positions + margin + open orders (Hyperliquid-compatible).
Subscribe
{
"method": "subscribe",
"type": "webData2",
"subscription": {
"type": "webData2",
"user": "0x0000000000000000000000000000000000000000"
}
}Try it
Subscription parameters
typestringrequired
"webData2"userEthAddressrequired
User to follow. Use the account address, not an agent's.
exchangeIdExchangeScopeoptional
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).
oneOf · variant 1
null
oneOf · variant 2
integer
oneOf · variant 3
string
Server message
channelstring
"webData2"dataWsWebData2
Hyperliquid-compatible aggregate account snapshot: margin summary, positions and open orders in one push.
clearinghouseStateWsClearinghouseState
Aggregate margin and position state for one user.
openOrdersWsOpenOrder[]
serverTimeinteger
Server timestamp, milliseconds.
userstring
Message example
{
"channel": "webData2",
"data": {
"user": "0x0000000000000000000000000000000000000000",
"clearinghouseState": {
"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": [
{}
]
},
"openOrders": [
{
"coin": "BTC-USDC",
"side": "B",
"limitPx": "83000.0",
"sz": "0.001",
"oid": 123456,
"timestamp": 1700000000000,
"origSz": "0.001"
}
],
"serverTime": 1700000000000
}
}