TL;DR:
- Kraken API provides Real-time and historical market data feeds to different types of strategies: L2 Order Book Depth For execution algorithms, OHLCV And history of commerce For backtesting, financing rate data For carrying strategiesAnd ticker feed For momentum signals.
- Systematic traders generally use 2 to 3 meals based on type of strategyoversubscription adds overhead without improving signal quality.
Knowing which API endpoints exist doesn’t tell you which flows to actually use. Execution algorithms typically use an L2 book depth of 10 rather than 1000. Momentum strategies generally do not need an order book. And if you backtest 6 months of data, you don’t know how your strategy performs over market cycles.
What market data feeds does the Kraken API offer?
- Real-time feed: Ticker (price/volume), order book (L2 depth, L3 individual orders), trades (executed trades), OHLCV (streaming candlesticks)
- Historical data: OHLCV, historical financing rates, commercial history
- Specific to futures contracts: mark price, funding rate, open interest
- Access terms: WebSocket v2 for real time, REST for historical, FIX for institutional
Do you need L2 or L3 order book data for your crypto trading strategy?
Ticker data provides best bid, best ask and latest price. But if you run the size, the ticker alone doesn’t tell you how much liquidity is behind those prices.
L2 (grouped commands)
The order book (L2) shows aggregate depth across multiple price levels. This is important when sizing orders to avoid slippage. If you sell 5 BTC and the best bid is only 0.08 BTC deep, you will go through several levels. L2 shows it to you before sending the command.
L3 (individual orders)
L3 provides a complete order-by-order view of all outstanding orders in the backlog, including order IDs and timestamps. This allows analysis of queue priority; you can determine where an order, including yours, is in the queue at each price level, as well as estimate execution probability and analyze market microstructure. L3 is mainly used for sub-second execution or queue position analysis.
From a performance perspective, the latency difference between L3 and L2 streams is negligible compared to transport time. The main cost is payload size: L3 describes each individual order in the book rather than the cumulative quantity at each price point, which means more data to encode, transmit, and decode. If you can’t explain why you need visibility into individual orders, L2 is sufficient for most systematic strategies.
Depth Options
The WebSocket book channel supports five depth levels: 10, 25, 100, 500, and 1000. Execution algorithms typically use depth 10, which covers the action range with minimal payload. Depths 500 and 1000 are used for market impact modeling or deep liquidity analysis and require more calculations to maintain.
How to access Kraken historical market data for backtesting?
OHLCV (candlestick data) is commonly used for backtesting. Moving averages, RSI, breakout signals, they all use OHLCV as input.
But OHLCV alone doesn’t tell you whether your execution assumptions are realistic. If your backtest assumes you can fill 10 BTC at the auction without slippage, you need to validate this against trading history. Pull the trade flow to confirm that the volume actually traded at these levels during your backtest period.
WebSocket vs REST for OHLCV: Use WebSocket if you need the current candle updated in real time as trades occur, rather than searching for a completed candle.
How do you use Kraken funding rate data for carry strategies?
Funding rate carry strategies harvest periodic payments between long and short positions in perpetual futures contracts. You need current rates for live monitoring (the futures ticker provides this) and historical rates for backtesting.
Reference price versus index price: The futures ticker includes, in addition to the last traded price, three distinct values. The reference price determines the liquidation risk and the unrealized P&L. The index price is the real-time spot reference price used in funding rate calculations. During volatile periods, the mark price and the index price may diverge; When this gap widens, it signals basis risk or liquidation pressure, something carry traders should monitor closely. The last traded price is a separate figure reflecting the most recent fill and is not a relevant comparison for assessing liquidation risk.
What are the most common mistakes when using crypto market data feeds?
- Use WebSocket for Everything: If you are backtesting or running slow strategies, REST polling is simpler.
- Assuming L3 is needed.: If you can’t explain why you need visibility into individual orders and data on queue position across the entire book, you probably don’t need L3. The L2 order book (aggregated depth) is sufficient for most systematic strategies.
- Ignoring historical depth: Backtesting 6 months of data doesn’t show you how your strategy performs over market cycles.
How to get started with market data feeds on Kraken?
Are you new to the Kraken API? Start with ticker and OHLCV via REST. These are public (no authentication), simple to integrate and cover most of the initial development of the strategy. Add an order book and trade feeds when you move to live execution.
For experienced traders:
- Identify your strategy type: execution algorithm, backtest, momentum, etc.
- Choose 2 or 3 feeds: don’t oversubscribe, start with what directly feeds your signals or execution logic.
- Create API keys when ready
- Full API documentation: docs.kraken.com/api
Create your API keys now, or for institutional scale or FIX access, contact us:
FAQs
What market data does the Kraken API provide for free?
Kraken’s real-time market data feeds (ticker, order book (L2), trades and OHLCV) do not require authentication. Individual L3 order data requires authentication.
What is the difference between L2 and L3 order book data on Kraken?
L2 shows aggregate depth across price levels, which is sufficient for most systematic strategies. L3 displays all individual pending orders in the book with order IDs and timestamps, enabling queue priority analysis, execution probability estimation, and market microstructure analysis. L3 requires authentication. If you can’t explain why you need full visibility of individual orders, you probably don’t need it.
Should I use WebSocket or REST for crypto market data?
Use WebSocket if you need the current candle updated in real time as trades occur, rather than searching for a completed candle.
What data streams do I need for a crypto execution algorithm?
Execution algorithms typically use L2 order book depth. The WebSocket book channel supports depths of 10, 25, 100, 500, and 1000. Depth 10 is the standard starting point and covers the action range. Depths of 500 and 1000 are used for market impact modeling and deep liquidity analysis. Ticker data alone is insufficient when performing sizing because it does not show the liquidity behind the best bid/ask price.


