Kraken API

Cryptocurrency / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Kraken is one of the oldest and most trusted U.S.-regulated cryptocurrency exchanges, offering a robust REST API for accessing real-time market data, account management, and order execution. Public endpoints for ticker data, OHLC candles, and order books require no authentication, making it easy to start exploring without an account. Private trading endpoints use a HMAC-SHA512 signature scheme for secure access.

💡

Beginner Tip

Try the public ticker endpoint first — it requires no API key and returns price data for any trading pair; Kraken asset names can differ from conventions (Bitcoin is "XXBT" not "BTC"), so check the /Assets endpoint to confirm correct names.

Available Data

coin price in USD/EUR
market capitalization
24h price change
trading volume
circulating supply
Use case: Integrate cryptocurrencies exchange data into web and mobile applications

Example Response

JSON Response
{
  "id": "bitcoin",
  "symbol": "btc",
  "current_price": 65432.1,
  "market_cap": 1280000000000,
  "price_change_24h": 1250.5,
  "price_change_percentage_24h": 1.95,
  "total_volume": 28500000000
}

Field Reference

result.XXBTZUSD.c Last trade closed: [price, lot volume]. The first element is the current price.
result.XXBTZUSD.b Best bid: [price, whole lot volume, lot volume].
result.XXBTZUSD.a Best ask: [price, whole lot volume, lot volume].
result.XXBTZUSD.v Volume: [today, last 24 hours] in base currency.
result.XXBTZUSD.h High: [today, last 24 hours].
error List of error strings; empty array means the request succeeded.

Implementation Example

const url = "https://docs.kraken.com/rest/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

EGeneral:Invalid arguments (Unknown asset pair) Kraken uses its own internal naming: "XXBT" for Bitcoin and "ZUSD" for USD in pair names.
Call GET /0/public/AssetPairs to list all valid pair names, then use the exact "altname" value like "XBTUSD".
EAPI:Invalid nonce For private endpoints, the nonce must be a strictly increasing integer on every request.
Use Date.now() in JavaScript or int(time.time()*1000) in Python to generate a millisecond-precision nonce.
EAPI:Rate limit exceeded Kraken's tier-based rate limiting counts API calls within a 15-minute window.
Space out requests and consider using Kraken's WebSocket API for continuous market data instead of polling REST.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Intermediate
Verified: 2026-04-07

Alternatives to Kraken

Technical alternatives for different use cases.

Established exchange with strong security track record

Better For

Number of trading pairs and liquidity depth

Trade-off

Security-focused trading with staking support

Similar APIs

View All →