Kraken APIkraken.com ↗
Access Kraken exchange data: crypto assets, trading pairs, OHLCV candlesticks, tickers, and spread history via a single REST API.
What is the Kraken API?
This API exposes 6 endpoints covering the full scope of Kraken exchange market data, including assets, trading pairs, and price history. Use get_ohlc to pull up to 720 OHLCV candlestick data points per request across nine interval sizes, or get_ticker to retrieve real-time bid, ask, and last-trade prices for one or more trading pairs simultaneously. Asset and pair discovery endpoints make it straightforward to map symbols before querying price data.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/aaf5f047-34ee-4256-af80-989a25297ee9/get_assets' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace kraken-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Kraken SDK — crypto market data, bounded and re-runnable."""
from parse_apis.kraken.com_api import Kraken, Interval, PairNotFound
client = Kraken()
# List all available assets, take first 5
for asset in client.assets.list(limit=5):
print(asset.id, asset.altname, asset.status)
# Search for Ethereum-related assets
eth_asset = client.assets.search(query="ETH", limit=1).first()
if eth_asset:
print(f"Found: {eth_asset.id} ({eth_asset.altname}) decimals={eth_asset.decimals}")
# Get trading pairs and drill into one pair's sub-resources
pair = client.tradingpairs.list(limit=1).first()
if pair:
print(f"Pair: {pair.altname} base={pair.base} quote={pair.quote} status={pair.status}")
# Get ticker data for this pair
for ticker in pair.ticker.list(limit=1):
print(f"Ticker {ticker.pair_name}: ask={ticker.a[0]}, bid={ticker.b[0]}, vol_24h={ticker.v[1]}")
# Get hourly OHLCV candles
for candle in pair.ohlc.list(interval=Interval.ONE_HOUR, limit=3):
print(f" Candle ts={candle.timestamp} O={candle.open} H={candle.high} L={candle.low} C={candle.close}")
# Get recent spread snapshots
for spread in pair.spreads.list(limit=3):
print(f" Spread ts={spread.timestamp} bid={spread.bid} ask={spread.ask}")
# Typed error handling: catch PairNotFound on invalid pair
try:
for ticker in client.tradingpairs.list(limit=1).first().ticker.list(limit=1):
print(ticker.pair_name)
except PairNotFound as exc:
print(f"Pair not found: {exc}")
print("exercised: assets.list / assets.search / tradingpairs.list / ticker.list / ohlc.list / spreads.list")
Get list of all available crypto assets on Kraken exchange. Returns every asset with its metadata including display name, decimals, and status. No filtering or pagination — the full catalog is returned in one call.
No input parameters required.
{
"type": "object",
"fields": {
"count": "integer total number of assets",
"assets": "array of asset objects each containing id, aclass, altname, decimals, display_decimals, status"
},
"sample": {
"data": {
"count": 799,
"assets": [
{
"id": "0G",
"aclass": "currency",
"status": "enabled",
"altname": "0G",
"decimals": 6,
"margin_rate": "0",
"display_decimals": 4
}
]
},
"status": "success"
}
}About the Kraken API
Asset and Pair Discovery
The get_assets endpoint returns every crypto asset listed on Kraken, including each asset's id, altname, aclass, decimals, display_decimals, and status. The search_assets endpoint narrows that list with a case-insensitive substring match against id and altname fields — useful for resolving a ticker symbol like ETH or SOL to its canonical Kraken identifier before making price queries.
The get_asset_pairs endpoint returns metadata for every tradable pair, including wsname, base, quote, fees, fees_maker, leverage_buy, leverage_sell, ordermin, and margin parameters. Kraken uses non-obvious pair identifiers — for example, Bitcoin/USD is XXBTZUSD — so querying get_asset_pairs first is the reliable way to discover valid pair names before calling ticker or OHLCV endpoints.
Price and Market Data
The get_ticker endpoint accepts a comma-separated pairs parameter and returns a keyed response object per pair. Each pair object contains a (ask with whole lot and lot volume), b (bid), c (last trade closed price and lot volume), and v (volume). Multiple pairs can be requested in a single call; if any pair name is unrecognized, the response includes an upstream_error field.
get_ohlc accepts a pair name, an optional Unix since timestamp, and an interval in minutes — valid values are 1, 5, 15, 30, 60, 240, 1440, 10080, and 604800. Each returned data point includes timestamp, open, high, low, close, vwap, volume, and trades count. The response also returns last_timestamp for pagination and an interval_label string. Up to 720 data points are returned per request.
Spread History
The get_spread endpoint returns up to 250 recent bid/ask spread snapshots for a given pair. Each entry in the data array contains timestamp, bid, and ask. An optional since Unix timestamp parameter is accepted, though Kraken returns the most recent data available regardless of the value provided — the same behavior applies to the since parameter on get_ohlc.
The Kraken API is a managed, monitored endpoint for kraken.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when kraken.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official kraken.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a crypto price dashboard using get_ticker to display real-time bid/ask and last-trade prices across multiple pairs.
- Backtest trading strategies by pulling OHLCV candlestick data from get_ohlc at 1-minute, hourly, or daily intervals.
- Monitor bid/ask spread tightness over time for a specific trading pair using get_spread snapshots.
- Resolve user-supplied ticker symbols to canonical Kraken pair names by searching with search_assets before querying price endpoints.
- Enumerate all tradable pairs and their minimum order sizes using get_asset_pairs to validate user order inputs.
- Track leverage and margin availability per trading pair using the leverage_buy and leverage_sell fields from get_asset_pairs.
- Build a crypto asset directory filtered by status using the full asset list from get_assets.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.