# agent402.tools Crypto Price History

> agent402.tools Crypto Price History is a paid API for AI agents from agent402.tools, paid per call via x402, $0.015/call, status unknown (last checked 2026-10-10).

Returns historical price, market cap, and volume time series for a cryptocurrency over a specified number of days, with automatic granularity (5-min, hourly, or daily bars).

## Facts

- Endpoint: GET https://agent402.tools/api/crypto-history?utm_source=zero.xyz
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-crypto-price-history-2e81f6ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Aq4JKku_BZ-oH3_4litZN

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 agent402-tools-crypto-price-history-2e81f6ee
```

Example prompt: Can you pull the historical price and market cap data for Bitcoin over the last 30 days in USD — I want to see how it's trended?

## When to prefer this

Use this endpoint when you need historical cryptocurrency price, market cap, or volume data over a defined time window with automatic granularity. Prefer this over live quote endpoints when trend analysis, charting, or backtesting is needed. Best for agents that need aligned time series arrays rather than a single current snapshot.

## Known failure modes

- Invalid or unrecognized coin symbol/id returns an error or empty result
- Unsupported 'days' value outside allowed enum (1,7,14,30,90,180,365,max) may return an error
- Unsupported vs_currency value may cause an error or fallback
- Payment failure (x402) results in 402 response and no data
- Rate limiting or CoinGecko upstream outage may cause timeout or 5xx error

## How this service works

Historical price, market cap, and volume time series for a coin. Granularity is automatic per CoinGecko: <=1 day = 5-min bars, 2-90 days = hourly, >90 days = daily. Days: 1, 7, 14, 30, 90, 180, 365, or "max". Returns aligned arrays of {time, price, marketCap, volume}.

## Output

Aligned arrays of time series data containing timestamps, prices, market caps, and trading volumes for the requested coin. Granularity is automatically selected by CoinGecko: 5-minute bars for 1-day requests, hourly bars for 2–90 days, and daily bars for more than 90 days.

## 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": [
      "coin"
     ],
     "properties": {
      "coin": {
       "type": "string",
       "description": "Symbol (BTC) or id (bitcoin)"
      },
      "days": {
       "type": "string",
       "description": "1, 7, 14, 30, 90, 180, 365, or \"max\" (default 7)"
      },
      "currency": {
       "type": "string",
       "description": "vs_currency (default: usd)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "coin",
      "currency",
      "days",
      "count",
      "bars"
     ],
     "properties": {
      "bars": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "time": {
          "type": "string"
         },
         "price": {
          "type": "number"
         },
         "volume": {
          "type": "integer"
         },
         "marketCap": {
          "type": "integer"
         }
        }
       }
      },
      "coin": {
       "type": "string"
      },
      "days": {
       "type": "string"
      },
      "count": {
       "type": "integer"
      },
      "currency": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bars": [
   {
    "time": "2026-06-13T00:00:00Z",
    "price": 66120.45,
    "volume": 27400000000,
    "marketCap": 1298000000000
   }
  ],
  "coin": "bitcoin",
  "days": "7",
  "count": 1,
  "currency": "usd"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-crypto-price-history-2e81f6ee/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
