> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cryptoquant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Base Fee

> The base fee per gas — the portion of the fee that is burnt rather than paid to the block producer, introduced by the London upgrade.

## What it measures

The base fee per gas — the portion of the fee that is burnt rather than paid to the block producer, introduced by the London upgrade. Reported as the mean over the blocks in the window, in Gwei.

## Assets and windows

| Asset class | What it covers | Assets | Windows |
| - | - | - | - |
| **Native ETH** | the native asset, `asset=eth` | `eth` | `block` · `10min` · `hour` · `day` |

The default window is `day`.

## Response fields

The time key depends on the window: `datetime` for `day`, `10min`, and `hour` and `blockheight` plus `datetime` for `block`.

| Field | Type | Description |
| - | - | - |
| `base_fee_mean` | number | The mean base fee per gas over the blocks in the window, in Gwei. |


## OpenAPI

````yaml openapi/v2-onchain.json GET /network/base-fee
openapi: 3.0.0
info:
  version: 2.0.0-beta
  title: CryptoQuant Data API v2 — On-chain
  description: >-
    On-chain endpoints of the CryptoQuant Data API v2 — network activity,
    exchange and mining pool flows, indicators, and capitalization, for Bitcoin
    and for Ethereum with the ERC-20 and stablecoin assets issued on it. One
    path serves every asset: the asset is a query parameter, not part of the
    path. Built on the v1 conventions: the `status`/`result` envelope, Bearer
    token authentication, and the `window`/`from`/`to` time parameters.
  termsOfService: https://cryptoquant.com/terms-of-service
  contact:
    name: API Support
    email: contact@cryptoquant.com
servers:
  - url: https://api.cryptoquant.com/v2
    description: Default server
security: []
tags:
  - name: Network Data
  - name: Exchange Flows
  - name: Mining Pool Flows
  - name: Inter-Entity Flows
  - name: Indicator
  - name: Market Data
paths:
  /network/base-fee:
    get:
      tags:
        - Network Data
      summary: Base Fee
      description: >-
        The base fee per gas — the portion of the fee that is burnt rather than
        paid to the block producer, introduced by the London upgrade. Reported
        as the mean over the blocks in the window, in Gwei.
      operationId: V2NetworkBaseFee
      parameters:
        - name: asset
          in: query
          required: true
          description: >-
            Asset to query, by its CryptoQuant alias (no chain suffix — `usdt`,
            not `usdt_eth`). 1 asset is available on this endpoint, across the
            asset class `eth`. Enumerate them with `/v2/discovery/endpoints`.
          schema:
            type: string
          example: eth
        - name: chain
          in: query
          required: false
          description: >-
            Chain the asset lives on. Optional for an asset that exists on
            exactly one chain, required when the same alias exists on several.
          schema:
            type: string
            enum:
              - ethereum
        - name: window
          in: query
          required: false
          description: >-
            Aggregation window. Which windows are valid depends on the asset —
            see the endpoint page. Defaults to `day`.
          schema:
            type: string
            enum:
              - block
              - 10min
              - hour
              - day
            default: day
        - name: from
          in: query
          required: false
          description: >-
            Inclusive start time, `YYYYMMDDTHHMMSS` (UTC). If `window=day`,
            `YYYYMMDD` is also accepted.
          schema:
            type: string
        - name: to
          in: query
          required: false
          description: >-
            Inclusive end time, `YYYYMMDDTHHMMSS` (UTC). If `window=day`,
            `YYYYMMDD` is also accepted.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Maximum rows returned (default 100, max 10000).
          schema:
            type: integer
            default: 100
            maximum: 10000
        - name: format
          in: query
          required: false
          description: 'Response format: `json` (default) or `csv`.'
          schema:
            type: string
            enum:
              - json
              - csv
            default: json
      responses:
        '200':
          description: Base Fee time-series.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - result
                properties:
                  status:
                    $ref: '#/components/schemas/Status'
                  result:
                    type: object
                    properties:
                      window:
                        type: string
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            datetime:
                              type: string
                              description: >-
                                Interval start, `YYYY-MM-DD HH:MM:SS` (UTC).
                                Present for every window.
                            base_fee_mean:
                              type: number
                              description: >-
                                The mean base fee per gas over the blocks in the
                                window, in Gwei.
                            blockheight:
                              type: integer
                              description: >-
                                Block height. Present only when `window` is
                                `block`.
      security:
        - AccessToken: []
      x-codeSamples:
        - lang: Shell
          source: >-
            curl -X GET
            "https://api.cryptoquant.com/v2/network/base-fee?asset=eth&window=day"
            \

            -H "Authorization: Bearer <YOUR_API_KEY>"
        - lang: JavaScript
          source: >-
            fetch("https://api.cryptoquant.com/v2/network/base-fee?asset=eth&window=day",
            { headers: { "Authorization": "Bearer <YOUR_API_KEY>"} })
              .then(response => response.json())
              .then(data => console.log(data))
        - lang: NodeJS
          source: |-
            require('axios')
              .get("https://api.cryptoquant.com/v2/network/base-fee?asset=eth&window=day", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })
              .then(response => console.log(response))
        - lang: Ruby
          source: >-
            require 'net/http'

            uri =
            URI("https://api.cryptoquant.com/v2/network/base-fee?asset=eth&window=day")

            req = Net::HTTP::Get.new(uri)

            req["Authorization"] = "Bearer <YOUR_API_KEY>"

            res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) {
            |http| http.request(req) }

            puts res.body
        - lang: Python
          source: >-
            import requests

            headers = {'Authorization': 'Bearer <YOUR_API_KEY>'}

            url =
            "https://api.cryptoquant.com/v2/network/base-fee?asset=eth&window=day"

            print(requests.get(url, headers=headers).json())
components:
  schemas:
    Status:
      type: object
      description: >-
        Returned with every response; indicates whether the request was
        successful.
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code.
        message:
          type: string
          description: Text description of the error or success.
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        For each API request, include the `Authorization` HTTP header with
        `Bearer {access_token}`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.