API keys: How to safely connect exchange to bot
What are API keys, why they're dangerous, and how to protect your account from hacking
API keys: Gateway to your account
An API key is a password giving a bot (or platform like AI Traders) access to your exchange account. Mishandle them, and you lose everything.
What's an API key?
API (Application Programming Interface) = communication channel between app and exchange.
Example:
- You want AI Traders to open orders on Binance
- AI Traders requests your API key
- You generate key in Binance settings
- Give key to AI Traders
- Now AI Traders can trade on your behalf
API key types
1. Trading API (trade key)
Lets bot:
- Open and close orders
- Adjust positions
- Use margin (ALWAYS disable this!)
2. Data API (read-only key)
Only allows:
- Check prices
- See your trade history
- Check balance
No trading rights.
How to safely generate a key?
Step-by-step on Binance
1. Open account settings
- Binance → Account (person icon top right)
- API Management
2. Create new key
- Click "Create API"
- Name: "AI Traders Trading Bot"
3. CRITICAL: Limit key permissions
When you see permissions window:
✓ ENABLE:
- Spot Trading
- Margin Trading (ONLY if you use it)
- Reading info
✗ DISABLE (IMPORTANT!):
- Withdrawals (funds removal)
- Future/Margin Transfer
- Futures Trading
- Vault
If you don't disable Withdrawals, hackers can steal everything.
4. Add IP restriction (if available)
- Find your IP (google.com → "my ip")
- Add it to exchange settings
- Now key only works from your IP
If you're home Wi-Fi, this might change. Add a range (e.g., 192.168.x.x).
5. Set key expiration
Example: 90 days. After that, key auto-disables. Create new. Extra security.
How to use in AI Traders
- Go to Settings → API Binance
- Paste API Key (public) — not secret
- Paste Secret Key — THIS IS SECRET, never show!
- Save
NEVER share Secret Key!
If you sent Secret Key anywhere (chat, email), immediately:
- Delete key in Binance
- Create new key
- Update in AI Traders
What can go wrong?
Scenario 1: Hacker stole Secret Key
Hacker can:
- Open order on your entire balance
- Dump on most volatile pair
- Close in loss
- Steal $10,000 in minutes
Protection:
- Use 2FA (two-factor auth) on Binance
- Limit key permissions (no margin, no withdrawals)
- Use IP restrictions
Scenario 2: AI Traders got hacked
Even if you trust the platform, it can be breached.
Protection:
- Use separate key for each service
- Limit each key's rights (different key = different permissions)
- Don't give full rights to one key
Scenario 3: You forgot about old key
You created key for something, forgot about it.
Protection:
- Name key clearly ("AI Traders Bot", "Grid Trading", etc.)
- Check active keys monthly in Binance
- Delete unused keys
Security checklist
- ✓ API key with limited rights (no withdrawals, no margin)
- ✓ IP restrictions enabled
- ✓ 2FA enabled on Binance
- ✓ Secret Key not saved in notes/email/cloud
- ✓ Secret Key never shared in chats
- ✓ Key expiration set (90 days max)
- ✓ Monthly audit of active keys
If you're paranoid (smart move)
Use a separate exchange account with small balance ($1,000-5,000) for AI Traders. Keep main capital on different account. This is "VM" (virtual machine) for experiments. Main funds stay safe.
It takes time, but your main position is protected.
Summary
API keys = powerful and risky. Guard them like email password. Hacker with key = all your money gone in minutes.
Properly configured key = bot trades safely without access to your funds.
Ready to Start Trading?
Open an account on our platform and start earning with automated trading bots
Open AccountRelated Articles
- Strategies
Dollar-Cost Averaging: Regular purchases instead of guessing prices
How DCA protects against wrong entries and why this strategy works for beginners
- Risk Management
Martingale: The strategy that seems unbeatable
Why doubling your stake leads to bankruptcy faster than you think
- Strategies
Grid Trading: How to profit from sideways markets
When price swings back and forth, grids deliver steady income without predicting direction