Live-streamed price updates for many tokens.
This endpoint is available on Codex Growth and Enterprise Plans
Endpoint: onPricesUpdated
Method: POST
Arguments
| Name | Type | Description |
|---|---|---|
| input | ! | Required |
Response
| Name | Type | Description |
|---|---|---|
| address | String! | The contract address of the token. |
| confidence | Float | Ratio of how confident we are in the price |
| networkId | Int! | The network ID the token is deployed on. |
| poolAddress | String! | The pool that emitted the swap generating this price |
| priceUsd | Float! | The token price in USD. |
| timestamp | Int | The unix timestamp for the price. |
Example
Query
subscription OnPricesUpdated($input: [OnPricesUpdatedInput!]!) {
onPricesUpdated(input: $input) {
address
networkId
priceUsd
}
}Response
{
"id": "661144c5fd3a444ffdfs8b9518ddb8f94dec",
"type": "data",
"payload": {
"data": {
"onPricesUpdated": {
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"networkId": 1,
"priceUsd": 2368.057616720742
}
}
}Ask questions, share what you're working on and request new features 👬👭