Skip to main content
Streams every token that matches the subscription’s filters each time the token changes, and sends an exit frame when a token stops matching. Subscribe on an open stream connection. See WebSocket streams for connections, frames and reconnection, and Filtering streams for how keys, lists and ranges combine.

Overview

Each time a token changes, the subscription tests the token’s full state against the filters.
  • When a token starts to match, it is sent as an update with the full token object, and so is each later change while it still matches.
  • When a token stops matching, a single exit frame with its chain and address is sent. The token can match again later and be sent again.
  • The subscription does not start with a snapshot; each token is sent on its next change. To show a full view first, read Tokens or Discovery.
  • One subscription tracks at most 10,000 matching tokens. Beyond that, the token that matched least recently receives an exit, and it is sent again the next time it matches.

Filters

{} matches every token on every chain. Each key below narrows the set. Ages are milliseconds since the event, so ageMs: { "max": 3600000 } matches tokens created in the last hour. ageMs, sinceGraduationMs and lastActivityMs are tested only when the token changes, so a token that ages out of the range receives its exit at its next change. An unknown value never matches a range (see Ranges). Two cases are specific to this channel:
  • drawdownFromAthPct is unknown when the USD market cap or its all-time high is unknown.
  • A holder count of zero makes every Holders key unknown.

Throttle

throttleMs, set alongside filters in the subscribe frame, limits the subscription to one update per token per interval. It accepts an integer from 0 to 60,000. Omit it or send 0 to receive every update.
  • The first update in an interval is sent immediately.
  • Later updates in the same interval are collapsed into the newest one, which is sent when the interval ends.
  • An exit is never delayed. It discards any pending update and ends the interval, so a token that matches again is sent immediately.

Message format

Each update contains the full token object in data, which replaces the stored copy. Tokens documents every field. Each exit contains only the token’s chain and address in data, and means the token should be removed from the view. exit frames are not billed.

Unsupported filters

spot.tokens accepts chains and tokens lists and rejects chain and token:

Errors