# Glassnode Median Gas Used (x402)

> Glassnode Median Gas Used (x402) is a paid API for AI agents from x402.glassnode.com, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Returns the median amount of gas used per transaction on a given blockchain network over a specified time interval.

## Facts

- Endpoint: GET https://x402.glassnode.com/v1/metrics/fees/gas_used_median
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glassnode-median-gas-used-x402-3fe1d9e5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QL4eIonSv_mMgpEY4-S1a

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability glassnode-median-gas-used-x402-3fe1d9e5
```

Example prompt: Can you pull the median gas used per transaction on Ethereum from Glassnode for the past 24h interval, in JSON format?

## When to prefer this

Use this endpoint when you need on-chain gas consumption data specifically for the median gas used per transaction metric, broken down by blockchain network (ETH, ARB, BASE, OPT) and time interval. Prefer this over total fee or average gas endpoints when you want the median (resistant to outliers) rather than mean or aggregate figures.

## Known failure modes

- Missing required asset symbol 'a' parameter returns a 400 validation error
- Unsupported network or interval enum value returns a 400 error
- Insufficient payment or missing x402 payment header returns a 402 Payment Required error
- Asset/network combination not supported (e.g. BTC on ETH-specific gas metrics) may return empty data or 404
- Rate limiting or upstream Glassnode data unavailability may return 503

## How this service works

Median Gas Used — The median amount of gas used per transaction. Data by Glassnode.

## Output

A time-series array of data points, each containing a UNIX timestamp (t) and the median gas used value (v) for that interval, covering the requested asset, network, and time resolution.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "a"
     ],
     "properties": {
      "a": {
       "type": "string",
       "description": "Asset symbol, e.g. BTC, ETH"
      },
      "c": {
       "enum": [
        "native"
       ],
       "type": "string",
       "description": "Currency for denominated values, e.g. usd, native"
      },
      "f": {
       "enum": [
        "csv",
        "json"
       ],
       "type": "string",
       "description": "Response format: json or csv"
      },
      "i": {
       "enum": [
        "1month",
        "1w",
        "24h"
       ],
       "type": "string",
       "description": "Time interval / resolution, e.g. 24h, 1w, 1month"
      },
      "network": {
       "enum": [
        "arb",
        "base",
        "eth",
        "opt"
       ],
       "type": "string",
       "description": "Network / blockchain identifier for cross-chain metrics"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "t"
      ],
      "properties": {
       "o": {
        "type": "object",
        "description": "Nested value object for multi-field metrics (e.g. OHLC)"
       },
       "t": {
        "type": "integer",
        "description": "UNIX timestamp (seconds, UTC) for the start of the interval"
       },
       "v": {
        "type": "number",
        "description": "Scalar metric value at the given timestamp"
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glassnode-median-gas-used-x402-3fe1d9e5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.glassnode.com](https://www.zero.xyz/host/x402.glassnode.com/llms.txt)
