GuidesChecklists

How to Connect a Trading Bot Safely: A 10 Step API Key Checklist

Hooking a bot up to your exchange takes about two minutes. Doing it so you won't regret it takes maybe ten. Those ten minutes decide whether a leaked key is a minor annoyance or a very bad day: without withdrawal rights a thief can't take your money, with them they can in minutes. There are ten habits, and each has a reason, so none of it is ritual.

By TASE TeamPublished Updated 5 min read

Glowing golden key resting on a dark glass shield with a small iris in its center, symbolising safe API key handling
On this page
  1. What an API key actually is
  2. 1. Lock down the account itself
  3. 2. Give the bot its own money
  4. 3. One service, one key
  5. 4. Read and trade. Never withdraw
  6. 5. Whitelist the service IP
  7. 6. Treat the secret like a password
  8. 7. Only paste it in the right place
  9. 8. Start small
  10. 10. Rotate and revoke
  11. Red flags: walk away
  12. If a key leaks anyway
  13. What stays with you
  14. Frequently asked questions

What an API key actually is

It's two strings, a public key and a secret. With them, a program can do things on your exchange account without knowing your password. Every key has its own permissions: read data, trade, withdraw. The nice part is that a bot can place orders for you without being able to log in or send your coins anywhere. Unless you hand it that power yourself.

Think of a hotel key card. It opens your door, but it can't check you out or carry your suitcases away. A good API key works the same way.

The rest is a handful of habits. Ten, to be exact.

1. Lock down the account itself

A key is only as safe as the account behind it. Use a long password you have never used anywhere else (a password manager helps), turn on two-factor with an authenticator app instead of SMS, and set the anti-phishing code if your exchange has one. If someone gets into the account, they can just make themselves a brand new key with any permissions they like.

2. Give the bot its own money

If the exchange has sub-accounts, make one for trading and connect the key there. If not, at least do not keep all your savings on the exchange. The bot needs what it trades with, not everything you own. This one habit shrinks the damage from nearly every other mistake on this list.

3. One service, one key

Do not reuse a key across tools. Make a new one for each and name it something you will understand in a year, like the service name and the date. If one service starts to feel off, you revoke that key and everything else keeps running.

4. Read and trade. Never withdraw

This is the big one. When you create the key, tick read and trade (spot or futures, whichever the service needs). Leave withdrawals off, and leave transfers between accounts off too. With withdrawals off, even a stolen key has little to work with: it can make a mess of trades, but it can't carry money out. A decent trading service has no reason to ask for withdrawal rights. If it does, close the tab.

Three permission switches for an API key: read on, trade on, withdraw off
The safe setting for a trading key: read and trade on, withdrawal off.

5. Whitelist the service IP

Many exchanges let you tie a key to specific IP addresses. A provider that cares about security will tell you which ones it uses. With the whitelist on, a stolen key simply does not work from anywhere else. If your exchange does not offer this, be even stricter about the other steps.

6. Treat the secret like a password

The secret usually shows up once, when you create the key. Copy it straight into a password manager. No screenshots, no sending it to yourself in a messenger, no notes file on a shared computer. Lost it? Delete the key and make another. That is easier than hunting for the old one.

7. Only paste it in the right place

Before you paste a key anywhere, look at the address bar. Is this the site you meant to open? Real services take keys inside their own dashboard. Not in a chat, not by email, and not in a DM from "support" who messaged you first. Nobody honest will ask for your exchange password or your two-factor code. Ever.

8. Start small

Connect, put in an amount you could live without, and watch the first trades. Are orders showing up where you expect? Do the sizes match what you were told? Do the stops live on the exchange itself? Trust is something you build over the first week. It is not a day-one gift.

9. Check in now and then. Turn on login and trade notifications if the exchange has them. Every so often, open the API page: you should see only your keys, with only the permissions you picked. A key you do not recognize, or a permission that changed, means you act right away.

10. Rotate and revoke

Replace your keys every few months, even when nothing is wrong. Think of a smoke detector battery. Delete the keys of any service you stopped using. And if you lose trust in a service for any reason, revoke its key on the spot. It takes seconds, and you can always make a new one.

Circular lifecycle of an API key: create, restrict, store, monitor and rotate
A key has a life cycle: create it, restrict it, store it, watch it, and replace it on schedule.

Red flags: walk away

The service asks for withdrawal rights. It asks for your exchange password or a two-factor code. It wants you to send it crypto first "to unlock the bot". It promises guaranteed or crazy returns. "Support" messages you first on a messenger. The site looks just like the exchange, but the address is a couple of letters off. One of these is enough.

If a key leaks anyway

Do not wait to find out if anyone used it. Revoke it. Then look at your open positions, orders and balances. If you doubt the account itself, change the password and the two-factor method. Make a new key only once you understand what happened. If you did steps 1 to 5, the damage should be limited to trading, and you have already stopped that.

See also: how to choose a trading bot.

Related reading: how to create a crypto wallet. Also: a strong password and APIs in plain words.

What stays with you

None of this is hard. It's just easy to skip, and trouble with trading bots rarely comes from clever hacking. More often it's one forgotten tick box. Good providers make it easy on you: they ask for read and trade only, publish their IP addresses and never need anything more. TASE works that way too. You can read how the system is built in the technology section, how it trades in how crypto auto trading works.

This article is educational and is not investment advice or a security guarantee. Trading cryptocurrencies and derivatives carries a high risk of losing all invested capital. Past results do not guarantee future ones.

Frequently asked questions

Is it safe to give a trading service an API key?

Pretty safe, if the key has only read and trade permissions, is restricted to the service's IP addresses and sits on an account with two-factor authentication. A key without withdrawal rights cannot move your coins out of the exchange.

Which permissions should an API key have for a trading bot?

Read and trade, limited to the market type the service needs (spot or futures). Withdrawals and transfers should stay disabled.

How often should API keys be replaced?

Every few months is a common habit, and right away if something feels wrong or you stop using a service. Delete keys you no longer need.

What should you do if a key may have been stolen?

Revoke it immediately, then review open positions, orders and balances, secure your exchange account and create a new key only once you understand what happened.

About the author

TASE Team · Editorial team

The TASE team builds an automated crypto trading system with its own algorithms and machine learning. We write about what we know from engineering and risk work, and we label opinion as opinion.

Educational content, not investment advice. Trading crypto and derivatives carries a high risk of losing all invested capital.

Explore TASE