# A token's hourly USD prices over a window

[Open the token on its entity page →](https://tracefast.xyz/entity/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)

The token's USD price for every priced hour in `[from, to]` (Unix seconds; the last 7 days by default, at most 90 days), oldest first — each with what the price is (`priceSource`), whether it was carried over from an earlier hour (`carried`), the largest USD value it may vouch for (`maxTrustedValueUsd`; absent means no bound) and the DEX and oracle prices of the hour where they exist. An hour without a price is absent, not zero. TraceFast prices a selected set of tokens; any other answers an empty list.

```
GET https://tracefast.xyz/api/v1/chains/1/tokens/{token}/price-history
```

| Parameter | In | Type | Notes |
|---|---|---|---|
| `token` | path | string | The token contract, `0x` + 40 hex, any case. |
| `from` | query | integer, optional | Unix time, seconds: the window's start (its hour included). Default: 7 days before `to`. |
| `to` | query | integer, optional | Unix time, seconds: the window's end (its hour included). Default: now. |

**Access** — an [API key](/api/authentication) on the **Intelligence** plan or higher ([plans](/api/authentication#plans)), or no key at all: pay per call with [x402](/api/x402) at the same path on `https://mpp.tracefast.xyz/api/v1`, at the price its `402` states. As a tool for AI agents: `get_token_price_history` on the [MCP server](/api/mcp-server). **Stable** — see [stability](/api/conventions#stability).

`chains/1` is a literal: other chain ids answer `404 chain_not_supported`. An unknown query parameter is refused rather than ignored.

## Response

`200 application/json`, USDC. Lists in the example are cut to two entries.

```json
{
  "data": {
    "chainId": 1,
    "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "fromHour": 1794312000,
    "toHour": 1794916800,
    "points": [
      {
        "hour": 1794312000,
        "priceUsd": 1,
        "priceSource": "stable_peg",
        "carried": false,
        "dexPriceUsd": 1,
        "dexConfidenceTier": "high",
        "oraclePriceUsd": 0.99977587,
        "divergencePct": 0.022412999999998906
      },
      {
        "hour": 1794315600,
        "priceUsd": 1,
        "priceSource": "stable_peg",
        "carried": false,
        "dexPriceUsd": 1,
        "dexConfidenceTier": "high",
        "oraclePriceUsd": 0.99977587,
        "divergencePct": 0.022412999999998906
      }
    ]
  },
  "meta": {
    "chain": "ethereum",
    "timestamp": 1794918386407,
    "cached": false,
    "docs": "https://docs.tracefast.xyz/api/token-price-history"
  }
}
```

### `data`

| Field | Meaning |
|---|---|
| `chainId` | Chain id. `1` is Ethereum mainnet. |
| `fromHour` | Start of the first hour of the window read, Unix seconds, included. |
| `points` | Every priced hour in the window; an hour without a price is absent. |
| `toHour` | Start of the last hour of the window read, Unix seconds, included. |
| `token` | The token, lowercase and `0x`-prefixed. |

### `data.points[]`

| Field | Meaning |
|---|---|
| `carried` | `true` when the price was carried over from an earlier hour. |
| `dexConfidenceTier` | The source's confidence in the DEX price, where the hour has one. |
| `dexPriceUsd` | The DEX price of the hour, where the hour has one. |
| `divergencePct` | How far the two disagree, percent, when both exist. |
| `hour` | The hour, Unix seconds (its start). |
| `maxTrustedValueUsd` | The largest USD value this price may vouch for. Absent means no bound. |
| `oraclePriceUsd` | The oracle price, where a round landed in the hour. |
| `priceSource` | What the price is (the vocabulary of `getTokenPrice`). |
| `priceUsd` | The USD price. |

`meta` is the same envelope on every method — see [conventions](/api/conventions#meta).

## Errors

| Status | When |
|---|---|
| 400 | `bad_request`: a malformed `token` (`address_invalid`); `from` / `to` not Unix seconds or in the future (`timestamp_invalid`); `from` after `to` (`time_window_inverted`); a window over 90 days (`time_window_out_of_range`); an unknown query parameter |
| 404 | `chain_not_supported`, or an unknown path |

Malformed input, unknown parameters and the key check's `401`/`403`/`429`/`503` are the same for every method — see [conventions](/api/conventions#errors) and [API keys](/api/authentication#when-a-key-is-refused).

## Related pages

* [One token](/api/token)
* [Token holders](/api/token-holders)
* [Token transfers](/api/token-transfers)
* [Token statistics](/api/token-stats)
* [All API methods](/api/methods) — every method on one page
* [Conventions](/api/conventions) — requests, responses, errors and pagination
