Crypto

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

  1. Log in to kraken.com
  2. Navigate to Security → API
  3. Click Add Key
  4. Under Permissions, enable:
    • Query Funds — read account balances
    • Create & Modify Orders — place and cancel orders
    • Query Open Orders & Trades — read order status
  5. 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

EndpointLimitNotes
REST API (public)1 request/secondMarket data, ticker, order book
REST API (private)Tiered by verification levelStarter: 15 calls/decay. Pro: higher.
WebSocket (public)Per connectionReal-time market data. No auth required.
WebSocket (private)Per connectionRequires 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_ms to 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

ErrorCauseFix
CONNECTION_REFUSEDAPI key invalid or expiredRegenerate API key in Kraken Security → API
RATE_LIMITEDCounter limit exceededIncrease rate_limit_ms in adapter config. Higher verification tiers have higher counter limits.
PERMISSION_DENIEDMissing required API permissionAdd Create & Modify Orders permission to the API key
INVALID_PAIRTrading pair identifier not recognizedCheck Kraken's asset pairs endpoint for exact pair names (e.g., XXBTZUSD not BTCUSD)
MANDATE_INTEGRITY_VIOLATIONConfig file modified while bot is runningStop the bot, verify config, restart

Related guides


One bot. $129. No subscription. No $749/mo platform. → Build for Kraken


Build your Kraken bot

Ready to build?