# 4SEC Crypto Price History API

> 4SEC Crypto Price History API is a paid API for AI agents from api.foursec.xyz, paid per call via x402, $0.02/call, status down (last checked 2026-09-15).

Returns historical OHLC candlestick price data for a given crypto token symbol, aggregated across multiple DEXs

## Facts

- Endpoint: GET https://api.foursec.xyz/price/history/%7Bsymbol%7D
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/4sec-crypto-price-history-api-fa0f19aa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9lovcXs94xFwnLGg2eIYe

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 4sec-crypto-price-history-api-fa0f19aa
```

Example prompt: Can you pull the historical price candles for ETH from 4SEC's multi-DEX aggregated market data so I can see how it's been trading?

## When to prefer this

Choose this endpoint when you need historical candlestick/OHLC price data for a crypto token aggregated across multiple decentralized exchanges (DEXs), especially when operating in a pay-per-request, on-chain micropayment context using x402 on Base. Prefer it over centralized exchange APIs when you need DEX-native price data without subscription commitments.

## Known failure modes

- Invalid or unrecognized token symbol returns an error or empty candle array
- Symbol not traded on supported DEXs results in no data
- Rate limiting or payment failure via x402 protocol blocks the request
- Malformed symbol path parameter causes a 400 or 404 error
- Insufficient USDC balance on Base for micropayment causes 402 rejection

## How this service works

Real-time multi-DEX aggregated crypto market data. Pay per request with USDC on Base via x402 protocol.

## Output

Returns a JSON object containing the queried token symbol, an array of OHLC candlestick objects (each representing a time interval of price data aggregated across multiple DEXs), the interval string, and the total number of candles returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "example": {
  "symbol": {
   "type": "string"
  },
  "candles": {
   "type": "array",
   "items": {
    "type": "object"
   }
  },
  "interval": {
   "type": "string"
  },
  "total_candles": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/4sec-crypto-price-history-api-fa0f19aa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.foursec.xyz](https://www.zero.xyz/host/api.foursec.xyz/llms.txt)
