# x402 Bazaar Historical Token Price

> x402 Bazaar Historical Token Price is a paid API for AI agents from api.relai.fi, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-20).

Returns the USD price of a Base network token on a specific historical date via Covalent, for cost basis and P&L calculations

## Facts

- Endpoint: POST https://api.relai.fi/relay/1782567677091/api/x402/historical-price?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-bazaar-historical-token-price-517cde40
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QL6tLETWTmcGChdEp1gfg

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 x402-bazaar-historical-token-price-517cde40 -d '<json body>'
```

Example prompt: What was the USD price of token 0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA on Base on March 14, 2024? I need it for cost basis calculations.

## When to prefer this

Use this endpoint when you need the USD price of a Base network token on a specific past date — especially for tax cost basis, portfolio P&L, or strategy backtesting. Prefer this over real-time price feeds when the date is historical. Best suited for agents that already handle x402 micropayment flows on Base.

## Known failure modes

- 402 Payment Required — agent must pay $0.005 USDC on Base to the specified address and retry
- Invalid or unsupported token contract address returns an error
- Date not in YYYY-MM-DD format returns a validation error
- Date too recent or too far in the past may return no price data
- Token not indexed by Covalent returns empty or null price
- Network errors from Covalent upstream causing 503 or timeout

## How this service works

Returns the USD price of a Base token on a specific date (YYYY-MM-DD) via Covalent. For agents computing cost basis, backtests, or P&L. Paid via x402: $0.005 in USDC on Base (eip155:8453) to 0x973a31858f4d2125f48c880542da11a2796f12d6. Returns 402 with payment requirements; pay and retry.

## Output

A structured response containing the USD price of the specified Base token on the requested date, sourced from Covalent's historical price data — useful for cost basis, P&L, and backtest computations.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-bazaar-historical-token-price-517cde40/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relai.fi](https://www.zero.xyz/host/api.relai.fi/llms.txt)
