Exchange API Key Scopes, IP Allowlists, and Never Enabling Withdrawal for Retail Traders
Retail traders who connect bots, spreadsheets, or portfolio tools to an exchange often create an API key with more power than the job needs. This checklist covers least-privilege scopes (read vs trade vs withdraw), IP allowlists, and why withdrawal permission should stay off on automation keys. It does not invent prices, APYs, or product pitches, and it is not financial advice. For deposit address/network hygiene, see crypto deposit address and network selection hygiene. For withdrawal allowlists and 2FA devices, see withdrawal allowlist and 2FA device hygiene. For position sizing, see retail crypto exchange risk hygiene and position sizing. This article is about API trading-key hygiene only.
What an exchange API key actually is
An API key is a long-lived credential that lets software act inside your exchange account without your interactive login. Venues typically issue a public key id plus a secret (shown once). Many also let you attach permissions/scopes and sometimes an IP allowlist. Treat the secret like a password to a powerful sub-account: if it leaks into a Git repo, screenshot, or Telegram chat, assume compromise until you rotate.
Broader context on venue choice and risk: choosing a secure trading platform and risk management in crypto trading.
Scopes: read, trade, withdraw—pick the minimum
Label names vary by exchange, but retail keys usually map to a ladder of power. Prefer the lowest rung that still lets your tool work:
- Read / view — balances, open orders, fills, deposit history. Enough for portfolio trackers and most dashboards.
- Trade / order — place and cancel orders. Required for bots that execute; not required for watch-only tools.
- Withdraw / transfer — move funds off the venue (or to external addresses). For automation keys used by bots on a VPS or laptop, leave this off. Withdrawals belong behind interactive login, withdrawal address allowlists, and 2FA—not inside a script’s env file.
If a tutorial says “enable all permissions so it just works,” stop. That pattern maximizes blast radius when the secret leaks. Confirm exact permission names on your venue’s official API security docs before creating the key.
IP allowlists: bind the key to machines you control
Where the exchange supports it, restrict the key to specific public IPs (your home static IP, office egress, or the cloud instance that runs the bot). Requests from other networks should fail even if someone steals the secret.
- Note the egress IP of the host that will call the API (check from that host, not from your phone).
- Add only those IPs to the key’s allowlist before you paste the secret into production config.
- If you use dynamic residential IPs, prefer a small VPS with a stable address for the bot, or accept that you must update the allowlist when the IP changes—do not “disable allowlist temporarily” and forget.
- After any host migration, update the allowlist first, then restart the bot.
IP allowlists are not a substitute for narrow scopes. Combine both.
Never enable withdrawal on bot keys
A leaked trade-capable key can still hurt you (unwanted positions, fee burn, market noise). A leaked withdraw-capable key can empty the account to an attacker address, often faster than you notice. Separate the concerns:
- Use interactive account controls + withdrawal address allowlists for moving funds (see the allowlist and 2FA hygiene guide).
- Keep automation keys at read or trade only.
- If a vendor product demands withdraw scope, treat that as a hard stop unless you fully trust the vendor’s threat model and still prefer a dedicated low-balance sub-account.
Create, store, rotate: a repeatable key ops loop
- Create a dedicated key for each bot or tool—do not reuse your “main” key across apps.
- Enable the minimum scopes; confirm withdraw is off.
- Attach the IP allowlist; save the secret to a password manager or secrets store—never a public repo, screenshot, or chat paste.
- Name the key clearly (for example
portfolio-read-2026-09) so audits are easy. - Rotate on schedule and immediately after any suspected leak, laptop theft, contractor offboarding, or accidental commit.
- Delete unused keys; leftover “test” keys are a common forgotten risk.
If you think a key leaked
- Revoke or delete the key in the official exchange UI first—from a bookmark, not a DM link.
- Review open orders and recent API activity; cancel anything you did not intend.
- If withdraw was ever enabled on that key, treat it as an emergency: check balances, withdrawal history, and address allowlists immediately.
- Rotate related passwords/2FA only through official flows; beware fake “support” contacts.
Key takeaways
- Least privilege: read by default, trade only when needed, withdraw never on automation keys.
- IP allowlists shrink the usefulness of a stolen secret—combine them with narrow scopes.
- Dedicated keys, vault storage, and fast rotation beat a single “do everything” key.
- No affiliate links and no invented APYs in this article. Re-verify permission names on your venue’s official documentation.
Not financial advice. Exchange API permission names, IP allowlist behavior, and security defaults differ by venue and change over time. Always confirm on your exchange’s official API and security help pages before creating or using keys. Last verified 2026-09-28.