Skip to main content

Example

Usage Guidelines

  • Prices returns are aggregate values weighted across all valid pools. Provide a pool address if you want prices only from a specific pool.
  • We recommend getDetailedPairStats for the most accurate historical price and volume data

Troubleshooting Tips

Yes. We added a deprecated value to that field (along with deprecating confidence). It returns null if no pool is specified in the input as the expected behavior is an aggregated price across all pools, not one specific pool. The previous default would be to use the top-pair if no pool was specified.
Unfortunately not. getTokenPrices was built to be as fast as possible, so we don’t want to slow it down by adding additional data points to it. Our team is happy to discuss options of how to obtain all the data you need in as few queries as possible.
Returns: [Price]

Arguments

inputs
[GetPriceInput]
A list of GetPriceInputs. Accepts a maximum of 25 inputs (anything over will be truncated).

Schema

"""Returns real-time or historical prices for a list of tokens, fetched in batches."""
getTokenPrices(inputs: [GetPriceInput]): [Price]