> ## 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 by Entity ID

> This endpoint allows you to **query public companies & governments' cryptocurrency holdings** by Entity ID

<Note>
  ### Note

  * CoinGecko equivalent page: [https://www.coingecko.com/en/treasuries/bitcoin](https://www.coingecko.com/en/treasuries/bitcoin).
  * Cache / Update Frequency: every 5 minutes for all the API plans.
</Note>


## OpenAPI

````yaml api-reference/coingecko-demo.json get /public_treasury/{entity_id}
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}:
    get:
      tags:
        - Public Treasury
      summary: Crypto Treasury Holdings by Entity ID
      description: >-
        This endpoint allows you **query public companies & governments'
        cryptocurrency holdings** by Entity ID
      operationId: public-treasury-entity
      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: holding_amount_change
          in: query
          description: >-
            include holding amount change for specified timeframes,
            comma-separated if querying more than 1 timeframe 
             Valid values: 7d, 14d, 30d, 90d, 1y, ytd
          required: false
          schema:
            type: string
          examples:
            one value:
              value: 7d
            multiple values:
              value: 7d,30d,1y
        - name: holding_change_percentage
          in: query
          description: >-
            include holding change percentage for specified timeframes,
            comma-separated if querying more than 1 timeframe 
             Valid values: 7d, 14d, 30d, 90d, 1y, ytd
          required: false
          schema:
            type: string
          examples:
            one value:
              value: 30d
            multiple values:
              value: 7d,30d,90d,1y
      responses:
        '200':
          description: Get public companies & governments crypto treasury holding data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTreasuryEntity'
components:
  schemas:
    PublicTreasuryEntity:
      type: object
      properties:
        name:
          type: string
          description: entity name
        id:
          type: string
          description: entity ID
        type:
          type: string
          description: 'entity type: company or government'
        symbol:
          type: string
          nullable: true
          description: stock market symbol for public company
        country:
          type: string
          description: country code of company or government location
        website_url:
          type: string
          description: official website URL of the entity
        twitter_screen_name:
          type: string
          description: official Twitter handle of the entity
          nullable: true
        total_treasury_value_usd:
          type: number
          description: total current value of all holdings in USD
        unrealized_pnl:
          type: number
          nullable: true
          description: unrealized profit and loss (current value - total entry value)
        m_nav:
          type: number
          description: market to net asset value ratio
          nullable: true
        total_asset_value_per_share_usd:
          type: number
          description: total asset value per share in USD
          nullable: true
        holdings:
          type: array
          description: list of cryptocurrency assets held by the entity
          items:
            type: object
            properties:
              coin_id:
                type: string
                description: coin ID
              amount:
                type: number
                description: amount of the cryptocurrency held
              percentage_of_total_supply:
                type: number
                description: percentage of total crypto supply
              amount_per_share:
                type: number
                description: amount of cryptocurrency per share
                nullable: true
              entity_value_usd_percentage:
                type: number
                description: percentage of entity's total treasury value
              current_value_usd:
                type: number
                description: current value of holdings in USD
              total_entry_value_usd:
                type: number
                nullable: true
                description: total entry cost/purchase value in USD
              average_entry_value_usd:
                type: number
                nullable: true
                description: average entry cost per unit in USD
              unrealized_pnl:
                type: number
                nullable: true
                description: unrealized profit and loss for this holding
              holding_amount_change:
                type: object
                description: >-
                  holding amount changes over different timeframes (only present
                  if holding_amount_change param is used)
                properties:
                  7d:
                    type: number
                  14d:
                    type: number
                  30d:
                    type: number
                  90d:
                    type: number
                  1y:
                    type: number
                  ytd:
                    type: number
              holding_change_percentage:
                type: object
                description: >-
                  holding change percentages over different timeframes (only
                  present if holding_change_percentage param is used)
                properties:
                  7d:
                    type: number
                  14d:
                    type: number
                  30d:
                    type: number
                  90d:
                    type: number
                  1y:
                    type: number
                  ytd:
                    type: number
      example:
        name: Strategy
        id: strategy
        type: company
        symbol: MSTR.US
        country: US
        website_url: https://www.strategy.com/
        twitter_screen_name: Strategy
        total_treasury_value_usd: 48119580010.663155
        unrealized_pnl: -6554973853.336845
        m_nav: 0.99
        total_asset_value_per_share_usd: 150.46302495438903
        holdings:
          - coin_id: bitcoin
            amount: 714644
            percentage_of_total_supply: 3.403
            amount_per_share: 0.0022345892873893874
            entity_value_usd_percentage: 100
            current_value_usd: 48119580010.663155
            total_entry_value_usd: 54674553864
            average_entry_value_usd: 76506
            unrealized_pnl: -6554973853.336845
            holding_amount_change:
              7d: 1142
              14d: 1997
              30d: 27234
              90d: 72952
              1y: 235904
              ytd: 42144
            holding_change_percentage:
              7d: 0.16
              14d: 0.28
              30d: 3.962
              90d: 11.369
              1y: 49.276
              ytd: 6.267
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-cg-demo-api-key
    apiKeyQueryParam:
      type: apiKey
      in: query
      name: x_cg_demo_api_key

````