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

# Crypto Treasury Holdings Historical Chart Data by ID

> This endpoint allows you to **query historical cryptocurrency holdings chart of public companies & governments** by Entity ID and Coin ID

<Tip>
  ### Tips

  * You may obtain the entity ID and coin ID (API IDs) via several ways:
    * For `entity_id`:
      * Refer to respective public treasury entity page and find 'API ID'.
      * Refer to [`/entities/list`](/v3.0.1/reference/entities-list) endpoint.
    * For `coin_id`:
      * Refer to respective coin page and find 'API ID'.
      * Refer to [`/coins/list`](/v3.0.1/reference/coins-list) endpoint.
      * Refer to Google Sheets [here](https://docs.google.com/spreadsheets/d/1wTTuxXt8n9q7C4NDXqQpI3wpKu1_5bGVmP9Xz0XGSyU/edit?usp=sharing).
</Tip>

<Note>
  ### Note

  * Data available from August 2020 onwards.
  * Different API plans can access up to different historical periods via `days` param:

    | Plan              | Maximum period | `days` value availability           |
    | ----------------- | -------------- | ----------------------------------- |
    | Public/Demo       | 1 year         | `7, 14, 30, 90, 180, 365`           |
    | Basic             | 2 years        | `7, 14, 30, 90, 180, 365, 730`      |
    | Analyst and above | Full           | `7, 14, 30, 90, 180, 365, 730, max` |

    * To access longer historical periods, check out [our API plans here](https://www.coingecko.com/en/api/pricing).
  * For `include_empty_intervals` param:
    * When `false` (default): Only intervals with transaction data are returned.
    * When `true`: All requested intervals are returned, populated with the most recent available transaction data.
  * CoinGecko equivalent page: [https://www.coingecko.com/en/treasuries/companies/strategy](https://www.coingecko.com/en/treasuries/companies/strategy).
  * Cache / Update Frequency: every 5 minutes for all the API plans.
</Note>


## OpenAPI

````yaml api-reference/coingecko-demo.json get /public_treasury/{entity_id}/{coin_id}/holding_chart
openapi: 3.0.0
info:
  title: CoinGecko Demo API
  version: 3.0.0
servers:
  - url: https://api.coingecko.com/api/v3
security:
  - apiKeyAuth: []
  - apiKeyQueryParam: []
paths:
  /public_treasury/{entity_id}/{coin_id}/holding_chart:
    get:
      tags:
        - Public Treasury
      summary: Crypto Treasury Holdings Historical Chart Data by ID
      description: >-
        This endpoint allows you to **query historical cryptocurrency holdings
        chart of public companies & governments** by Entity ID and Coin ID
      operationId: public-treasury-entity-chart
      parameters:
        - name: entity_id
          in: path
          description: |-
            public company or government entity ID 
             *refers to [`/entities/list`](/v3.0.1/reference/entities-list).
          required: true
          schema:
            type: string
            example: strategy
            default: strategy
        - name: coin_id
          in: path
          description: 'coin ID. example: bitcoin, ethereum, solana, binancecoin'
          required: true
          schema:
            type: string
            example: bitcoin
            default: bitcoin
        - name: days
          in: query
          description: |-
            data up to number of days ago 
             Valid values: `7, 14, 30, 90, 180, 365`
          required: true
          schema:
            type: string
            default: '365'
        - name: include_empty_intervals
          in: query
          required: false
          description: 'include empty intervals with no transaction data, default: false'
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: >-
            Get public companies & governments crypto treasury holding
            historical chart data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTreasuryEntityChart'
components:
  schemas:
    PublicTreasuryEntityChart:
      type: object
      properties:
        holdings:
          type: array
          items:
            type: array
            items:
              type: number
        holding_value_in_usd:
          type: array
          items:
            type: array
            items:
              type: number
      example:
        holdings:
          - - 1733097600000
            - 402100
          - - 1733616000000
            - 423650
        holding_value_in_usd:
          - - 1733097600000
            - 39129037461.438065
          - - 1733616000000
            - 42272572276.103065
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-cg-demo-api-key
    apiKeyQueryParam:
      type: apiKey
      in: query
      name: x_cg_demo_api_key

````