Filters
Chain slug of the positions.
One or more wallet addresses on
chain. For a single wallet, wallet with one address is also accepted. Each wallet counts as one address against the address limit.A top-level subscribe option, next to
filters. Sends at most one update per position in this many milliseconds, up to 60,000. The default is 1,000, and 0 also means 1,000, so updates are always throttled.Message format
Each update’sdata is a wallet’s full position in one token after a change, in the same row shape that Positions returns. Keep one row per chain, walletAddress and token.
Each row is priced the same way as the REST endpoint, so value, unrealizedPnl, totalPnl and pnlPct are null only where the REST response has null. A trade or transfer raises version. Any change to the token of an open position, such as a new price, sends the row again with the same version. A closed position is sent once, and later price changes send nothing. Replace your row with an update whose version is equal to or higher than yours. If you keep only a strictly higher version, you miss every price change.
Cost
Each update costs one third of a credit. An open position is sent again whenever its token changes, at most once perthrottleMs. A wallet with 100 open positions in active tokens can use about 33 credits per second at the default of 1,000. Set a larger throttleMs when the positions do not need to be live to the second.
Initial snapshot
- Subscribe.
- Read every page of Positions with the same wallets,
chainsset to the subscription’s chain, andhideLowLiquidity=false. The stream does not filter anything out, so the REST request must not either. The request returns only open positions; to keep closed rows, also requestlifecycle=closed. - Merge the REST response and the updates on
version, as Message format describes.