# Token Price History API
> Historical price for any crypto token by its on-chain contract address, keyless. Unlike current-price APIs, this is the time dimension: a price chart over any window, the price at any past date or timestamp, the percentage change over a period, and the token first-ever recorded price. Works for any token on any chain by chain:address (and coingecko:id), covering long-tail tokens centralized APIs miss. Live, nothing stored. The token price-history layer for charting, backtesting, accounting, tax and analytics apps — distinct from current-price and coin-slug APIs, this prices a token HISTORY by contract address.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/tokenpricehistory-api/..."
```

## Pricing
- **Free** (Free) — 2,400 calls/Mo, 3 req/s
- **Starter** ($16/Mo) — 62,000 calls/Mo, 8 req/s
- **Pro** ($51/Mo) — 400,000 calls/Mo, 20 req/s
- **Business** ($154/Mo) — 2,600,000 calls/Mo, 50 req/s

## Endpoints

### History

#### `GET /v1/at` — Price at a past date or timestamp

**Parameters:**
- `coin` (query, required, string) — Token as <chain>:<contract_address> or coingecko:<id> Example: `ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`
- `timestamp` (query, required, string) — Unix timestamp (seconds); or use date=YYYY-MM-DD Example: `1704067200`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tokenpricehistory-api/v1/at?coin=ethereum%3A0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&timestamp=1704067200"
```

**Response:**
```json
{
    "data": {
        "coin": "ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "note": "Closest recorded USD price at or before the requested time.",
        "price": 2275.21,
        "source": "DeFiLlama",
        "symbol": "WETH",
        "confidence": 0.99,
        "price_timestamp": 1704067207,
        "requested_timestamp": 1704067200
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:19.641Z",
        "request_id": "06eba318-61cb-4ba9-bb60-600e5dbe7bd8"
    },
    "status": "ok",
    "message": "Historical price retrieved successfully",
    "success": true
}
```

#### `GET /v1/change` — Percentage price change over a period

**Parameters:**
- `coin` (query, required, string) — Token as <chain>:<contract_address> or coingecko:<id> Example: `ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`
- `period` (query, optional, string) — Period: 1h, 24h, 7d, 30d (default 24h) Example: `7d`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tokenpricehistory-api/v1/change?coin=ethereum%3A0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&period=7d"
```

**Response:**
```json
{
    "data": {
        "coin": "ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "note": "Percentage price change over the period.",
        "period": "7d",
        "source": "DeFiLlama",
        "change_pct": 3.6088
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:19.832Z",
        "request_id": "27b83514-fd58-4915-9b69-a59b65bc4bb2"
    },
    "status": "ok",
    "message": "Price change retrieved successfully",
    "success": true
}
```

#### `GET /v1/chart` — Price series over time for a token

**Parameters:**
- `coin` (query, required, string) — Token as <chain>:<contract_address> or coingecko:<id> Example: `ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`
- `period` (query, optional, string) — Point spacing: 1h, 1d, 1w (default 1d) Example: `1d`
- `span` (query, optional, string) — Number of points (1-365, default 30) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tokenpricehistory-api/v1/chart?coin=ethereum%3A0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&period=1d&span=30"
```

**Response:**
```json
{
    "data": {
        "coin": "ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "note": "Price series over time. timestamp is unix seconds; price is in USD.",
        "span": 30,
        "count": 30,
        "period": "1d",
        "prices": [
            {
                "price": 2194.96610829,
                "timestamp": 1778918765
            },
            {
                "price": 2185.31030794,
                "timestamp": 1779005086
            },
            {
                "price": 2121.06881797,
                "timestamp": 1779091583
            },
            {
                "price": 2138.34353201,
                "timestamp": 1779177908
            },
            {
                "price": 2127.65685691,
                "timestamp": 1779264384
            },
            {
                "price": 2136.73062416,
                "timestamp": 1779350809
            },
            {
                "price": 2127.4388102,
                "timestamp": 1779437203
            },
            {
                "price": 2026.36957954,
                "timestamp": 1779523322
            },
            {
                "price": 2119.20003555,
                "timestamp": 1779610004
            },
            {
                "price": 2112.58707332,
                "timestamp": 1779696425
            },
            {
                "price": 2093.40193321,
                "timestamp": 1779782722
            },
            {
                "price": 2082
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/first` — The token first-ever recorded price

**Parameters:**
- `coin` (query, required, string) — Token as <chain>:<contract_address> or coingecko:<id> Example: `ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tokenpricehistory-api/v1/first?coin=ethereum%3A0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
```

**Response:**
```json
{
    "data": {
        "coin": "ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "note": "The token's first-ever recorded USD price (when DeFiLlama began tracking it).",
        "source": "DeFiLlama",
        "symbol": "WETH",
        "first_price": 839.535,
        "first_timestamp": 1518566400
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:21.556Z",
        "request_id": "83a3adcc-e257-4d24-afd8-1e587ece88a0"
    },
    "status": "ok",
    "message": "First price retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata & live sample

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tokenpricehistory-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "All endpoints take a required coin as <chain>:<contract_address> (e.g. ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 = WETH) or coingecko:<id> (e.g. coingecko:bitcoin). chart takes period (1h/1d/1w) and span (1-365). at takes timestamp (unix) or date (YYYY-MM-DD). change takes period (e.g. 24h, 7d). Prices are USD.",
        "sample": {
            "coin": "ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "symbol": "WETH",
            "first_price": 839.535
        },
        "source": "DeFiLlama open coins API (coins.llama.fi), live",
        "service": "tokenpricehistory-api",
        "endpoints": {
            "GET /v1/at": "Price at a past date/timestamp (coin, timestamp or date).",
            "GET /v1/meta": "This document.",
            "GET /v1/chart": "Price series over time for a token (coin, period, span).",
            "GET /v1/first": "The token's first-ever recorded price (coin).",
            "GET /v1/change": "Percentage price change over a period (coin, period)."
        },
        "description": "Historical price for any crypto token by its on-chain contract address, keyless. The time dimension: a price chart over any window, the price at any past date/timestamp, the percentage change over a period, and the token's first-ever recorded price. Works for any token on any chain by chain:address (and coingecko:<id>), covering long-tail tokens centralized APIs miss. Live, nothing stored beyond a short protect
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/tokenpricehistory-api
OpenAPI spec: https://www.oanor.com/api/tokenpricehistory-api/openapi.json
