CoinGecko Global API

Global cryptocurrency and DeFi market data.

GitHub OpenAPI

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /global Get global crypto market data · Get global cryptocurrency data #
Ask an LLM
“What is the total crypto market cap and volume right now?”
“Which coins make up most of the crypto market cap?”
Tell an agent
Show the global crypto market data.
Get the total market cap and volume for all cryptocurrencies.
GET /global/decentralized_finance_defi Get global DeFi market data · Get global DeFi market data #
Ask an LLM
“What is the total DeFi market cap and volume?”
“How dominant are DeFi coins in the crypto market?”
Tell an agent
Show the global DeFi market data.
Get DeFi market cap, volume and dominance.
GET /global/market_cap_chart Get historical global market cap and volume · Global Market Cap Chart Data #
Ask an LLM
“How has the global crypto market cap changed over the last 30 days?”
“Can I get a market cap chart for a number of days back?”
Tell an agent
Get the global market cap and volume chart for {days} days.
Chart global crypto market cap in {vs_currency} for {days} days.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coingecko:coingecko-global-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coingecko-global-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CoinGecko Crypto Market Data Global API
  description: The CoinGecko Crypto Market Data API provides comprehensive and reliable cryptocurrency price and market data through RESTful JSON endpoints. It offers over 70 endpoints covering real-time and historical prices, trading volumes, market capitalization, OHLCV data, exchange information, NFT metrics, derivatives data, and public treasury holdings for over 18,000 coins. The Demo API plan provides free access with 30 calls per minute to a subset of 30 publicly accessible endpoints.
  version: 3.0.1
  contact:
    name: CoinGecko Support
    url: https://support.coingecko.com
  termsOfService: https://www.coingecko.com/en/terms
servers:
- url: https://api.coingecko.com/api/v3
  description: CoinGecko Demo API Server
security:
- demoApiKeyHeader: []
- demoApiKeyQuery: []
tags:
- name: Global
  description: Global cryptocurrency and DeFi market data.
paths:
  /global:
    get:
      operationId: getGlobal
      summary: Get global cryptocurrency data
      description: Get aggregated global cryptocurrency market data including total market cap, total volume, market cap percentage by coin, and number of active cryptocurrencies and markets.
      tags:
      - Global
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GlobalData'
  /global/decentralized_finance_defi:
    get:
      operationId: getGlobalDeFi
      summary: Get global DeFi market data
      description: Get aggregated global decentralized finance (DeFi) data including DeFi market cap, trading volume, DeFi dominance, and top DeFi coin information.
      tags:
      - Global
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GlobalDeFiData'
  /global/market_cap_chart:
    get:
      summary: Global Market Cap Chart Data
      description: To query historical global market cap and volume data by number of days away from now
      operationId: global-market-cap-chart
      x-mint:
        href: /reference/global-market-cap-chart
      parameters:
      - name: days
        in: query
        required: true
        description: Data up to number of days ago.
        schema:
          type: string
          default: '1'
          enum:
          - '1'
          - '7'
          - '14'
          - '30'
          - '90'
          - '180'
          - '365'
          - max
      - name: vs_currency
        in: query
        required: false
        description: "Target currency of market cap. \nDefault: `usd` \n*refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies)."
        schema:
          type: string
      responses:
        '200':
          description: Global market cap chart data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalMarketCapChart'
              example:
                market_cap_chart:
                  market_cap:
                  - - 1779796800798
                    - 2655918998143.8896
                  - - 1779800404411
                    - 2654923308819.0776
                  volume:
                  - - 1779796800798
                    - 72758388801.76349
                  - - 1779800404411
                    - 73764769476.6961
      tags:
      - Global
components:
  schemas:
    GlobalDeFiData:
      type: object
      properties:
        defi_market_cap:
          type: string
          description: Total DeFi market cap in USD
        eth_market_cap:
          type: string
          description: Ethereum market cap in USD
        defi_to_eth_ratio:
          type: string
          description: DeFi market cap as ratio of ETH market cap
        trading_volume_24h:
          type: string
          description: 24-hour DeFi trading volume in USD
        defi_dominance:
          type: string
          description: DeFi dominance percentage
        top_coin_name:
          type: string
          description: Top DeFi coin by market cap
        top_coin_defi_dominance:
          type: number
          description: Top DeFi coin market cap dominance
    GlobalData:
      type: object
      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 active markets
        total_market_cap:
          type: object
          description: Total market cap in various currencies
          additionalProperties:
            type: number
        total_volume:
          type: object
          description: Total 24h volume in various currencies
          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: 24-hour market cap change percentage in USD
        updated_at:
          type: integer
          description: Last update timestamp (UNIX)
    GlobalDeFi:
      type: object
      required:
      - data
      properties:
        data:
          type: object
          required:
          - defi_market_cap
          - eth_market_cap
          - defi_to_eth_ratio
          - trading_volume_24h
          - defi_dominance
          - top_coin_name
          - top_coin_defi_dominance
          properties:
            defi_market_cap:
              type: string
              description: DeFi market cap
            eth_market_cap:
              type: string
              description: ETH market cap
            defi_to_eth_ratio:
              type: string
              description: DeFi to ETH ratio
            trading_volume_24h:
              type: string
              description: DeFi trading volume in 24 hours
            defi_dominance:
              type: string
              description: DeFi dominance percentage
            top_coin_name:
              type: string
              description: DeFi top coin name
            top_coin_defi_dominance:
              type: number
              description: DeFi top coin dominance percentage
    GlobalMarketCapChart:
      type: object
      required:
      - market_cap_chart
      properties:
        market_cap_chart:
          type: object
          required:
          - market_cap
          - volume
          properties:
            market_cap:
              type: array
              description: Market cap data as [timestamp, market_cap] pairs
              items:
                type: array
                items:
                  type: number
            volume:
              type: array
              description: Volume data as [timestamp, volume] pairs
              items:
                type: array
                items:
                  type: number
    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:
    demoApiKeyHeader:
      type: apiKey
      in: header
      name: x-cg-demo-api-key
      description: CoinGecko Demo API key passed via request header. Obtain a free key from the CoinGecko developer dashboard.
    demoApiKeyQuery:
      type: apiKey
      in: query
      name: x_cg_demo_api_key
      description: CoinGecko Demo API key passed via query string parameter.
    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)
externalDocs:
  description: CoinGecko API Documentation
  url: https://docs.coingecko.com