# AgentData API — Historical Crypto Market Data (x402)

> AgentData API — Historical Crypto Market Data (x402) is a paid API for AI agents from agentdata-api.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Retrieves historical OHLCV or price data for a specified crypto trading pair at a given interval and limit, paid via USDC micropayment on Base Mainnet with no API key required.

## Facts

- Endpoint: GET https://agentdata-api.com/api/historical
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdata-api-historical-crypto-market-data-x402-a6c24c28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oQqkOdbWmrpQt5MJUhHMs

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 agentdata-api-historical-crypto-market-data-x402-a6c24c28
```

Example prompt: Can you pull the last 50 hourly candles of historical price data for BTC-USDC? Pay for it with my USDC wallet on Base.

## When to prefer this

Use this endpoint when an AI agent needs historical candlestick or price data for a cryptocurrency trading pair without registering an account or managing API keys, and can pay per-request in USDC via the x402 protocol on Base Mainnet. Ideal for autonomous agents running in Claude Desktop, ElizaOS, or MCP environments that need on-demand crypto history for analysis or strategy.

## Known failure modes

- Insufficient USDC balance for micropayment — payment rejected by x402 protocol
- Invalid or unsupported trading pair symbol — data not found
- Invalid interval value — bad request error
- Limit exceeds maximum allowed records — request rejected
- Network or Base Mainnet availability issue — service unavailable

## How this service works

Pay-per-request crypto market data API for AI agents. 16 endpoints on Base Mainnet via x402 protocol. No accounts, no API keys. USDC micropayments from $0.001. Works with Claude Desktop, ElizaOS, and any MCP client.

## Output

A JSON object containing a 'data' field with historical market data records (OHLCV or price series) for the specified trading pair, interval, and limit, plus a 'success' boolean confirmation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "integer"
  },
  "symbol": {
   "type": "string",
   "description": "Trading pair"
  },
  "interval": {
   "enum": [
    "1m",
    "5m",
    "15m",
    "30m",
    "1h",
    "4h",
    "1d"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "data": {},
 "success": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdata-api-historical-crypto-market-data-x402-a6c24c28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentdata-api.com](https://www.zero.xyz/host/agentdata-api.com/llms.txt)
