Kraken Setup Guide
Time: 5 minutes | Difficulty: Easy | Market: Crypto Mode: Full automation | API: REST + WebSocket + FIX 4.4 | Docs: docs.kraken.com/api
This guide wires a Kraken trading bot to the REST and WebSocket API using the botwir3 runtime. Configure API credentials, connect to any supported crypto pair, and run automated trading locally.
Before you start
Verify that automated operation is permitted under Kraken's current terms of service before deploying. botwir3 provides tools for building structured automation. The user is responsible for compliance with the platform's terms and all applicable regulations.
Kraken Terms of Service | Last verified: May 2026
What you need
- A Kraken account with identity verification complete
- The botwir3 runtime downloaded and unzipped
- A strategy config file from the builder
Step 1: Create API credentials
- Log in to kraken.com
- Navigate to Security → API
- Click Add Key
- Under Permissions, enable:
- Query Funds — read account balances
- Create & Modify Orders — place and cancel orders
- Query Open Orders & Trades — read order status
- Copy the API Key and Private Key
Permissions required: Query Funds, Create & Modify Orders, Query Open Orders & Trades. Permissions to disable: Withdraw Funds, Query Ledger Entries. These scopes are not required for trading and can be left disabled.
🔒 Security. Withdrawal permissions are not required for trading. Kraken supports optional IP whitelisting and nonce-based request signing for additional security.
Step 2: Configure the adapter
Create adapter.json in the bot directory:
{
"adapter": "kraken",
"credentials": {
"api_key": "paste-api-key-here",
"api_secret": "paste-private-key-here"
},
"trading_pair": "XXBTZUSD",
"environment": "live",
"rate_limit_ms": 1000
}
Common trading pairs: XXBTZUSD (BTC/USD), XETHZUSD (ETH/USD), SOLUSD, DOGEUSD. Kraken uses its own pair naming convention — check the asset pairs endpoint for exact identifiers.
API keys are stored in a local config file on the machine running the bot. They are not transmitted to botwir3 or any third party. botwir3 never sees, stores, or has access to platform credentials.
Step 3: Test the connection
botwir3 test --adapter kraken
Expected output:
[botwir3] Adapter: kraken
[botwir3] Connection: OK
[botwir3] Permissions: query_funds, create_orders, query_orders
[botwir3] Rate limit: tiered (see Kraken docs)
Step 4: Start the bot
botwir3 start --config my-strategy.json
The runtime loads the strategy, computes the spec hash, connects to Kraken via the local API credentials, and begins evaluating signals. The gate function compares proposed actions against the configured spec. The user is responsible for monitoring the bot and verifying execution outcomes.
Rate limits and considerations
| Endpoint | Limit | Notes |
|---|---|---|
| REST API (public) | 1 request/second | Market data, ticker, order book |
| REST API (private) | Tiered by verification level | Starter: 15 calls/decay. Pro: higher. |
| WebSocket (public) | Per connection | Real-time market data. No auth required. |
| WebSocket (private) | Per connection | Requires WebSocket auth token. |
ℹ Rate limit tiers. Kraken uses a counter + decay system. Each API call increments a counter; the counter decays over time. Higher verification tiers have higher counter limits and faster decay. Set
rate_limit_msto 1000 or higher for Starter accounts.
Kraken provides a UAT (User Acceptance Testing) environment for testing strategies without real funds. Common Kraken bot configurations include BTC/USD DCA strategies, altcoin momentum trading, and mean reversion on high-volume pairs. Kraken's FIX 4.4 protocol is available for institutional-grade connectivity. All actions and decisions are recorded in the local ledger.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
CONNECTION_REFUSED | API key invalid or expired | Regenerate API key in Kraken Security → API |
RATE_LIMITED | Counter limit exceeded | Increase rate_limit_ms in adapter config. Higher verification tiers have higher counter limits. |
PERMISSION_DENIED | Missing required API permission | Add Create & Modify Orders permission to the API key |
INVALID_PAIR | Trading pair identifier not recognized | Check Kraken's asset pairs endpoint for exact pair names (e.g., XXBTZUSD not BTCUSD) |
MANDATE_INTEGRITY_VIOLATION | Config file modified while bot is running | Stop the bot, verify config, restart |
Related guides
- Coinbase Advanced Setup Guide — crypto, US-based exchange
- Binance Setup Guide — crypto, global exchange (not US)
- TradingView Webhooks Setup Guide — route TradingView alerts to any adapter
One bot. $129. No subscription. No $749/mo platform. → Build for Kraken