Skip to main content
Subscribe on an open stream connection. See Connecting to streams for the connection, frames and reconnecting.

Filters

string
required
The chain slug the wallets hold balances on.
string[]
required
One or more wallet addresses on chain. For one wallet, you can send wallet with a single address instead. Each wallet spends one unit of the address budget.
To follow a wallet on several chains, open one subscription per chain.

Update

Each update’s data is one wallet’s balance of one asset after a transaction, never the change. It has the row shape Wallet balances returns. Updates for one wallet can arrive out of order, and a reconnect can miss some. Keep one row per chain, wallet and asset, and keep the row with the higher blockNumber, then the higher txIndex. Two rows with equal versions come from the same transaction, so either one serves. A row is never retracted, even after a chain reorganization. Some changes write no row, such as Solana rent and the fee of a failed transaction, so a balance can lag until the wallet’s next captured change.

Snapshot, then stream

  1. Subscribe.
  2. Read Wallet balances with the same wallets and chains set to the subscription’s chain.
  3. Merge the read and the updates by the rule above.
The read can trail the stream by a few seconds, so a change made just before you subscribe can appear in neither. Read again a few seconds after you subscribe, and again after every reconnect.

Errors