# 2s.io Crypto Coin Historical Market Chart

> 2s.io Crypto Coin Historical Market Chart is a paid API for AI agents from 2s.io, paid per call via x402, $0.0036/call, status unknown (last checked 2026-09-14).

Returns a time-series of price, market cap, and volume for a cryptocurrency over a specified number of days (1–365), auto-granulated by range, powered by CoinGecko data.

## Facts

- Endpoint: GET https://2s.io/api/crypto/coin-history
- Price: $0.0036/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-crypto-coin-historical-market-chart-f794c0e4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_F8bFBHkT0e8WO7xM0a7uB

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 2s-io-crypto-coin-historical-market-chart-f794c0e4
```

Example prompt: Pull the historical price, market cap, and volume chart for bitcoin from CoinGecko over the last 90 days in USD so I can run a backtest.

## When to prefer this

Use this endpoint when you need historical cryptocurrency market data (price, market cap, volume) for backtesting, charting, or trend analysis over a flexible lookback window up to 1 year. Prefer it over real-time price endpoints when historical context or time-series analysis is the goal. Ideal when CoinGecko coin IDs are known and granularity auto-selection is acceptable.

## Known failure modes

- Invalid or unknown CoinGecko coin ID returns an error or empty result
- Days parameter out of range (below 1 or above 365) rejected by schema validation
- Unsupported vs-currency code returns an error
- Rate limiting or payment failure (x402) prevents data retrieval
- CoinGecko upstream outage causes degraded or missing data

## How this service works

Historical market chart for a coin by CoinGecko id: time-series of price, market cap, and volume over the last N days (1-365) in USD or another vs-currency. Granularity is auto-selected by range (hourly for short windows, daily for long). For backtests, charts, and trend analysis.

## Output

A time-series dataset containing price, market cap, and total volume data points for the requested cryptocurrency over the specified lookback window, denominated in the chosen vs-currency. Granularity is automatically set to hourly for short windows and daily for longer ones.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "id"
     ],
     "properties": {
      "id": {
       "type": "string",
       "maxLength": 80,
       "minLength": 1,
       "description": "CoinGecko coin id, e.g. bitcoin."
      },
      "vs": {
       "type": "string",
       "maxLength": 10,
       "description": "vs-currency (default usd)."
      },
      "days": {
       "type": "integer",
       "maximum": 365,
       "minimum": 1,
       "description": "Lookback in days (default 7)."
      }
     },
     "additionalProperties": false
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-crypto-coin-historical-market-chart-f794c0e4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
