> ## 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.

# Total Supply Chart by ID

> To query historical total supply of a coin by number of days away from now based on provided 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;
};

export const PlanExclusivity = ({tier}) => {
  if (tier === "enterprise") {
    return <Callout icon="crown" color="#FFC107" iconType="regular">
        <strong>Enterprise Only</strong><br />This endpoint is exclusively available to <strong>Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/enterprise">→ Contact sales</a>
      </Callout>;
  }
  if (tier === "analyst_above") {
    return <Callout icon="briefcase" color="#FFC107" iconType="regular">
        <strong>Analyst Plan and Above</strong><br />This endpoint is only available to <strong>Analyst, Lite, Pro, and Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/pricing">→ View pricing</a>
      </Callout>;
  }
  if (tier === "basic_above") {
    return <Callout icon="briefcase" color="#FFC107" iconType="regular">
        <strong>Basic Plan and Above</strong><br />This endpoint is only available to <strong>Basic, Analyst, Lite, Pro, and Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/pricing">→ View pricing</a>
      </Callout>;
  }
  throw new Error(`PlanExclusivity: invalid tier "${tier}". Use "basic_above", "analyst_above", or "enterprise".`);
};

#### Notes

* Auto-granularity when `interval` is not specified:
  * 1 day = **5-minutely** data
  * 2–90 days = **hourly** data
  * 91 days and above = **daily** data (00:00 UTC)
* Data availability:
  * Full coverage for all coins starts from **27 July 2023**
  * Patched historical data from June 2019 is available for select coins only and may contain inaccuracies

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

<PlanExclusivity tier="enterprise" />

<CacheInfo rate="30 seconds" />

#### SDK Examples

<CodeGroup>
  ```typescript TypeScript theme={null}
  const response = await client.coins.totalSupplyChart.get('bitcoin', {
    days: '1',
  });

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

  ```python Python theme={null}
  response = client.coins.total_supply_chart.get(
    "bitcoin",
    days="1",
  )

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


## OpenAPI

````yaml openapi-specs/pro-api.json get /coins/{id}/total_supply_chart
openapi: 3.0.0
info:
  title: CoinGecko Pro API
  version: 3.0.0
servers:
  - url: https://pro-api.coingecko.com/api/v3
security:
  - headerAuth: []
  - queryAuth: []
paths:
  /coins/{id}/total_supply_chart:
    get:
      summary: Total Supply Chart by ID
      description: >-
        To query historical total supply of a coin by number of days away from
        now based on provided coin ID
      operationId: coins-id-total-supply-chart
      parameters:
        - name: id
          in: path
          required: true
          description: |-
            Coin ID. 
            *refers to [`/coins/list`](/reference/coins-list).
          schema:
            type: string
            default: bitcoin
        - name: days
          in: query
          required: true
          description: |-
            Data up to number of days ago. 
            Valid values: any integer or `max`.
          schema:
            type: string
            default: '1'
        - name: interval
          in: query
          required: false
          description: Data interval.
          schema:
            type: string
            enum:
              - daily
      responses:
        '200':
          description: Historical total supply chart data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalSupplyChart'
              example:
                total_supply:
                  - - 1779700797940
                    - '20034078.0'
                  - - 1779701097614
                    - '20034078.0'
                  - - 1779701399178
                    - '20034078.0'
components:
  schemas:
    TotalSupplyChart:
      type: object
      required:
        - total_supply
      properties:
        total_supply:
          type: array
          description: Total supply data points as [timestamp, supply] pairs
          items:
            type: array
            items:
              oneOf:
                - type: number
                - type: string
  securitySchemes:
    headerAuth:
      type: apiKey
      in: header
      name: x-cg-pro-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_pro_api_key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)

````