> ## 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 Historical Data by ID

> To query the historical data (price, market cap, 24hrs volume, etc.) at a given date for a coin based on a particular coin ID

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

* 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).
* Data returned is a snapshot at `00:00:00 UTC` for the given date.

<Note>
  The last completed UTC day (00:00) becomes available 35 minutes after midnight (00:35 UTC).
</Note>

<Warning>
  Historical data via the Demo API is restricted to the past 365 days. Subscribe to a [paid plan](https://www.coingecko.com/en/api/pricing) for the full range.
</Warning>

<CacheInfo rate="30 minutes" />

#### SDK Examples

<CodeGroup>
  ```typescript TypeScript theme={null}
  const response = await client.coins.history.get('bitcoin', {
    date: '2025-12-30',
  });

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

  ```python Python theme={null}
  response = client.coins.history.get(
    "bitcoin",
    date="2025-12-30",
  )

  print(response.model_dump_json(indent=2))
  ```
</CodeGroup>


## OpenAPI

````yaml openapi-specs/demo-api.json get /coins/{id}/history
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:
  /coins/{id}/history:
    get:
      summary: Coin Historical Data by ID
      description: >-
        To query the historical data (price, market cap, 24hrs volume, etc.) at
        a given date for a coin based on a particular coin ID
      operationId: coins-id-history
      parameters:
        - name: id
          in: path
          required: true
          description: |-
            Coin ID. 
            *refers to [`/coins/list`](/reference/coins-list).
          schema:
            type: string
            default: bitcoin
        - name: date
          in: query
          required: true
          description: |-
            The date of data snapshot. 
            Format: `dd-mm-yyyy`
          schema:
            type: string
            default: 30-12-2025
        - name: localization
          in: query
          required: false
          description: |-
            Include all the localized languages in response. 
            Default: true
          schema:
            type: boolean
      responses:
        '200':
          description: Coin historical data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CoinsIdHistory'
              example:
                id: bitcoin
                symbol: btc
                name: Bitcoin
                localization:
                  en: Bitcoin
                  zh: 比特币
                  zh-tw: 比特幣
                  de: Bitcoin
                  fr: Bitcoin
                  es: Bitcoin
                  ja: ビットコイン
                  id: Bitcoin
                  ru: Биткоин
                  ko: 비트코인
                  ar: بيتكوين
                  th: บิตคอยน์
                  vi: Bitcoin
                  it: Bitcoin
                  pl: Bitcoin
                  tr: Bitcoin
                  hu: Bitcoin
                  nl: Bitcoin
                  ro: Bitcoin
                  sv: Bitcoin
                  cs: Bitcoin
                  da: Bitcoin
                  el: Bitcoin
                  hi: Bitcoin
                  'no': Bitcoin
                  sk: Bitcoin
                  uk: Bitcoin
                  he: Bitcoin
                  fi: Bitcoin
                  bg: Bitcoin
                  hr: Bitcoin
                  lt: Bitcoin
                  sl: Bitcoin
                  pt: Bitcoin
                image:
                  thumb: >-
                    https://coin-images.coingecko.com/coins/images/1/thumb/bitcoin.png?1696501400
                  small: >-
                    https://coin-images.coingecko.com/coins/images/1/small/bitcoin.png?1696501400
                market_data:
                  current_price:
                    aed: 155021.01870663263
                    ars: 34223222.03038811
                    aud: 61961.64079464181
                    bch: 162.9444394169128
                    bdt: 4640974.295329716
                    bhd: 15935.706731619232
                    bmd: 42208.202176186474
                    bnb: 135.24654224991627
                    brl: 204813.86598107114
                    btc: 1
                    cad: 55925.65684243621
                    chf: 35496.88698916195
                    clp: 37196103.56833302
                    cny: 298785.10989287664
                    czk: 944615.3438828368
                    dkk: 285068.92147269147
                    dot: 5160.299955562896
                    eos: 50098.037591566885
                    eth: 18.514283305187227
                    eur: 38240.20908960317
                    gbp: 33156.484386694596
                    gel: 113329.02284306048
                    hkd: 329606.38328597124
                    huf: 14657368.01641012
                    idr: 649885162.0865278
                    ils: 152105.57155771676
                    inr: 3513053.119048727
                    jpy: 5952559.440604322
                    krw: 54661344.54593342
                    kwd: 12984.298194449415
                    lkr: 13696906.151726862
                    ltc: 579.0962960970021
                    mmk: 88806742.41781776
                    mxn: 716452.3647481233
                    myr: 194052.20950501712
                    ngn: 37886364.22413555
                    nok: 429442.7101393702
                    nzd: 66802.583918633
                    php: 2338503.1911612307
                    pkr: 11792242.372501094
                    pln: 165880.09171330827
                    rub: 3767047.138041446
                    sar: 158357.45046405343
                    sek: 425811.11642413173
                    sgd: 55694.77797653248
                    sol: 416.5289478886034
                    thb: 1453127.860988517
                    try: 1243001.417432343
                    twd: 1295461.9075007213
                    uah: 1607901.3285893872
                    usd: 42208.202176186474
                    vef: 4226.30728390156
                    vnd: 1024346748.4635574
                    xag: 1773.9385614394023
                    xau: 20.435523165622502
                    xdr: 31508.676173736272
                    xlm: 327801.5907899002
                    xrp: 68792.39040895543
                    yfi: 5.23330767599715
                    zar: 772207.5004537676
                    bits: 999797.6500840397
                    link: 2828.6459350540995
                    sats: 99979765.00840396
                  market_cap:
                    aed: 3039570628249.035
                    ars: 671030943774608.1
                    aud: 1214911274669.9553
                    bch: 3192400331.4673758
                    bdt: 90997783863352.8
                    bhd: 312458958958.8847
                    bmd: 827596236151.1959
                    bnb: 2647323702.8955383
                    brl: 4015882597651.6562
                    btc: 19586150
                    cad: 1096560874919.1543
                    chf: 696004296621.9747
                    clp: 729321641896660.1
                    cny: 5858421340316.535
                    czk: 18521521005440.16
                    dkk: 5589481529435.656
                    dot: 101067225072.82333
                    eos: 981764701266.0074
                    eth: 362734483.2978319
                    eur: 749793913990.623
                    gbp: 650114912923.6271
                    gel: 2222095894065.9663
                    hkd: 6462748663878.865
                    huf: 287393965552690.7
                    idr: 12742606563251504
                    ils: 2982406073429.352
                    inr: 68882098474316.74
                    jpy: 116714655790049.02
                    krw: 1071770904156178.4
                    kwd: 254589292146.01266
                    lkr: 268561734299139.16
                    ltc: 11369266145.87004
                    mmk: 1741275912749029.8
                    mxn: 14047821273508.254
                    myr: 3804873695705.123
                    ngn: 742855909912170.9
                    nok: 8420286869134.373
                    nzd: 1309829942186.6091
                    php: 45852141040124.65
                    pkr: 231216088345279.94
                    pln: 3252489622308.595
                    rub: 73862279654407
                    sar: 3104989627928.0786
                    sek: 8349080488975.917
                    sgd: 1092033923507.4076
                    sol: 8167080608.685882
                    thb: 28493545024184.4
                    try: 24372118250940.145
                    twd: 25400735957660.043
                    uah: 31526883852775.1
                    usd: 827596236151.1959
                    vef: 82867211125.81927
                    vnd: 20084852465487144
                    xag: 34782454615.8709
                    xau: 400688993.6949639
                    xdr: 617805555864.2843
                    xlm: 6420377180809.443
                    xrp: 1347730925908.2449
                    yfi: 102656498.40039586
                    zar: 15141038659633.365
                    bits: 19587615789973.43
                    link: 55342736984.57576
                    sats: 1958761578997342.8
                  total_volume:
                    aed: 52093574029.40443
                    ars: 11500440167656.37
                    aud: 20821714040.129295
                    bch: 54756176.21574547
                    bdt: 1559562309933.2505
                    bhd: 5355066850.034618
                    bmd: 14183728910.169804
                    bnb: 45448519.30208316
                    brl: 68826062289.8161
                    btc: 335974.0074837291
                    cad: 18793369887.330444
                    chf: 11928445094.808254
                    clp: 12499453241945.738
                    cny: 100404347558.46667
                    czk: 317430434636.70953
                    dkk: 95795132093.1731
                    dot: 1734077546.3343449
                    eos: 16835045026.655567
                    eth: 6221576.893294353
                    eur: 12850316555.324738
                    gbp: 11141971510.468252
                    gel: 38083312123.805855
                    hkd: 110761590083.25078
                    huf: 4925491344396.748
                    idr: 218388713248196.1
                    ils: 51113861322.39222
                    inr: 1180533415747.48
                    jpy: 2000310012607.8845
                    krw: 18368507847565.402
                    kwd: 4363269605.991003
                    lkr: 4602735813129.19
                    ltc: 194600680.75008962
                    mmk: 29842795828917.508
                    mxn: 240758089534.80554
                    myr: 65209693664.5056
                    ngn: 12731409817077.545
                    nok: 144310789586.34262
                    nzd: 22448474276.294495
                    php: 785835302355.318
                    pkr: 3962688776849.6025
                    pln: 55742678701.03927
                    rub: 1265886075288.8472
                    sar: 53214755248.56654
                    sek: 143090421550.91183
                    sgd: 18715784890.19182
                    sol: 139971223.0203305
                    thb: 488312000734.88245
                    try: 417700689222.06055
                    twd: 435329617517.0529
                    uah: 540322387194.22906
                    usd: 14183728910.169804
                    vef: 1420216775.7753053
                    vnd: 344223535737756.94
                    xag: 596117871.9180025
                    xau: 6867194.189147832
                    xdr: 10588238733.815224
                    xlm: 110155103993.25989
                    xrp: 23117132839.969418
                    yfi: 1758611.2071300931
                    zar: 259494157157.33887
                    bits: 335974007483.7291
                    link: 950543853.0214615
                    sats: 33597400748372.91
                community_data:
                  facebook_likes: null
                  reddit_average_posts_48h: 0
                  reddit_average_comments_48h: 0
                  reddit_subscribers: null
                  reddit_accounts_active_48h: 0
                developer_data:
                  forks: null
                  stars: null
                  subscribers: null
                  total_issues: null
                  closed_issues: null
                  pull_requests_merged: null
                  pull_request_contributors: null
                  code_additions_deletions_4_weeks:
                    additions: null
                    deletions: null
                  commit_count_4_weeks: null
                public_interest_stats:
                  alexa_rank: null
                  bing_matches: null
components:
  schemas:
    CoinsIdHistory:
      type: object
      required:
        - id
        - symbol
        - name
        - image
        - market_data
        - community_data
        - developer_data
        - public_interest_stats
      properties:
        id:
          type: string
          description: Coin ID
        symbol:
          type: string
          description: Coin symbol
        name:
          type: string
          description: Coin name
        localization:
          type: object
          description: Localized coin names keyed by locale code
          additionalProperties:
            type: string
        image:
          type: object
          description: Coin image URLs
          properties:
            thumb:
              type: string
              description: Thumbnail image URL
            small:
              type: string
              description: Small image URL
        market_data:
          type: object
          description: Market data at the given date
          properties:
            current_price:
              type: object
              description: Current price keyed by currency
              additionalProperties:
                type: number
            market_cap:
              type: object
              description: Market capitalization keyed by currency
              additionalProperties:
                type: number
            total_volume:
              type: object
              description: Total trading volume keyed by currency
              additionalProperties:
                type: number
        community_data:
          type: object
          description: Community engagement data
          properties:
            facebook_likes:
              type: number
              nullable: true
              description: Number of Facebook likes
            reddit_average_posts_48h:
              type: number
              description: Average Reddit posts in 48 hours
            reddit_average_comments_48h:
              type: number
              description: Average Reddit comments in 48 hours
            reddit_subscribers:
              type: number
              nullable: true
              description: Number of Reddit subscribers
            reddit_accounts_active_48h:
              type: number
              description: Active Reddit accounts in 48 hours
        developer_data:
          type: object
          description: Developer activity data
          properties:
            forks:
              type: number
              nullable: true
              description: Repository forks
            stars:
              type: number
              nullable: true
              description: Repository stars
            subscribers:
              type: number
              nullable: true
              description: Repository subscribers
            total_issues:
              type: number
              nullable: true
              description: Total issues
            closed_issues:
              type: number
              nullable: true
              description: Closed issues
            pull_requests_merged:
              type: number
              nullable: true
              description: Pull requests merged
            pull_request_contributors:
              type: number
              nullable: true
              description: Pull request contributors
            code_additions_deletions_4_weeks:
              type: object
              description: Code additions and deletions in the last 4 weeks
              properties:
                additions:
                  type: number
                  nullable: true
                  description: Lines added
                deletions:
                  type: number
                  nullable: true
                  description: Lines deleted
            commit_count_4_weeks:
              type: number
              nullable: true
              description: Commit count in the last 4 weeks
        public_interest_stats:
          type: object
          description: Public interest statistics
          properties:
            alexa_rank:
              type: number
              nullable: true
              description: Alexa rank
            bing_matches:
              type: number
              nullable: true
              description: Bing search matches
  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)

````