# On-Chain Metrics (`onchain_metrics`)

> Total value locked and the fees a chain actually earns, over 24 hours, a week and a month. What the protocol makes, not what it promises.

- Category: On-chain
- MCP tool: `onchain_metrics`
- REST: `GET /onchain/{symbol}`
- x402 price: $0.01 per call (USDC on Base)
- HTML: https://www.f1ow.com/docs/tools/onchain_metrics

## What it does

On-chain TVL and network fees/revenue (24h/7d/30d) for one chain. Use a chain's own token symbol (e.g. 'ETH', 'SOL', 'BNB') — returns a plain 'not a tracked chain' message for tokens that aren't L1/L2s. Does not cover gas price (gwei).

## Parameters

| Name | Type | In | Required | Description |
| --- | --- | --- | --- | --- |
| `symbol` | string | path | yes | Chain token symbol, e.g. 'ETH' or 'SOL' |

## Call it

### cURL

```bash
curl "https://mcp.f1ow.com/v1/onchain/ETH" \
  -H "Authorization: Bearer $F1OW_API_KEY"
```

### MCP

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "onchain_metrics",
    "arguments": {
      "symbol": "ETH"
    }
  }
}
```

### TypeScript

```ts
const res = await fetch("https://mcp.f1ow.com/v1/onchain/ETH", {
  headers: { Authorization: `Bearer ${process.env.F1OW_API_KEY}` },
});
const data = await res.json(); // the tool's result as JSON, typed in the OpenAPI spec
console.log(data);
```

### Python

```python
import os, requests

res = requests.get(
    "https://mcp.f1ow.com/v1/onchain/ETH",
    headers={"Authorization": f"Bearer {os.environ['F1OW_API_KEY']}"},
)
data = res.json()  # the tool's result as JSON, typed in the OpenAPI spec
print(data)
```

### WebSocket

```jsonc
// wss://mcp.f1ow.com/v1/ws — subprotocol "jsonrpc-2.0", Authorization: Bearer <key>
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "onchain_metrics",
    "arguments": {
      "symbol": "ETH"
    }
  }
}

// Or push a fresh result whenever it changes (minimum interval 15 s)
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "subscriptions/subscribe",
  "params": {
    "name": "onchain_metrics",
    "arguments": {
      "symbol": "ETH"
    },
    "intervalSeconds": 60
  }
}
```

### x402

```bash
# No account: the first call answers 402 with a PAYMENT-REQUIRED challenge;
# an x402 client pays it in USDC on Base and retries.
curl "https://mcp.f1ow.com/x402/v1/onchain/ETH"
```

## Sample response

Captured 2026-11-13. The JSON is what REST and WebSocket return and the `structuredContent` of an MCP call (trimmed):

```json
{
  "chain": "Ethereum",
  "fees24hChangePct": 59.42,
  "fees24hUsd": 15243048.05,
  "fees30dUsd": 409341447.629998,
  "fees7dUsd": 72313312.88,
  "tracked": true,
  "tvlUsd": 39408009562.0325,
  "generatedAt": "2026-11-13T08:05:51.0597959+00:00"
}
```

Over MCP the text report a model reads comes with it:

```text
Ethereum — TVL $39.41B | Fees 24h $15.24M (+59.42%) | Fees 7d $72.31M | Fees 30d $409.34M
```

## Related tools

- [Market Regime](https://www.f1ow.com/docs/tools/research_regime) — What kind of market you are trading in. Seven forces — trend, volatility, cycle, sentiment, leverage stress, ETF liquidity, rotation — each voting with its own reasoning and its own threshold for changing the call.
- [Positioning](https://www.f1ow.com/docs/tools/research_positioning) — Who is on the other side of your trade. Up to eight reads on one coin — who is crowded, who is fragile, who is trapped — plus the price levels the whole board is watching.
- [Opportunity Scan](https://www.f1ow.com/docs/tools/research_opportunities) — A liquidity-qualified major and mid-cap universe screened on crowding, stress, leverage, compression, trend, location and entry quality. Ranked candidates with disclosed setup rules and entry, stop and target geometry — not a forecast or a proven edge.
- [Trade Plan Review](https://www.f1ow.com/docs/tools/research_trade_plan) — Check your entry, stop and target against ATR, perp levels, liquidation distance, fees, slippage and funding. Add account size and risk for sizing, or a placement time to replay a trade from public candles. An interactive ticket in MCP Apps hosts; no orders placed or plans stored.
