# 4SEC Crypto Market History API

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

Returns historical price and market data for a specific crypto asset across multiple DEXes, identified by asset ID and number of days

## Facts

- Endpoint: GET https://api.foursec.xyz/api/v1/market/%7Bid%7D/history
- Price: $0.01/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-market-history-api-986525b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gUPzcsIEB6Jed0wzx3yPT

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-market-history-api-986525b9
```

Example prompt: Pull the last 30 days of price history for the token with ID 'uniswap-eth' from the 4SEC multi-DEX aggregated market data API so I can analyze its recent trend.

## When to prefer this

Choose this endpoint when you need multi-DEX aggregated historical price data for a specific crypto asset and want pay-per-request pricing via USDC on Base with no subscription required. Ideal for agents performing on-demand backtesting, trend analysis, or portfolio review without committing to a centralized data provider subscription.

## Known failure modes

- Invalid or unknown asset ID returns empty or error response
- Requesting too many days may exceed available historical data
- Malformed request properties result in schema validation errors
- Payment failure via x402/USDC on Base blocks the request
- Rate limiting or network timeouts on high-frequency calls

## 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 asset ID, number of days requested, an array of historical market data points (each with price and time metadata aggregated across multiple DEXes), and the total count of data points returned.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "example": {
  "id": {
   "type": "string"
  },
  "days": {
   "type": "integer"
  },
  "history": {
   "type": "array",
   "items": {
    "type": "object"
   }
  },
  "data_points": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/4sec-crypto-market-history-api-986525b9/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)
