GET
/api/v1/on-chain/{asset}/hashrateHobbyist tier+ · 30 req/minDaily network hashrate for proof-of-work chains — BTC only.
Values are in TH/s (terahashes per second), CoinMetrics native unit. BTC only — ETH has been PoS since The Merge (2022-09-15) so `HashRate` for ETH is a zeroed-out legacy series. Any non-BTC asset returns 404 `UNSUPPORTED_ASSET` so clients don't accidentally chart a flat zero as real data.
Path parameters
Segments of the URL path, validated server-side.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| asset | enum | required | — | BTC only. BTC |
Query parameters
All query parameters are optional unless marked required.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| days | number | optional | 365 | History window. Max 730. |
Response shape
Always wrapped in the standard envelope. Nullable fields are explicitly marked — treat missing numeric data as a real data-source gap, not as an error.
data payloadtypescript
// Wrapped in the standard envelope:
// {
// data: /* shape below */,
// meta?: { total?: number; limit?: number; offset?: number; ... }
// }
{
asset: "BTC";
days: number;
metric: "HashRate";
points: Array<{ ts: number; value: number }>;
}Example
Copy the curl, replace YOUR_KEY with a real key from your dashboard, and run.
Requestbash
curl -sS "http://localhost:3000/api/v1/on-chain/BTC/hashrate?days=180"Responsejson
{
"data": {
"asset": "BTC",
"days": 180,
"metric": "HashRate",
"points": [ { "ts": 1744761600000, "value": 681500000 } ]
},
"meta": { "total": 1, "days": 180, "unit": "TH/s" }
}Next
Check the error code reference, or get an API key to try the request against your own account.