> For the complete documentation index, see [llms.txt](https://docs.glassnode.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glassnode.com/basic-api/x402.md).

# x402

Access Glassnode metrics and metadata with native crypto payments — no API key or subscription required. Pay per request in USDC using the [x402](https://docs.cdp.coinbase.com/x402/welcome) protocol by Coinbase.

> **Experimental endpoints** — features, pricing, and availability may change without notice. For production systems, use the standard [Glassnode API](https://docs.glassnode.com/basic-api/endpoints) with a subscription.

## How it works

The x402 endpoints mirror the standard Advanced API one-to-one. The only difference is the subdomain:

|                        | Base URL                     |
| ---------------------- | ---------------------------- |
| Standard API (API key) | `https://api.glassnode.com`  |
| x402 (pay-per-use)     | `https://x402.glassnode.com` |

The path, query parameters, and response format are identical. You do **not** send an API key — the request is authorized by payment instead.

```
GET https://x402.glassnode.com/v1/metrics/{category}/{metric}
GET https://x402.glassnode.com/v1/metadata/{assets|metrics|metric}
```

## Getting started

1. **Set up an x402 client.** Follow the [x402 Quickstart for Buyers](https://docs.cdp.coinbase.com/x402/quickstart-for-buyers) to configure a wallet funded with USDC on Base.
2. **Call an endpoint.** Request any metric path on `x402.glassnode.com`. The server replies with HTTP `402 Payment Required` and the payment details.

   ```bash
   curl "https://x402.glassnode.com/v1/metrics/market/price_usd_close?a=BTC"
   ```
3. **Sign and pay.** Your x402 client signs a USDC payment authorization and resends the request with the `PAYMENT-SIGNATURE` header automatically.
4. **Receive data.** The response is the same time-series format as the standard API:

   ```json
   [
     { "t": 1781827200, "v": 63490.91 }
   ]
   ```

## Available metrics

All **Advanced** metrics are available via x402. See the full list in the [Advanced Metrics catalog](https://docs.glassnode.com/introduction/metric-catalog#advanced-metrics).

For each metric's supported query parameters and response format, refer to its page in the [API endpoint reference](https://docs.glassnode.com/basic-api/endpoints) — the x402 endpoint behaves identically.

## Metadata endpoints

The Glassnode [Metadata API](https://docs.glassnode.com/basic-api/metadata) is also available via x402, so you can discover assets, list metrics, and inspect a metric's supported parameters before paying for the data itself.

| Endpoint                   | Description                                                                      |
| -------------------------- | -------------------------------------------------------------------------------- |
| `GET /v1/metadata/assets`  | List all assets and their metadata. Optional CEL `filter` query.                 |
| `GET /v1/metadata/metrics` | List all available metric paths. Optional filters (`a`, `e`, `i`, `c`).          |
| `GET /v1/metadata/metric`  | Metadata for a single metric (parameters, ranges, descriptors). Requires `path`. |

```bash
# List all assets
curl "https://x402.glassnode.com/v1/metadata/assets"

# List all available metrics
curl "https://x402.glassnode.com/v1/metadata/metrics"

# Parameters and descriptors for a single metric
curl "https://x402.glassnode.com/v1/metadata/metric?path=/addresses/count"
```

These behave identically to the standard API — see the [Metadata API reference](https://docs.glassnode.com/basic-api/metadata) for query parameters and response schemas.

## Pricing & payment

| Endpoint type                 | Price per request |
| ----------------------------- | ----------------- |
| Metrics (`/v1/metrics/...`)   | **$0.05 USDC**    |
| Metadata (`/v1/metadata/...`) | **$0.01 USDC**    |

* Payment network: **Base**.

> Pricing is subject to change without notice. Always read the latest price from the `402` response before generating your payment.

## Discovery

x402 endpoints are also discoverable through the [Coinbase x402 Bazaar](https://docs.cdp.coinbase.com/x402/bazaar), where agents can find and rank Glassnode metrics and metadata automatically.
