---
title: "Get historical oracle (spot) prices for crypto chart pre-population"
method: GET
path: "/markets/crypto/oracle-history"
tags: ["Markets"]
---

# Get historical oracle (spot) prices for crypto chart pre-population

`GET /markets/crypto/oracle-history`

## Request

- Base URL: `https://data.kairos.trade`
- URL: `https://data.kairos.trade/markets/crypto/oracle-history`
- Auth: API key in header `X-Client-Id` and API key in header `X-Api-Key` and API key in header `X-Api-Secret`

Returns per-symbol resolution-price history over `[end_ms - minutes*60*1000, end_ms]`
(`end_ms` defaults to now; clamped to now if a future value is given). Each request
names **one** oracle `source` so settlement feeds are never mixed. Symbols must be
the wire ids for that source (bare `btc-usd` for Binance;
`btc-usd-polymarket-chainlink`, `btc-usd-kalshi-cfb`, `btc-usd-hyperliquid-mark`,
or a `-polymarket-twap30`/`-polymarket-twap60` suffix for venue series). When
`source` is omitted, it is inferred from the wire symbols — mixed sources are
rejected. Only Binance gaps may be backfilled from Binance REST; every other
source returns an empty array for a missing span. Responses are cached briefly.
The internal store can lag real time by a few seconds.

## Query parameters

- `symbols` string, required
- `source` 'binance' | 'hyperliquid_mark' | 'kalshi_cfbenchmarks' | 'polymarket_chainlink' | 'polymarket_twap30' | 'polymarket_twap60'
- `minutes` integer
- `full_resolution` boolean
- `end_ms` integer

## Response `200`

Price-history points per symbol, sorted ascending by timestamp.

- MarketsOracleHistoryResponse: Price-history points keyed by oracle symbol (btc-usd/eth-usd/sol-usd/xrp-usd), each array sorted ascending by timestamp.

## Other responses

- `400`: No symbols given, unknown `source`, symbols that do not belong to the requested source, mixed-source inference failure, or a non-positive `end_ms`.
- `401`: No valid credential presented — missing/invalid API-key headers, or an invalid/expired session token.
- `403`: Authenticated but not permitted. Three distinct causes: the session user is not invited (`Invite required`), the API key lacks the operation's scope, or API-key access to the requested venue is switched off (`API access is disabled for <provider>`). Admin and API-key callers bypass the invite check; session and admin callers bypass scope and venue checks.
- `422`: Request failed FastAPI parameter validation.
- `429`: Rate limit exceeded for this route's sliding window, keyed on the session `sub` when authenticated and on the trusted client IP otherwise. Honor `Retry-After`. A per-API-key data ceiling (set per credential) rejects with `{"detail": "API key data rate limit exceeded"}` instead of the `error` envelope below.

---

[API](https://skmtc.dev/kairos/apis/kairos-data-api.md) - [All operations](https://skmtc.dev/kairos/apis/kairos-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kairos/apis/kairos-data-api/revisions/cf6b76079e38?raw)
