> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coingecko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Coin Price by Token Addresses

> To query one or more token prices by using their token contract addresses

export const CacheInfo = ({publicRate, paidRate, rate}) => {
  const fmt = v => v === 0 ? 'Real-time (Cacheless)' : `Every ${v}`;
  if (rate !== undefined) {
    return <Callout icon="clock-rotate-left" color="#2196F3" iconType="regular">
        <strong>Cache / Update Frequency:</strong><br />{fmt(rate)}
      </Callout>;
  }
  if (publicRate !== undefined && paidRate !== undefined) {
    return <Callout icon="clock-rotate-left" color="#2196F3" iconType="regular">
        <strong>Cache / Update Frequency:</strong><ul><li>{fmt(paidRate)} (Paid API)</li><li>{fmt(publicRate)} (Demo / Keyless API)</li></ul>
      </Callout>;
  }
  return null;
};

#### Notes

* Returns the global average price aggregated across all active exchanges on CoinGecko.
* Find a token's contract address on its [CoinGecko](https://www.coingecko.com) page or via [Coins List](/demo/reference/coins-list) with `include_platform=true`.
* Maximum of **515** contract addresses per request.

<Tip>
  Cross-check prices on [CoinGecko](https://www.coingecko.com) and learn about the [price methodology](https://www.coingecko.com/en/methodology).
</Tip>

<CacheInfo paidRate="20 seconds" publicRate="60 seconds" />

#### SDK Examples

<CodeGroup>
  ```typescript TypeScript theme={null}
  const response = await client.simple.tokenPrice.getID('ethereum', {
    contract_addresses: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599',
    vs_currencies: 'usd',
  });

  console.log(JSON.stringify(response, null, 2));
  ```

  ```python Python theme={null}
  response = client.simple.token_price.get_id(
    "ethereum",
    contract_addresses="0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
    vs_currencies="usd",
  )

  print(response)
  ```
</CodeGroup>


## OpenAPI

````yaml openapi-specs/demo-api.json get /simple/token_price/{id}
openapi: 3.0.0
info:
  title: CoinGecko Demo API
  version: 3.0.0
servers:
  - url: https://api.coingecko.com/api/v3
security:
  - headerAuth: []
  - queryAuth: []
paths:
  /simple/token_price/{id}:
    get:
      summary: Coin Price by Token Addresses
      description: >-
        To query one or more token prices by using their token contract
        addresses
      operationId: simple-token-price
      parameters:
        - name: id
          in: path
          required: true
          description: |-
            Asset platform's ID. 
            *refers to [`/asset_platforms`](/reference/asset-platforms-list)
          schema:
            type: string
            default: ethereum
        - name: contract_addresses
          in: query
          required: true
          description: >-
            Token contract addresses, comma-separated if querying more than 1
            token
          schema:
            type: string
            default: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'
        - name: vs_currencies
          in: query
          required: true
          description: >-
            Target currency of coins, comma-separated if querying more than 1
            currency. 

            *refers to
            [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies)
          schema:
            type: string
            default: usd
        - name: include_market_cap
          in: query
          required: false
          description: |-
            Include market capitalization. 
            Default: false
          schema:
            type: boolean
        - name: include_24hr_vol
          in: query
          required: false
          description: |-
            Include 24-hour trading volume. 
            Default: false
          schema:
            type: boolean
        - name: include_24hr_change
          in: query
          required: false
          description: |-
            Include 24-hour change percentage. 
            Default: false
          schema:
            type: boolean
        - name: include_last_updated_at
          in: query
          required: false
          description: |-
            Include last updated price time as a UNIX timestamp. 
            Default: false
          schema:
            type: boolean
        - name: precision
          in: query
          required: false
          description: Decimal places for currency price value
          schema:
            type: string
            enum:
              - full
              - '0'
              - '1'
              - '2'
              - '3'
              - '4'
              - '5'
              - '6'
              - '7'
              - '8'
              - '9'
              - '10'
              - '11'
              - '12'
              - '13'
              - '14'
              - '15'
              - '16'
              - '17'
              - '18'
      responses:
        '200':
          description: Token prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimplePrice'
              example:
                '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599':
                  usd: 76721
                  usd_market_cap: 9008047197.715635
                  usd_24h_vol: 181232010.10689816
                  usd_24h_change: -1.6069562341774564
                  last_updated_at: 1779094527
components:
  schemas:
    SimplePrice:
      type: object
      additionalProperties:
        type: object
        properties:
          usd:
            type: number
            description: Price in the target currency
          usd_market_cap:
            type: number
            description: Market capitalization in the target currency
          usd_24h_vol:
            type: number
            description: 24-hour trading volume in the target currency
          usd_24h_change:
            type: number
            description: 24-hour price change percentage in the target currency
          last_updated_at:
            type: number
            description: Last updated timestamp in UNIX seconds
  securitySchemes:
    headerAuth:
      type: apiKey
      in: header
      name: x-cg-demo-api-key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)
    queryAuth:
      type: apiKey
      in: query
      name: x_cg_demo_api_key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)

````