> ## 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 Global Market Data

> To query cryptocurrency global data including active cryptocurrencies, markets, total crypto market cap and etc

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;
};

<CacheInfo rate="10 minutes" />

#### SDK Examples

<CodeGroup>
  ```typescript TypeScript theme={null}
  const response = await client.global.get();

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

  ```python Python theme={null}
  response = client.global_.get()

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


## OpenAPI

````yaml openapi-specs/demo-api.json get /global
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:
  /global:
    get:
      summary: Crypto Global Market Data
      description: >-
        To query cryptocurrency global data including active cryptocurrencies,
        markets, total crypto market cap and etc
      operationId: crypto-global
      responses:
        '200':
          description: Cryptocurrency global market data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Global'
              example:
                data:
                  active_cryptocurrencies: 17397
                  upcoming_icos: 0
                  ongoing_icos: 49
                  ended_icos: 3376
                  markets: 1476
                  total_market_cap:
                    btc: 34570737.199462704
                    eth: 1259418635.423994
                    usd: 2621040321355.0405
                  total_volume:
                    btc: 1254779.1727158197
                    eth: 45711847.69194817
                    usd: 95133256404.37308
                  market_cap_percentage:
                    btc: 57.9539332566265
                    eth: 9.58227145398409
                    usdt: 7.223241338072757
                  market_cap_change_percentage_24h_usd: -1.6081983639177684
                  volume_change_percentage_24h_usd: 33.064521460740046
                  updated_at: 1779878351
components:
  schemas:
    Global:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - active_cryptocurrencies
            - upcoming_icos
            - ongoing_icos
            - ended_icos
            - markets
            - total_market_cap
            - total_volume
            - market_cap_percentage
            - market_cap_change_percentage_24h_usd
            - volume_change_percentage_24h_usd
            - updated_at
          properties:
            active_cryptocurrencies:
              type: integer
              description: Number of active cryptocurrencies
            upcoming_icos:
              type: integer
              description: Number of upcoming ICOs
            ongoing_icos:
              type: integer
              description: Number of ongoing ICOs
            ended_icos:
              type: integer
              description: Number of ended ICOs
            markets:
              type: integer
              description: Number of exchanges
            total_market_cap:
              type: object
              description: Total cryptocurrency market cap by currency
              additionalProperties:
                type: number
            total_volume:
              type: object
              description: Total cryptocurrency volume by currency
              additionalProperties:
                type: number
            market_cap_percentage:
              type: object
              description: Market cap percentage by coin
              additionalProperties:
                type: number
            market_cap_change_percentage_24h_usd:
              type: number
              description: Market cap change percentage in 24 hours in USD
            volume_change_percentage_24h_usd:
              type: number
              description: Volume change percentage in 24 hours in USD
            updated_at:
              type: integer
              description: Last updated time in UNIX timestamp
  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)

````