account channel pushes what happens to an account, in order, as it happens. Accounts are public onchain and through the REST routes, so subscribing needs no login.
channel: "account", type, address, id (unique; use it to drop duplicates) and ts (epoch ms), plus:
- Resting orders get
fillevents. Only the order just placed gets anorderevent with its fill status; count a resting order’s fills against itstotal_amountto know when it’s done. - Unknown
typevalues may be added: ignore them.
Starting and reconnecting
Nothing is replayed. To start, or after reconnecting:1
Subscribe
Subscribe to the
account channel for the address.2
Read the current state
Read
GET /v1/accounts/{address}, /orders and /positions.3
Apply events
Apply events from then on, dropping any whose
id you’ve seen.