Blog · Crypto automation · Article · updated 2026-09-25
Trade-only API keys: which permissions to enable, and which never to enable
A plain guide to exchange API key permissions for trading bots: what trade, read, transfer and withdraw mean, the passphrase exchanges, IP allow-lists and DEX agent keys.
The rule
A trading bot needs to do two things on your exchange: read your balances and positions, and place and cancel orders. It never needs to move money out of your account. So the only safe key for automation is a trade-only key: trading and read permissions on, withdrawals and transfers off. If a trade-only key leaks, the worst someone can do is trade badly; they cannot take your funds.
TensorTrader only accepts keys like that. It never asks for withdrawal permission, it rejects withdrawal-capable owner seeds on DEX venues that support delegated keys, and every new key is saved as testnet or paper first.
Permissions, one by one
- Read / General
- Enable. Needed to see balances, positions and fills.
- Trade / Futures / Contract trade
- Enable. Needed to place and cancel orders.
- Unified / Margin trading
- Enable only if your exchange puts perps under a unified account.
- Transfer / Internal send
- Never. Moves funds between accounts or users.
- Withdraw
- Never. Sends funds off the exchange.
- Sub-account management
- Never. Not needed for trading.
Exchanges that also need a passphrase
OKX, Bitget, KuCoin, BloFin and Kraken Futures ask you to choose a passphrase when you create the key, and they require it on every signed request alongside the key and secret. It is not your login password; it is a third credential that belongs to that key. Write it down when you create the key, because you cannot view it later. A passphrase from a different key, or from a live key when you saved a demo key, fails verification.
IP allow-lists
Many exchanges let you restrict a key to specific IP addresses. It is a good extra layer, but only when you know the IP your bot connects from. Restrict a key to the wrong address and every call fails with an authentication error. Either leave the list open, or add your automation server's outbound IP once you know it. TensorTrader treats IP errors as authentication failures and stops, rather than reading a blocked key as an empty account.
DEX venues: agent keys instead of API keys
Decentralized exchanges do not issue API keys. On Hyperliquid, Lighter and similar venues, your wallet approves a separate agent key that can trade but not withdraw. That is the DEX equivalent of a trade-only key, and it is the only kind TensorTrader stores. The one documented exception is dYdX v4, where the connect flow derives the restricted trading key from the owner mnemonic; it is labeled clearly in the UI.
Checklist when you create a key
- 1Create a new key just for the bot, named after it; never reuse a key across tools.
- 2Tick read and trade (futures or unified if needed). Leave transfer and withdraw off.
- 3Choose and record the passphrase if the exchange asks for one.
- 4Copy the secret immediately; most exchanges show it once.
- 5Start on the exchange’s testnet or demo key where one exists.
- 6Save it in TensorTrader as testnet, and confirm verification turns green.
If you suspect a key leaked
- 1Delete the key on the exchange first; that stops it everywhere at once.
- 2Remove it from TensorTrader with Disconnect & Remove API Key.
- 3Check the exchange’s order and login history for anything you did not do.
- 4Create a fresh trade-only key and save it as testnet again.
Frequently asked questions
- Does TensorTrader ever need withdrawal permission?
- No, never. Keys with withdrawal permission should not be used with any trading bot.
- What happens if my trade-only key leaks?
- Someone could trade your account but not withdraw. Delete the key on the exchange and create a new one.
- Is the passphrase my login password?
- No. It is a separate secret you choose when creating the API key.
Keep reading
Crypto trading automation, paper first: the complete guide
How to automate crypto trading without losing your shirt: key safety, testnets, market regimes, DCA, leverage, fees, backtests versus forward tests, choosing a platform, and our own honest results.
Crypto trading bot security checklist: 15 checks before you go live
A practical security checklist for automated crypto trading: keys, secrets, webhooks, leverage, monitoring and what a trustworthy bot service must never do.
What is a Hyperliquid API (agent) wallet, and is it safe?
A Hyperliquid API wallet is a separate key your main wallet authorizes to trade but never withdraw. Here is how it works, what it can and cannot do, and how TensorTrader creates one without ever seeing your seed phrase.
Non-custodial trading automation: your keys, your exchange, no deposits
Why TensorTrader never holds your funds: execution on your own exchange accounts with trade-only keys and DEX agent wallets, and how that differs from pooled bot services.
Not financial advice. Performance figures are TensorTrader testnet or backtest results with the method stated; past results do not predict future returns.