twapStates
Private running-state snapshot of every active TWAP order for one user on one dex.
ChanneltwapStatesserver → client · type
twapStatesShow progress of a user’s running TWAP orders.
Subscribe
{
"method": "subscribe",
"type": "twapStates",
"subscription": {
"type": "twapStates",
"user": "0x0000000000000000000000000000000000000000",
"dex": "txflow"
}
}Try it
Subscription parameters
typestringrequired
"twapStates"userstringrequired
User to follow. Use the account address, not an agent's.
dexstringoptional
Defaults to "" (first/default dex).
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
"twapStates"dataWsTwapStates
dexstring
statesTwapIdCoinPair[]
userstring
Message example
{
"channel": "twapStates",
"data": {
"dex": "txflow",
"user": "0x0000000000000000000000000000000000000000",
"states": [
[
null
]
]
}
}