> ## 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 IDs, Symbols, or Names

> To query the prices of one or more coins by using their unique Coin API IDs, symbols, or names

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

* You can look up coins by `ids`, `names`, or `symbols`. When multiple are provided, priority is: `ids` > `names` > `symbols`.
* Find a coin's API ID on its [CoinGecko](https://www.coingecko.com) page, via [Coins List](/demo/reference/coins-list), or this [Google Sheet](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?usp=sharing).
* Use `include_last_updated_at=true` or `include_24hr_change=true` (returns `null` if stale) to verify price freshness.
* `include_tokens=all` only works with `symbols` lookups, limited to 50 symbols per request.
* Maximum of **515** IDs per request. Wildcard searches are not supported.
* URL-encode spaces in `names` (e.g. `Binance%20Coin`).

<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.price.get({
    vs_currencies: 'usd',
    ids: 'bitcoin',
  });

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

  ```python Python theme={null}
  response = client.simple.price.get(
    vs_currencies="usd",
    ids="bitcoin",
  )

  print(response)
  ```
</CodeGroup>


## OpenAPI

````yaml openapi-specs/demo-api.json get /simple/price
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/price:
    get:
      summary: Coin Price by IDs, Symbols, or Names
      description: >-
        To query the prices of one or more coins by using their unique Coin API
        IDs, symbols, or names
      operationId: simple-price
      parameters:
        - 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: ids
          in: query
          required: false
          description: |-
            Coins' IDs, comma-separated if querying more than 1 coin. 
            *refers to [`/coins/list`](/reference/coins-list)
          schema:
            type: string
            default: bitcoin
        - name: names
          in: query
          required: false
          description: Coins' names, comma-separated if querying more than 1 coin.
          schema:
            type: string
            default: Bitcoin
        - name: symbols
          in: query
          required: false
          description: Coins' symbols, comma-separated if querying more than 1 coin.
          schema:
            type: string
            default: btc
        - name: include_tokens
          in: query
          required: false
          description: >-
            For `symbols` lookups, specify `all` to include all matching
            tokens. 

            Default `top` returns top-ranked tokens by market cap or volume.
          schema:
            type: string
            enum:
              - top
              - all
        - 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: Coin prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimplePrice'
              example:
                bitcoin:
                  usd: 76975
                  usd_market_cap: 1542226908349.8406
                  usd_24h_vol: 29096603418.89408
                  usd_24h_change: -1.4093297098441402
                  last_updated_at: 1779092258
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)

````