Skip to main content

Overview

Fetch current or historical USD prices for multiple tokens in a single request. Supports batching, preserves input order, and allows historical queries via timestamp or block number.

Returns

getTokenPrices
[Price!]!
List of token prices matching the order of the input. See Price.

Arguments

inputs
[GetPriceInput!]!
required
Array of price queries. Response preserves the same order. See GetPriceInput.

Example

query GetTokenPrices {
  getTokenPrices(inputs: [
    { address: "0xdac17f958d2ee523a2206206994597c13d831ec7", networkId: 1 },
    { address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", networkId: 1 },
    { address: "So11111111111111111111111111111111111111112", networkId: 1399811149}
  ]) {
    address
    priceUsd
  }
}

Playground