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

# Global DeFi Market Data

> To query top 100 cryptocurrency global decentralized finance (DeFi) data including DeFi market cap, trading volume

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="60 minutes" />

#### SDK Examples

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

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

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

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


## OpenAPI

````yaml openapi-specs/demo-api.json get /global/decentralized_finance_defi
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/decentralized_finance_defi:
    get:
      summary: Global DeFi Market Data
      description: >-
        To query top 100 cryptocurrency global decentralized finance (DeFi) data
        including DeFi market cap, trading volume
      operationId: global-defi
      responses:
        '200':
          description: Global decentralized finance (DeFi) market data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalDeFi'
              example:
                data:
                  defi_market_cap: '93264745839.10368680452390205264'
                  eth_market_cap: '250923489878.18163813287624277972'
                  defi_to_eth_ratio: >-
                    37.1685990356589832537094209337357070624927603988429231656080063710045566
                  trading_volume_24h: '3779246981.777563895687957584391'
                  defi_dominance: >-
                    3.5568819863542411077651904276222133821656380942701140395041020219966392
                  top_coin_name: Lido Staked Ether
                  top_coin_defi_dominance: 19.77898778734103
components:
  schemas:
    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
  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)

````