Live-streamed stat updates for a given token within a pair.
This endpoint is available on Codex Growth and Enterprise Plans
Endpoint: onPairMetadataUpdated
Method: POST
Arguments
Name | Type | Description |
---|---|---|
id | String | The ID of the pair ( |
quoteToken | QuoteToken | The token of interest within the pair. Can be |
Response
Name | Type | Description |
---|---|---|
createdAt | Int | The unix timestamp for the creation of the pair. |
enhancedToken0 | EnhancedToken | Token metadata for the first token in the pair. |
enhancedToken1 | EnhancedToken | Token metadata for the second token in the pair. |
exchangeId | String | The exchange contract ID. |
fee | Int | The exchange fee for swaps. |
highPrice1 | String | The highest price in USD in the past hour. |
highPrice1w | String | The highest price in USD in the past week. |
highPrice4 | String | The highest price in USD in the past 4 hours. |
highPrice5m | String | The highest price in USD in the past 5 minutes. |
highPrice12 | String | The highest price in USD in the past 12 hours. |
highPrice24 | String | The highest price in USD in the past 24 hours. |
id | String! | The ID for the pair (address:networkId ). |
liquidity | String! | The total liquidity in the pair. |
liquidityToken | String | The token with higher liquidity within the pair. Can be token0 or token1 . |
lowPrice1 | String | The lowest price in USD in the past hour. |
lowPrice1w | String | The lowest price in USD in the past week. |
lowPrice4 | String | The lowest price in USD in the past 4 hours. |
lowPrice5m | String | The lowest price in USD in the past 5 minutes. |
lowPrice12 | String | The lowest price in USD in the past 12 hours. |
lowPrice24 | String | The lowest price in USD in the past 24 hours. |
networkId | Int | The network ID the pair is deployed on. |
nonLiquidityToken | String | The token with lower liquidity within the pair. Can be token0 or token1 . |
pairAddress | String! | The contract address of the pair. |
price | String! | The quote token price in USD. |
priceChange1 | Float | The percent price change in the past hour. Decimal format. |
priceChange1w | Float | The percent price change in the past week. Decimal format. |
priceChange4 | Float | The percent price change in the past 4 hours. Decimal format. |
priceChange5m | Float | The percent price change in the past 5 minutes. Decimal format. |
priceChange12 | Float | The percent price change in the past 12 hours. Decimal format. |
priceChange24 | Float | The percent price change in the past 24 hours. Decimal format. |
quoteToken | QuoteToken | The token of interest within the pair. Can be token0 or token1 . |
statsType | TokenPairStatisticsType! | The type of statistics returned. Can be FILTERED or UNFILTERED |
tickSpacing | Int | The amount of required tick separation. Only applicable for pairs on UniswapV3. |
token0 | PairMetadataToken! | Pair metadata for the first token in the pair. |
token1 | PairMetadataToken! | Pair metadata for the second token in the pair. |
volume1 | String | The trade volume in USD in the past hour. |
volume1w | String | The trade trade volume in USD in the past week. |
volume4 | String | The trade volume in USD in the past 4 hours. |
volume5m | String | The trade volume in USD in the past 5 minutes. |
volume12 | String | The trade volume in USD in the past 12 hours. |
volume24 | String | The trade volume in USD in the past 24 hours. |
Example
Query
subscription OnPairMetadataUpdated($id: String) {
onPairMetadataUpdated(id: $id) {
...
}
}
Response
Ask questions, share what you're working on and request new features đŦđ