userTwapHistory
Private history of finished/cancelled TWAP orders for one user. The REST list is twapHistory.
ChanneluserTwapHistoryserver → client · type
userTwapHistoryAppend TWAPs to the history list as they finish or are cancelled.
Subscribe
{
"method": "subscribe",
"type": "userTwapHistory",
"subscription": {
"type": "userTwapHistory",
"user": "0x0000000000000000000000000000000000000000"
}
}Try it
Subscription parameters
typestringrequired
"userTwapHistory"userstringrequired
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
"userTwapHistory"dataWsUserTwapHistory
historyWsTwapHistoryRow[]
isSnapshotboolean
userstring
Message example
{
"channel": "userTwapHistory",
"data": {
"isSnapshot": false,
"user": "0x0000000000000000000000000000000000000000",
"history": [
{
"time": 1700000000000,
"twapId": "",
"finishedAt": 0,
"state": {
"coin": "4",
"user": "0x0000000000000000000000000000000000000000",
"side": "B",
"sz": 0,
"executedSz": 0,
"executedNtl": 0,
"unfilledSz": 0,
"minutes": 0,
"reduceOnly": false,
"randomize": false,
"timestamp": 1700000000000,
"interval": 0,
"marginMode": "Cross",
"positionMode": "OneWay",
"leverage": 0
},
"status": "",
"failureReason": ""
}
]
}
}