webData2 (API service)
Sends a user's open orders once, as a snapshot, right after you subscribe.
Nothing is pushed after that. This is the /api-ws channel named webData2;
the node /ws webData2 channel is a different,
live aggregate.
ChannelwebData2server → client · type
webData2Load a user’s open orders over /api-ws — one snapshot, no updates.
Subscribe
{
"method": "subscribe",
"subscription": {
"type": "webData2",
"user": "0xabc123abc123abc123abc123abc123abc123abc1"
}
}Try it
Subscription parameters
typestringrequired
"webData2"userstring · addressrequired
Account address (the owner, not an agent).
Server message
channelstring
"webData2"dataobject
isSnapshotboolean
Always `true`: this is the only push.
openOrdersobject[]
userstring · address
The account, lower-cased.
Message example
{
"channel": "webData2",
"data": {
"isSnapshot": true,
"user": "0xabc123abc123abc123abc123abc123abc123abc1",
"openOrders": [
{
"coin": "BTC",
"symbol": "BTC-USDC",
"side": "B",
"limitPx": "65000.0",
"sz": "0.01",
"oid": 123456,
"timestamp": 1720000000000,
"triggerCondition": "",
"isTrigger": false,
"triggerPx": "0",
"children": [
null
],
"isPositionTpsl": false,
"reduceOnly": false,
"dir": "Open Long",
"orderType": "Limit",
"origSz": "0.01",
"tif": "Gtc",
"cloid": "my-order-001",
"avgFillPrice": "65010.5",
"positionMode": "OneWay",
"marginMode": "cross",
"leverage": 10,
"pnl": "12.5",
"entryPrice": "64000.0",
"roe": "1.95",
"fee": "0.02",
"filledAmount": "0.01",
"cancelSource": "UserCanceled",
"status": "filled",
"instrumentId": 1,
"instrumentType": "perps",
"marketType": "perps"
}
]
}
}Rows have the same shape as the order rows of
historicalOrders. To keep open orders live, use
orderUpdates or poll
frontendOpenOrders.