# Kaspa On-Chain Metrics History

> Kaspa On-Chain Metrics History is a paid API for AI agents from api.chainmarket-api.workers.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-21).

Returns hourly time series and summary statistics (min, max, average, trend) for Kaspa on-chain metrics — hashrate, difficulty, tx-count, or active-addresses — for a specified UTC date.

## Facts

- Endpoint: GET https://api.chainmarket-api.workers.dev/api/crypto/kaspa-metrics-history?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kaspa-on-chain-metrics-history-059edefa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4J1bcoR6Q2zuV-A2Nmq02

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 kaspa-on-chain-metrics-history-059edefa
```

Example prompt: Can you pull the hourly hashrate history for Kaspa on 2024-11-15 and give me the min, max, average, and trend for that day?

## When to prefer this

Choose this endpoint when you need historical, day-level granularity for Kaspa on-chain metrics with hourly resolution and pre-computed summary stats. Prefer this over the current-state Kaspa endpoints when you need trend analysis, historical comparisons, or time series data for a specific past date rather than live snapshots.

## Known failure modes

- Invalid date format (not YYYY-MM-DD) returns a 400 error
- Date too far in the past may return empty or unavailable data
- Invalid metric enum value returns a 400 or 422 error
- Upstream Kaspa node unavailability may cause 503 or timeout
- Date is in the future — data not yet available

## How this service works

Hourly time series and summary statistics (min, max, average, trend) for Kaspa on-chain metrics (hashrate, difficulty, tx-count, active-addresses) for a given UTC date (YYYY-MM-DD).

## Output

An hourly time series of the requested Kaspa on-chain metric for the given UTC date, along with summary statistics including the daily minimum, maximum, average, and trend direction. The metric field determines which of hashrate, difficulty, tx-count, or active-addresses is returned.

## 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": [],
     "properties": {
      "date": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
       "description": "UTC date in YYYY-MM-DD format (defaults to previous UTC day)."
      },
      "metric": {
       "enum": [
        "hashrate",
        "difficulty",
        "tx-count",
        "active-addresses"
       ],
       "type": "string",
       "description": "Metric to retrieve (default: hashrate)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kaspa-on-chain-metrics-history-059edefa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.chainmarket-api.workers.dev](https://www.zero.xyz/host/api.chainmarket-api.workers.dev/llms.txt)
