Documentation Index
Fetch the complete documentation index at: https://docs.codex.io/llms.txt
Use this file to discover all available pages before exploring further.
Usage Guidelines
- Pass an array of
{ address, networkId }objects to subscribe to price updates for multiple tokens in a single subscription - Tokens can span different networks — e.g., SOL on Solana and WETH on Ethereum in one subscription
- Each update delivers a single
Priceobject for whichever token’s price changed — not a batch of all tokens at once - Optionally include
sourcePairAddressper token to override the default pricing pool - Up to 25 tokens per subscription (hard limit on the input array). You may have multiple
onPricesUpdatedsubscriptions on a connection - There is no hard limit on subscriptions per connection — what matters is the total number of tokens being watched across them. As a starting point, plan for up to ~100 tokens per connection. For high-volume tokens (SOL, top trending tokens, busy pairs), lower the per-connection density and open more connections instead
- Your internet connection, and geolocation (proximity to US-West), may affect connection health and speeds, especially with many subscriptions
- See our Subscriptions concept for more information
Troubleshooting Tips
Token prices are changing between API calls for the same timestamp
Token prices are changing between API calls for the same timestamp
blockNumber input and response field. This will give you pricing accuracy down to the blocknumber if blockchain timestamps are causing unexpected pricing discrepancies.If I subscribe to multiple trading pairs, can I later cancel a certain trading pair?
If I subscribe to multiple trading pairs, can I later cancel a certain trading pair?
When should I use onPricesUpdated vs onPriceUpdated?
When should I use onPricesUpdated vs onPriceUpdated?
onPricesUpdated when tracking multiple tokens — it lets you batch them into a single subscription instead of opening one subscription per token. Use onPriceUpdated if you only need a single token’s price feed.Do I get updates for all tokens at once?
Do I get updates for all tokens at once?
Price object for whichever token’s price just changed. High-volume tokens will produce updates more frequently than low-volume ones.Is there a subscription that streams every token's price across a network?
Is there a subscription that streams every token's price across a network?
onPricesUpdated subscription — it caps at 25 tokens per input array. To watch a larger set, run multiple onPricesUpdated subscriptions on the same connection and add/remove tokens by closing and reopening individual subscriptions (you don’t need to drop the connection).For network-wide price streams, we offer a monthly flat-rate option with unlimited requests on Solana, Base, and other supported networks — contact us for details.