How to Connect Kraken API to a Trading Bot 2026 (Safe Setup)
Connecting a bot to Kraken takes about 10 minutes — but one wrong API permission turns a bot bug into an emptied account. This is the safe way to do it.
Prerequisites: a Kraken account and a bot platform (Cryptohopper or WunderTrading).Step 1: Create the API key on Kraken
> Trade it, don't just read it - automate this strategy free on Cryptohopper (paper trading, no card).
| Permission | Enable? | Why |
|---|---|---|
| Query Funds / Query Orders / Query Trades | ✅ Yes | Bot needs read access to manage positions |
| Create & Modify Orders | ✅ Yes | Required to trade |
| Cancel Orders | ✅ Yes | Bots must cancel stale orders |
| **Withdraw Funds** | ❌ **Never** | Bots never need to move crypto off-exchange |
| Deposit Funds | ❌ No | Unnecessary |
> The golden rule: trade-only keys. If a bot key is compromised, the worst case is bad trades — not a drained account.
Step 2: Harden the key
Start Automating Your Crypto Profits Today
Our recommended exchange — trusted, low fees, clean API for bot trading.
Start Free Trial
- IP allowlist: restrict the key to your bot platform's IPs if they publish a static list (Cryptohopper documents theirs)
- Key description: label it per bot ("CH-Grid-BTC") so you can revoke surgically later
- 2FA on the account itself: authenticator app, before generating any keys
- Copy both the API key and private key — the private key displays once
Step 3: Connect to your bot
Cryptohopper
WunderTrading
Custom/self-hosted bots
- Use Kraken's official REST or WebSocket docs; store keys in env vars or a secrets manager — never in code
- Start with a read-only test before enabling order placement
Step 4: Verify before going live
- [ ] Bot shows correct balances (read access works)
- [ ] Run one small manual test order
- [ ] Confirm withdrawal permission is OFF at Settings → API
- [ ] Set a maximum position size in bot config
Common mistakes
- Enabling withdrawals "just in case" — bots never need it; this is how accounts get emptied
- Sharing one key across multiple bots — creates race conditions; one key per bot
- Storing keys in a .env file committed to git — instant compromise if the repo leaks
- No spend cap — cap the bot's trading allocation separate from your total balance
Rate limits (matters for bots)
Kraken uses a counter-based rate-limit system per tier — predictable for DCA/grid bots, but high-frequency strategies need to respect the call budget or you'll get temporary API throttling.
Frequently asked questions
Is it safe to give a bot my Kraken API key?
Yes, if the key is trade-only (no withdrawal permission) and the bot platform is reputable. The key can't move funds off-exchange.
Can I use the same key for two bots?
Technically yes, practically no — order conflicts. Generate a separate key per bot.
What if my bot key leaks?
Revoke it instantly at Settings → API. With trade-only permissions, exposure is limited to bad trades.