Giving a Bot Your API Key: What Each Permission Switch Actually Opens

Giving a Bot Your API Key: What Each Permission Switch Actually Opens

An API key is a bundle of switches rather than a password. The dangerous ones are gated on whether you pinned an address, and the exchange checks that first.

Built from exchange documentation read directly, checked September 2026
The short version

QuestionShort answer
Is an API key a password?No. It is a bundle of switches, and you decide which ones are on.
How many switches are there?At least three that matter: reading, trading, and withdrawals.
Which one should a tracking app get?Reading only. Most tools never need more than that.
Can money leave without the withdrawal switch?Yes. Trading permission alone can drain a balance.
What actually decides my permissions?Whether you pinned an IP address. The exchange gates the dangerous switches on it.
My key was leaked. Is that covered here?No, that is a different article. This one is about the state before that.

A tool asks for an API key and the setup guide says to tick a few boxes. Those boxes are the whole decision, and they are usually ticked in about four seconds by someone who has never been told what the third one does. This is what each switch opens, and why the exchange decides some of it before you do.

Structure diagram of the three permission switches attached to an exchange API key, showing that reading exposes balances, positions and order history and is what portfolio trackers and tax tools need, that trading allows orders to be placed and cancelled against the balance and is what automated strategies need, and that withdrawals allow assets to leave the account and are needed by almost nothing an individual runs, with a note that the damage a leaked key can do is fixed at the moment these switches are chosen - Cryptonakta
One credential, three different sizes of accident. You pick which one at creation.

1. A key is a bundle of switches, not a password

Someone asks for your API key. A portfolio tracker, a tax tool, a trading bot, a friend who wrote a script.

The honest answer to “is it safe” is that the question is pointed at the wrong thing. It is not one credential with one level of access.

Three terms, then nothing else technical

An API key is a credential you generate so an outside program can act on your exchange account without logging in. No password prompt, no second factor, every time.

Permissions are the switches attached to that key. The exchange lets you turn them on separately, and the key can only do what is switched on.

An IP whitelist is a list of network addresses allowed to use the key. Requests from anywhere else are refused even when the key is correct.

What the switches actually are

SwitchWhat it allowsWho genuinely needs it
ReadingSee balances, positions, order history, fillsTrackers, tax tools, dashboards, spreadsheets
TradingPlace, modify and cancel orders on your balanceBots and automation that actually trade
WithdrawalsSend assets out of the accountAlmost nothing an individual runs

Most people asking the question only need the first row. That is the single most useful sentence here.

Why “is it safe” has no yes or no

A read-only key handed to a badly run service leaks your balance history. Unpleasant, not expensive.

The same service holding a key with trading switched on is a different size of problem entirely. You decided which one it was at creation time, in about four seconds.

Why this matters more than it used to

Connecting an outside program to an exchange used to be a developer activity. Now a tax tool, a phone app and a spreadsheet template all ask for the same thing.

The audience changed and the screen did not. It still presents the switches the way it always did, to people who have not been told what they mean.

That gap is the whole reason this article exists. None of it is difficult once the three switches are named.

2. Pinning an address decides what you may switch on

Here is the part that reorders the rest. You do not freely pick your permissions.

The exchange looks at whether you pinned an IP address first, and that answer limits what you are allowed to switch on.

What the documentation says

Binance’s support pages put it plainly. Adding IP access restrictions is mandatory to enable withdrawal permission, and a system-generated key can only be set to reading if your IP is unrestricted.

Read the second half again. With no IP pinned, the read-only setting is not a recommendation. It is the only thing available.

A different platform, the same conclusion

OKX does not block it the same way. Its developer documentation covers keys that hold trade or withdraw permissions without being linked to an address. Those expire after fourteen days of inactivity. The same page allows up to twenty addresses per key.

So one venue refuses to issue the permission and the other quietly lets it die. The mechanism differs. The position does not.

Why this is worth knowing before you start

People usually meet this rule as an error message, halfway through setting up a bot, and read it as the exchange being awkward.

It is not awkwardness. Two independent platforms decided that unpinned keys with real power are the thing to prevent, and they built the screen around that.

Which means the practical first question is not which switches to turn on. It is whether the machine running this program has an address you can pin.

3. Withdrawals off is not the same as harmless

The common plan is to leave withdrawals off and treat everything else as low stakes. The first half is right. The second half is where people get hurt.

Trading permission moves money too

A key that can trade can spend your balance. It does not need to send anything out of the account to leave you with less than you started with.

That has happened at scale. A breach at a trading bot service exposed a large number of exchange keys. The losses that followed came from unauthorised trading rather than withdrawals. What that looked like is in an exchange account that has been taken over.

The mechanics of how a bad fill happens at all are in order types and why positions get liquidated. This article stays on the switch.

So what does leaving withdrawals off actually buy

It removes the fastest and most complete outcome. Assets cannot be sent to an address that is not yours.

It does not make the key harmless, and it is not a substitute for pinning an IP. Those are two separate controls doing two separate jobs.

The useful way to think about the trading switch

Ask what the program does when it is working correctly. If the answer never includes placing an order, it does not need the switch, no matter what its setup guide says.

Plenty of tools request more than they use, because asking once is easier than asking twice. That is a reason to check rather than a reason to panic.

4. What the two platforms actually publish

These are the published rules on the two platforms whose documentation was read directly for this article, checked in September 2026. Other venues word it differently, so read your own screen.

RuleBinanceOKX
Permission splitReading and withdrawals switched separatelyRead, trade, withdraw
Withdrawals without a pinned IPNot available. IP restriction is mandatoryAllowed to exist, but expires
Unpinned key with trade or withdrawSystem key limited to readingExpires after 14 days of inactivity
Addresses per keyWhitelist required for withdrawalsUp to 20, IPv4 or IPv6, ranges allowed
Credential piecesKey and secret, or a key you generate yourselfKey, secret and a passphrase you choose

Figures checked September 2026 and set by each platform. Treat them as the shape of the rule rather than as constants.

The credential is not always two pieces

On one platform a system-generated key is a key and a secret. Keys you generate yourself use a different scheme and you hold the private half.

On the other, there is a third piece: a passphrase you chose at creation, required on every request alongside the key and secret.

The practical consequence is small but it catches people. If you stored two strings and the program asks for three, nothing is broken. You are on a platform that uses three.

What none of them store

The secret is shown once, at creation. No exchange will show it again, and support cannot retrieve it.

So a lost secret is not a recovery problem. It is a delete-and-make-a-new-one problem, which is a much better problem to have.

5. Matching permissions to what the tool does

Sort the tools by what they do when working correctly, and the permission answers itself.

What you are connectingPermissions it genuinely needs
Portfolio tracker, balance dashboardReading
Tax or accounting tool pulling historyReading
A spreadsheet you wrote yourselfReading
Grid bot, automated strategy, copy toolReading and trading. Not withdrawals
Something that moves funds between venues for youWithdrawals, which is where the IP requirement lands
Backtesting or practiceA testnet key, which is not a key on your real account

The last row gets skipped a lot. Test environments issue their own keys, and using a live key to practise is the avoidable version of this whole subject.

When a bot asks for withdrawals

Some legitimate setups genuinely need it, mostly ones that rebalance across venues. Most do not.

If a strategy tool asks for it, the question worth asking is which feature uses it. A clear answer is fine. No answer is an answer.

What a continuously running strategy actually does is set out in the grid trading bot, and withdrawing is not on that list.

If you are still choosing where to run any of this, the comparison is in choosing a crypto exchange. The checks that matter before depositing anywhere are in how to tell if an exchange is legitimate.

Diagram showing that pinning an IP address is checked before permissions are granted, with one platform making IP restriction mandatory to enable withdrawal permission and limiting a system-generated key to reading when the IP is unrestricted, and a second platform allowing an unpinned key to hold trade or withdraw permissions but expiring it after fourteen days of inactivity, demonstrating that two venues reach the same position by different mechanisms - Cryptonakta
Two platforms, two mechanisms, one conclusion: unpinned keys do not get real power.

6. One program, one key

One key for everything is convenient until the day it is not. The alternative costs about a minute.

One program, one key

Give each tool its own key, named after the tool. Then the day something looks wrong, you delete one key and one program stops working.

With a shared key you face a worse choice: delete it and break everything at once, or leave it alive while you work out which tool leaked.

Delete rather than disable

Keys accumulate. A service you tried for a week two years ago is still holding a working credential unless you removed it.

The exchanges treat idle keys as a problem too. That is what the fourteen day inactivity expiry above is doing.

The habit worth having is a calendar reminder, not a policy. Open the API management page occasionally and delete what you no longer recognise.

Where the secret lives

Not in a chat message, not in a screenshot, not in a repository. Those three account for most of the accidental leaks that are nobody’s fault in particular.

A password manager entry is enough. It is the same storage problem as a recovery phrase, with one difference. An API key can be replaced in thirty seconds, so when in doubt you replace it.

Naming keys so the list stays usable

Most platforms let you label a key. Use the name of the program, not a date or a number.

A year later the label is the only thing telling you whether a key is still in use. A key called “test” is a key you will never feel confident deleting.

If you already have unlabelled keys, the safe move is deleting them and recreating what you actually need. Something breaking is how you discover what was using it.

7. The whitelist, and whose address goes in it

Pinning an address sounds like a task for someone with a server. Often it is simpler than that.

What you are actually pinning

The whitelist holds the address the program connects from, not the address of your own laptop or phone unless the program runs there.

A bot running on a rented server has one fixed address, which is the easy case. A bot running on your home connection has whatever address your provider hands out, which may change.

That difference is why the same feature feels trivial to one person and impossible to another. It is not about skill.

When your address moves

Some providers give a stable address for months. Some change it weekly. You find out by checking twice a few days apart rather than by guessing.

If it moves, there are two realistic options. Run the program somewhere with a fixed address, or accept read-only and do the trading part another way.

What is not an option on at least one major platform is keeping withdrawal permission without pinning anything. The screen simply will not issue it.

Ranges, and why the limit exists

Whitelists usually accept several addresses, and network ranges as well as single addresses. That covers the normal case of a program moving between two machines.

They are capped rather than unlimited, because a whitelist covering everything is the same as no whitelist. The cap is the feature working as intended.

Reading the whitelist field

Where the program runsDoes it have a fixed addressWhat that leaves you
Rented server or cloud instanceYes, one that does not moveEvery permission the platform offers
A machine at a company or campusUsually, and often a rangeSame, if you can get the range from whoever runs the network
Home connection, provider assigns itSometimes stable for months, sometimes notCheck it twice before relying on it
Laptop that moves between networksNoRead-only, or move the program somewhere fixed
Phone on mobile dataNo, it changes constantlyRead-only

The bottom two rows are the ones people fight against. The screen is not being difficult there, it is telling you that this program cannot be pinned.

A mistake worth naming

People sometimes paste their own home address into the whitelist for a key that a hosted service will use. Then the service cannot connect and the key looks broken.

It is not broken. The whitelist wants the address of whatever machine sends the requests, and for a hosted tool that is the provider’s server, not you.

Any tool that expects a key will publish the addresses it connects from. If it does not publish them, that is a fact worth weighing before you hand over anything.

8. Keeping practice keys away from real ones

Two accounts get confused constantly, and mixing them is the most common way a careful person still ends up exposed.

Testnet keys are not your keys

Test environments are separate systems with separate balances that are not worth anything. They issue their own keys.

A key made there cannot touch your real balance, which is exactly why you use it while a strategy is unfinished.

The mistake is the reverse: pointing a half-finished program at a live key to see whether it works. It works, and that is the problem.

Spot and derivatives are often separate switches

Many platforms split trading permission by product, so a key that can trade spot cannot necessarily open a futures position.

That split is useful. If your program only trades spot, leaving the derivatives switch off costs you nothing and removes the outcome where a bug opens leveraged positions.

What those products differ on is covered in spot versus futures, and what leverage does to a position is in isolated and cross margin.

One more separation worth keeping

A key that trades does not need to be the key that reads. If a dashboard and a bot both want access, two keys with different switches are strictly better than one key with both.

9. The order to follow before you press create

The whole thing collapses into a short order. It takes under a minute once you have done it twice.

Before you press create

  1. Name the key after the program that will hold it. A list of keys called “key1” is a list you cannot audit later.
  2. Decide the permissions from what the program does, not from what its setup guide requests. Reading covers more tools than people expect.
  3. Find out the address the program connects from before you start, because on at least one platform this decides which switches you are allowed.
  4. Pin that address if you have one. If the program runs on a connection that changes, plan for read-only instead.
  5. Leave withdrawals off unless a specific feature you use needs it and you can name that feature.
  6. Store the secret once, properly. It is shown a single time and cannot be retrieved afterwards.
  7. Run it small first. Same logic as a test transfer: confirm the thing behaves before it handles size.

And afterwards

Keep the list short. When you stop using a tool, delete its key that day rather than adding it to a mental list.

If something already looks wrong, this is not the article for it. Start at an account that has been taken over, and if you have lost access to your second factor as well, losing 2FA covers what is locked and what is not.

What this order is protecting against

Steps two and five keep the size of a bad day small. They decide what a leaked key could do, before anything leaks.

Step three and four decide whether you get those permissions at all, which is the part most people meet as a surprise halfway through.

Step six is the one that causes avoidable panic later. The secret appears once and people assume they can find it again.

Decision table matching tools to the permissions they genuinely need, showing portfolio trackers, tax software and self-written spreadsheets requiring reading only, grid bots and automated strategies requiring reading and trading but not withdrawals, cross-venue rebalancing requiring withdrawals which is where the address requirement applies, and practice or backtesting requiring a testnet key that is not issued on the live account - Cryptonakta
Most rows end at reading. That is the useful finding, not a precaution.

10. Five beliefs that cost people money

Five beliefs cause most of the avoidable exposure. All of them sound sensible.

What people believeWhat the screen actually does
Withdrawals off means the key is safeTrading permission alone can spend the balance. The two controls do different jobs
I choose my permissions freelyWhether you pinned an IP is checked first, and on one platform an unpinned system key is limited to reading
An IP whitelist is only for advanced usersIt is mandatory for withdrawal permission on one of the two platforms read for this article
One key is easier to manageIt is, until you need to revoke one tool and find you can only revoke all of them
A key I stopped using is harmlessIt works until deleted. Platforms expire idle unpinned keys precisely because of this

One more that is half true

People say a read-only key cannot hurt you. Mostly right.

What it still exposes is your position history and balance sizes, which is information somebody can use in a targeted approach. The usual shape of those approaches is in how crypto scams work.

So read-only is the correct default rather than a guarantee. It limits the damage instead of removing the question.

11. Where the account lives

Where the account lives decides which of these screens you get. The permission model, the whitelist rules and the wording all come with the platform.

These are places where this kind of setup is common. Their API screens differ, so treat the descriptions below as a starting point and read your own.

Binance

Binance signup QR, scan to open Binance (Cryptonakta referral)Claim your perk →

Code: CRYPTONAKTA
Installing the app directly? Enter CRYPTONAKTA in the “Referral” field at sign-up. That’s how your benefit (and our credit) attaches.
Documents that IP restriction is mandatory before withdrawal permission can be enabled

OKX

OKX signup QR, scan to open OKX (Cryptonakta referral)Claim your perk →

Code: 46938989
Installing the app directly? Enter 46938989 in the “Referral” field at sign-up. That’s how your benefit (and our credit) attaches.
Publishes its permission levels and the expiry rule for unpinned keys in developer docs

Bybit

Bybit signup QR, scan to open Bybit (Cryptonakta referral)Claim your perk →

Code: 5ZGKX#0
Installing the app directly? Enter 5ZGKX#0 in the “Referral” field at sign-up. That’s how your benefit (and our credit) attaches.
Open its API permission screen and read the options there before connecting a tool

KuCoin

KuCoin signup QR, scan to open KuCoin (Cryptonakta referral)Claim your perk →

Code: CXEM4JP5
Installing the app directly? Enter CXEM4JP5 in the “Referral” field at sign-up. That’s how your benefit (and our credit) attaches.
Uses a separate API passphrase alongside the key and secret

Affiliate disclosure: some links are partner links. We may earn a commission at no extra cost to you. This is not investment advice.

If custody rather than automation is what you are weighing, the alternative is in what a crypto wallet is. What a hardware device does and does not stop is in what a hardware wallet protects.

12. How I decide in practice

My own rule is short, and it comes from the permission screen rather than from a threat model.

What I do, in order

I start from what the program does when it works, and I turn on nothing else. That single habit removes most of the decisions.

I make a key per tool and name it after the tool. It costs thirty seconds and it means a bad day is a one-line fix instead of a rebuild.

I do not switch on withdrawals. Not as a principle, but because I have never run something where I could name the feature that needed it. If I did, I would pin an address first, because on one platform I would have no choice anyway.

Where I think the common advice is wrong

The standard framing is “protect your API key like a password”. It is well meant and it teaches the wrong instinct, because it suggests the risk is about how well you hide a string.

Most of the outcome is decided before you hide anything, at the moment you choose the switches. A well-hidden key with trading enabled is worse than a carelessly stored read-only one.

The part I am least sure about

I do not know how well the average tracking service stores what you give it, and neither does anyone else outside those companies. That is the uncomfortable centre of this subject.

What I am confident about is the shape. Permissions are separate, the dangerous ones are gated on pinning an address, and the secret is shown once. Those held on both platforms whose documentation I read, and they are what I would still teach if every screen were redrawn.

A reasonable objection

Someone could say this is a lot of care for a tracker that just reads balances. Fair enough, and for a read-only key I would not argue.

The care is priced for the other rows in the table. The problem is that the same screen issues both, and the four seconds where you decide which one you are making do not feel different at the time.

Frequently asked questions

Q. How do I sign up for Binance, step by step?
1) Register with your email or phone on the official Binance site or app. 2) Complete identity verification (KYC). 3) Enable app-based 2FA for security. 4) Enter referral code CRYPTONAKTA in the referral field at sign-up to get an ongoing 10% discount on spot trading fees. Where direct fiat deposit is limited, buy a coin or stablecoin on a local exchange and transfer it in, or use P2P.
Q. Is it safe to give a trading bot my API key?
It depends entirely on which switches you turned on, which is your decision rather than the bot’s. A key with reading only exposes your balances and history and cannot move anything. A key with trading can spend your balance even though it cannot send coins out. A key with withdrawals can send them out. Decide from what the program does when it is working, turn on nothing else, and pin an address if the program runs somewhere with a fixed one.
Q. What is the difference between read-only and trading permission?
Reading lets a program see balances, positions, order history and fills. It cannot place an order or move anything. Trading lets it place, change and cancel orders using your balance, which means it can change what you hold and what it is worth. Most tools people connect, such as portfolio trackers and tax software, only need reading, so the trading switch is worth leaving off unless the tool’s actual job is placing orders.
Q. Can someone take my money if withdrawals are switched off?
They cannot send assets to an address of their own, which removes the fastest outcome. They can still cause losses if trading is enabled, because a key that can trade can spend the balance. That is not theoretical: a breach at a bot service exposed a large number of exchange keys and the damage came through unauthorised trading. Leaving withdrawals off is worth doing and is not a substitute for restricting the key by address.
Q. Why does the exchange force an IP whitelist on me?
Because an unpinned key with real permissions is the case it is trying to prevent. Binance’s documentation states that IP restriction is mandatory to enable withdrawal permission, and that a system-generated key can only be set to reading when the IP is unrestricted. OKX takes a different route to the same place, saying keys not linked to an address that hold trade or withdraw permissions expire after fourteen days of inactivity.
Q. What do I put in the IP whitelist?
The address the program connects from, which is not your own device unless the program runs on it. A bot on a rented server has one fixed address and this is straightforward. A program on a home connection may have an address that changes, and you find out by checking it twice a few days apart. Whitelists normally accept several entries and network ranges, with a cap, because a whitelist covering everything would be the same as having none.
Q. I lost my secret key. Can I get it back?
No, and no exchange can retrieve it, because the secret is shown once at creation and not stored in a form support can read. This is less of a problem than it sounds. Delete the key and create a new one with the same permissions, then update the program that used it. A lost secret costs you a few minutes, while a secret you keep hunting for in old messages is a real risk.
Q. Why is my key asking for three values instead of two?
Because platforms structure the credential differently. One issues a key and a secret for system-generated keys, and uses a different scheme for keys you generate yourself where you hold the private half. Another requires a passphrase you chose at creation on every request, alongside the key and the secret. If a program asks for a passphrase and you only saved two values, nothing is broken, you are simply on a platform that uses three.
Q. Should I use one API key for everything?
One key per program is easier to live with. Name each key after the tool that holds it. On a bad day you delete one key and one program stops, instead of choosing between breaking everything at once and leaving a suspect credential alive while you investigate. It also makes the list auditable later, which a list of keys called key1 and key2 never is.
Q. Do I need a separate key for futures?
Often yes, because many platforms split trading permission by product, so a key that trades spot cannot necessarily open a derivatives position. That split is useful rather than annoying. If your program only trades spot, leaving the derivatives switch off removes the outcome where a bug opens leveraged positions. The difference between the two products is set out in spot versus futures.
Q. What should I do with keys I no longer use?
Delete them the day you stop using the tool. A key keeps working until it is removed, so a service you tried once two years ago is still holding a live credential unless you cleaned it up. Exchanges treat this as a problem too, which is why unpinned keys with trading or withdrawal permissions expire after a period of inactivity on at least one platform. Opening the API management page occasionally and removing what you do not recognise is the whole habit.
Q. My key may have leaked. What now?
That is a different situation from this article, which is about the state before it. Start by deleting every key you do not recognise, then work through sessions and devices. The full sequence, including what an attacker can do without ever logging in, is in an exchange account that has been taken over. If you have also lost access to your second factor, losing 2FA covers what that locks and what it does not.
Sources: exchange documentation opened and read directly for this article, namely Binance’s support page on creating API keys and OKX’s developer documentation on API key creation, permissions and security, both checked in September 2026. Documentation from other venues could not be read as text and is therefore not quoted here, which is why the article describes the shape of the rule and asks you to confirm on your own screen. Permission names, limits and screens differ by platform and change without notice. Nothing here is a recommendation of a specific platform, tool or automation service.

Read next: what happens when an exchange account is taken over

Editorial standardsIndependent crypto editorial · honest, no hype · not investment advice.
🌐 English