Hyperliquid
Subscribe
{
"method": "subscribe",
"subscription": {
"type": "twapUpdates",
"user": "0x1111111111111111111111111111111111111111"
}
}
Response
{
"channel": "twapUpdates",
"data": {
"isSnapshot": true,
"user": "0x1111111111111111111111111111111111111111",
"twaps": [
{
"twapId": "0x1a2b3c...",
"status": "active",
"asset": "BTC",
"side": "buy",
"totalSz": "0.25",
"filledSz": "0.10",
"remainingSz": "0.15",
"reduceOnly": false,
"slicesFilled": 2,
"slicesPartial": 0,
"slicesRejected": 0,
"totalNotional": "5030.0",
"avgFillPx": "50300",
"durationMs": 1800000,
"sliceIntervalMs": 300000,
"createdAt": 1701234567890,
"startedAt": 1701234567890,
"expectedEndAt": 1701236367890,
"currentSliceIndex": 2,
"totalExpectedSlices": 7,
"randomize": true,
"updatedAt": 1701235167890
}
]
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
channel | string | Always "twapUpdates" |
data | object | Initial snapshot or later update |
Data
| Field | Type | Description |
|---|---|---|
isSnapshot | boolean | true for the initial active-TWAP snapshot, else false |
user | string | Lowercased user address, e.g., "0x742d35cc...f0beb" |
twaps | array | TWAP updates; the initial snapshot can be an empty array |
TWAP
| Field | Type | Description |
|---|---|---|
twapId | string | TWAP order ID, e.g., "0x1a2b3c..." |
status | string | Current TWAP status, e.g., "active" |
asset | string | Market symbol, e.g., "BTC" |
side | string | "buy" or "sell" |
totalSz | string | Total requested size, e.g., "0.25" |
filledSz | string | Aggregate filled size, e.g., "0.10" |
remainingSz | string | Remaining size, e.g., "0.15" |
reduceOnly | boolean | Whether the TWAP is reduce-only |
totalNotional | string | Filled notional, e.g., "5030.0" |
avgFillPx | string | VWAP, e.g., "50300", or "0" before fills |
