> For the complete documentation index, see [llms.txt](https://docs.koinju.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.koinju.io/exchanges/kraken.md).

# Kraken Spot historical trade data

Kraken Spot historical trade data since 2013-10-01, available through SQL or REST in one unified schema and checked every day against Kraken's own data. Free demo, no sign-up.

Koinju provides Kraken Spot trades and OHLCV candles for all markets since **2013-10-01**, under the exchange ID `kraken`. This page explains what that gives you compared with Kraken's own API, how we collect the data, and how we verify that no trades are missed.

{% hint style="info" %}
How far back you can query depends on your plan: see [Pricing](/pricing.md). Every exchange and its start date is listed on [Coverage](/data/coverage.md).
{% endhint %}

## Why use Koinju for Kraken data

* **Full history in one place.** Kraken's REST API returns up to 1,000 trades per call, paged forward from a chosen point in time, with public requests rate-limited per IP ([Kraken docs](https://docs.kraken.com/api-reference/market-data/get-recent-trades)). Koinju provides it as one continuous history since 2013-10-01, aligned to UTC days and queryable for any period through SQL or REST.
* **One schema across exchanges.** Unified symbols and columns across every exchange we cover, Kraken included, so the same query works on all of them.
* **Checked against Kraken's own data.** Every day, each market's volume is compared with Kraken's own daily candle and any missing trades are added. Trade IDs are also checked several times a day.
* **Faithful to Kraken.** Kraken's own trade IDs and trade times.

## At a glance

| Property                | Value                                                        |
| ----------------------- | ------------------------------------------------------------ |
| Exchange ID             | `kraken`                                                     |
| Historical data since   | 2013-10-01                                                   |
| Data types              | Public trades, OHLCV                                         |
| Collected from          | Kraken's real-time WebSocket API v2, trade channel (`trade`) |
| Volume check            | Every day, against Kraken's UTC daily candles                |
| Trade-ID sequence check | Several times a day, against Kraken's trade IDs              |

## How we collect Kraken trades

* **Every trade event.** We subscribe to Kraken's [trade channel](https://docs.kraken.com/exchange/api-reference/spot-websocket-v2/trade) (`trade`) for every listed Kraken Spot market. Kraken generates a trade event when orders are matched in the book, and each row keeps Kraken's own trade ID.
* **New listings picked up automatically.** The market list is refreshed every minute, and new markets are subscribed without a restart.
* **Active redundancy.** Every market is collected twice, by two collectors running in parallel. If one connection drops, it reconnects and resubscribes automatically while the other keeps collecting trades. Both copies of a trade share one key (exchange, market and trade ID), so the second copy is dropped before storage, and anything missed is recovered by the checks below.
* **Kraken's timestamps.** A trade's `timestamp` is the trade time reported by Kraken, not the time we received it.

## From Kraken's message to your data

Each trade Kraken publishes is stored as one row, with Kraken's fields mapped to the same columns used for every exchange:

| Kraken field | Koinju column | Notes                                                                |
| ------------ | ------------- | -------------------------------------------------------------------- |
| `symbol`     | `market`      | Koinju's universal symbol, for example `BTC-USD`                     |
| `trade_id`   | `trade_id`    | Kraken's own trade ID                                                |
| `price`      | `price`       | Kraken's price for the trade                                         |
| `qty`        | `quantity`    | Kraken's size of the trade                                           |
| `side`       | `side`        | `buy` or `sell`: the side of the taker order, as Kraken publishes it |
| `timestamp`  | `timestamp`   | Kraken's trade time                                                  |

## How we verify that no Kraken trades are missed

Kraken Spot data goes through two independent checks: a volume check against Kraken's candles, and a trade-ID sequence check against Kraken's trade IDs. The two complement each other: the trade-ID check pinpoints individual missing trades within hours, while the volume check also catches a market that goes completely quiet, which leaves no trade IDs to check.

### Volume check against Kraken's own candles

The reference is Kraken's own daily candle for each UTC day. A daily candle is only final once the day has closed, so each day is checked the morning after, against Kraken's final figures for that day. The daily rhythm follows the reference data rather than an arbitrary time window.

1. **Compare.** Each market's volume for the UTC day is compared with Kraken's daily candle. Markets where our volume is lower than Kraken's go to step 2.
2. **Add.** For those markets, the comparison is repeated hour by hour. The trades of the hours that differ are fetched from Kraken's REST API, and only trades we do not already hold are added.
3. **Re-check.** The whole comparison runs again on the updated data, and any difference that remains is flagged for review.

A day is marked as checked only after all three steps complete. If any step fails, the day stays open and is retried on the next run.

### Trade-ID sequence check

Kraken gives every trade in a market a sequential trade ID ([Kraken docs](https://docs.kraken.com/exchange/api-reference/spot-websocket-v2/trade)), so a jump in the sequence shows exactly which trades are missing. Several times a day, we scan newly collected trades for jumps in trade IDs (gaps) and repeated trade IDs (duplicates).

* **Gaps.** For each gap, the missing trades are requested from Kraken by trade ID, and each one is added only if its timestamp falls inside the gap's time window.
* **Duplicates.** When a trade ID appears more than once, the extra copies are removed so a single row remains, and the hour's volume is checked again to confirm that only the copies were removed.

## Kraken-specific details

* **UTC daily candles.** Kraken's daily candles (`interval=1440`) start at 00:00 UTC, the same day boundaries as our daily total.
* **The exact figure compared.** The volume check compares the daily candle's `volume` field with the sum of the trade quantities we hold for that day.

## Access Kraken data

* [Try it on the free demo database](https://demo.koinju.io/?sql=SELECT+timestamp,+market,+side,+price,+quantity+FROM+api.trade+WHERE+exchange+=+'kraken'+AND+timestamp+%3E=+%28SELECT+max%28timestamp%29+-+INTERVAL+1+HOUR+FROM+public_data.candle_1m+WHERE+exchange+=+'kraken'%29+ORDER+BY+timestamp+DESC+LIMIT+100): the last trades of 18 October 2026, up to 100, with `exchange = 'kraken'`, or [the same query as JSON](https://sn7u7x3woz.eu-central-1.aws.clickhouse.cloud:8443/?user=demo\&default_format=JSONEachRow\&query=SELECT%20timestamp%2C%20market%2C%20side%2C%20price%2C%20quantity%20FROM%20api.trade%20WHERE%20exchange%20%3D%20%27kraken%27%20AND%20timestamp%20%3E%3D%20%28SELECT%20max%28timestamp%29%20-%20INTERVAL%201%20HOUR%20FROM%20public_data.candle_1m%20WHERE%20exchange%20%3D%20%27kraken%27%29%20ORDER%20BY%20timestamp%20DESC%20LIMIT%20100) for an agent.
* [Public trades](/data/public-trades.md): every trade, through SQL (`api.trade`) or REST, with `exchange = 'kraken'`.
* [OHLCV](/data/ohlcv.md): candles for every market.
* [Market list](/data/market-list.md): all `kraken` markets and their symbols.
* [How to connect](/how-to-connect.md): SQL, REST and client setup.

## FAQ

**Which timestamp does Koinju store?**

The trade time reported by Kraken.

**Which Kraken markets are included?**

Every Spot market Kraken lists as online. The market list is refreshed every minute, so a new listing is subscribed within a minute of appearing in Kraken's market list.
