Skip to main content
Subscriptions (WebSockets) require a Growth or Enterprise plan. Learn more.

Returns

Price
Price!
required

Arguments

subscription {
  onPricesUpdated(
    input: [
      { address: "So11111111111111111111111111111111111111112", networkId: 1399811149 }
      { address: "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn", networkId: 1399811149 }
    ]
  ) {
    address
    networkId
    priceUsd
    timestamp
    blockNumber
  }
}
Example Response
{
  "data": {
    "onPricesUpdated": {
      "address": "So11111111111111111111111111111111111111112",
      "networkId": 1399811149,
      "priceUsd": 126.5510281931495,
      "timestamp": 1769560979,
      "blockNumber": 396375165
    }
  }
}
We offer a monthly flat-rate option with unlimited requests to receive ALL price updates across an entire network. Supported on Solana, Base and more. Contact us for more information.

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 Price object for whichever token’s price changed — not a batch of all tokens at once
  • Optionally include sourcePairAddress per token to override the default pricing pool
  • Recommended: ~25 tokens per subscription. You may have multiple subscriptions on a connection
  • There is no “hard limit” on how many subscriptions you can have open on a connection, but we generally recommend ~20-30
  • 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

On chains with sub-second block times (like BSC), multiple price updates can occur within a single second. Since blockchain timestamps only have 1-second precision, multiple different prices can validly exist for the same timestamp.To workaround this, we’ve added a blockNumber input and response field. This will give you pricing accuracy down to the blocknumber if blockchain timestamps are causing unexpected pricing discrepancies.
 
Yes. You should be able to use shouldResubscribe for this. (https://www.apollographql.com/docs/react/data/subscriptions#options)
Use 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.
No. Each message contains a single Price object for whichever token’s price just changed. High-volume tokens will produce updates more frequently than low-volume ones.