# Crypto Price History

> Crypto Price History is a paid API for AI agents from chain.tollkit.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Returns historical USD prices for a crypto asset (ETH, BTC, SOL, LINK) over up to 365 days, sourced from Chainlink on-chain feeds, with summary statistics including first, last, high, low, and percentage change.

## Facts

- Endpoint: POST https://chain.tollkit.dev/chain/history?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-price-history-6b650e50
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_r2t5iasthE_VG6UjhCXRM

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 crypto-price-history-6b650e50 -d '<json body>'
```

Example prompt: Can you pull up the price history for ETH over the last 30 days from Chainlink's on-chain feed, using 50 data points, and tell me the high, low, and percentage change?

## When to prefer this

Choose this endpoint when you need verified, on-chain historical crypto price data sourced from Chainlink oracles rather than centralized exchange APIs. Ideal for DeFi analytics, backtesting, or any use case requiring trustworthy blockchain-native price history for ETH, BTC, SOL, or LINK without needing an API key or account setup.

## Known failure modes

- Unsupported asset symbol returns an error or empty result
- days or points outside allowed range (1-365, 2-100) causes validation failure
- Chainlink feed temporarily unavailable may cause data gaps or errors
- Payment failure via x402 protocol blocks the request
- Requesting very long history with max points may smooth out granularity significantly

## How this service works

Crypto price history: give an asset like ETH, BTC or SOL and up to 365 days, get past USD prices from Chainlink's on-chain feed with times, plus first, last, high, low and change.

## Output

Returns an array of timestamped USD price data points for the requested asset over the specified time window, along with summary statistics: first price, last price, highest price, lowest price, and total price change (absolute and/or percentage). Data is sourced from Chainlink's on-chain oracle feeds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "days": {
   "type": "integer",
   "default": 7,
   "maximum": 365,
   "minimum": 1
  },
  "asset": {
   "type": "string",
   "description": "Symbol, e.g. \"ETH\", \"BTC\", \"SOL\", \"LINK\"."
  },
  "points": {
   "type": "integer",
   "default": 24,
   "maximum": 100,
   "minimum": 2
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "days": 7,
  "feed": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
  "note": "Each point is a real Chainlink round: the one nearest each evenly spaced time, with the time it was written on-chain. Chainlink writes a new round when the price moves past a set threshold or a set time passes, so high and low are of these points, not every trade.",
  "pair": "ETH / USD",
  "asset": "ETH",
  "chain": "ethereum",
  "points": [
   {
    "time": "2026-10-13T07:25:11.000Z",
    "round_id": "129127208515966895888",
    "price_usd": 2523.8693
   },
   {
    "time": "2026-10-14T14:00:11.000Z",
    "round_id": "129127208515966895931",
    "price_usd": 2452.57
   },
   {
    "time": "2026-10-16T05:04:59.000Z",
    "round_id": "129127208515966896004",
    "price_usd": 2451.42
   },
   {
    "time": "2026-10-17T10:31:11.000Z",
    "round_id": "129127208515966896047",
    "price_usd": 2433.7582
   },
   {
    "time": "2026-10-18T22:01:23.000Z",
    "round_id": "129127208515966896091",
    "price_usd": 2371.0234
   },
   {
    "time": "2026-10-20T06:37:23.000Z",
    "round_id": "129127208515966896135",
    "price_usd": 2395.39
   }
  ],
  "source": "Chainlink Data Feeds on Ethereum, read on-chain",
  "read_at": "2026-10-20T07:22:34.320Z",
  "summary": {
   "low_usd": 2371.0234,
   "high_usd": 2523.8693,
   "last_usd": 2395.39,
   "first_usd": 2523.8693,
   "change_pct": -5.09,
   "latest_round_at": "2026-10-20T06:37:23.000Z"
  },
  "explorer_url": "https://etherscan.io/address/0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-price-history-6b650e50/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chain.tollkit.dev](https://www.zero.xyz/host/chain.tollkit.dev/llms.txt)
