How to Create a Binance API Key for a Futures Bot (2026)

· 13 min read

To create a Binance API key for a futures trading bot, open your Binance Futures account first, then go to API Management, create a system-generated key, tick Enable Futures, leave Enable Withdrawals off and restrict the key to the bot's server IP. Copy the secret straight away, and paste the key and secret only into the bot's own website, never into a chat.

How to create a Binance API key for a futures bot: futures on, withdrawals off, locked to one IP

Below, each step as Binance's own help centre describes it today, then where the key goes for HafizeBot and what to do when Binance refuses it. Binance renames menus from time to time; where a label differs on your screen, look for the nearest match.

What a Binance API key is, and what it is not

An API key is a pair of strings that lets a program act on your Binance account without your password. The API key says which key is calling; the secret key signs each request so Binance knows it really came from you. Together they work like a login for software, limited to the permissions you tick.

It is not your password, and it does not move your funds: the money stays in your own Binance wallets, and the key only allows what you switch on. That is why the permissions and the IP restriction below matter most.

Creating a key costs nothing in the steps below. What a bot costs you is the trading fees on the orders it places, and whatever its own plan costs.

Before you start: what Binance asks for first

Binance's own article on creating API keys lists three things to do before the Create API button works for you:

  • Two-factor authentication (2FA) switched on for your account.
  • Identity verification completed.
  • A deposit of any amount to your Spot Wallet, which Binance says activates the account.

For a futures bot there is a fourth step, and its place in the order matters. Binance says a key cannot get the Futures permission if it was created before you enabled your Futures account. So open Futures first and make the key afterwards. If you already made one the other way round, delete it and make a new one.

Binance also says the Futures permission cannot be enabled while Portfolio Margin is active on the account. If you use Portfolio Margin, sort that out on Binance before you start.

Five-step order: open Futures, create the key, tick Futures, lock the IP, save it and send /on

How to open a Binance Futures account

Binance's help article "How to Open a Binance Futures Account?" describes it like this:

  1. Choose Futures from the Binance homepage menu and log in.
  2. Click Open Account.
  3. In the pop-up, select your trading experience level. Binance sets a default leverage from it (its article lists 2x for beginners, 5x for experienced and 20x for advanced).
  4. Accept the Binance Futures Service Agreement & Risk Acknowledgment, then click Open Now.

Binance adds that you must complete identity verification before you can trade on Binance Futures, and that the account needs funding before the first trade. Funding is covered further down.

How to create the API key on the Binance website

With Futures open, the key itself takes a couple of minutes. On the website, Binance's steps are:

  1. Click your profile icon and open Account.
  2. Open API Management and click Create API.
  3. Choose the key type: System-generated for a bot like ours (more on the two types below).
  4. Enter a label. Name it after the bot, for example "HafizeBot", so you always know which key belongs to which service.
  5. Verify with your 2FA devices or passkey.

The key is created, and Binance shows you the API key and the secret key. Copy the secret into a password manager or straight into the bot's key page now. Plan on not seeing it again: if it is lost, the fix is to delete the key and create a new one, not to recover it.

System-generated keys, which the HafizeBot keys page asks for, against self-generated Ed25519 or RSA keys

System-generated or self-generated? A system-generated (HMAC) key is made entirely by Binance. A self-generated (Ed25519 or RSA) key is a pair you create yourself, giving Binance only the public half; use one only when a bot asks for it by name. The HafizeBot keys page asks for a system-generated key and its secret.

Where is the API key on the Binance app?

In the Binance app, Binance's steps are to switch to the Binance Pro version, tap More to open the services panel, scroll to the Other section and tap API Management. From there, Create API, the key type, the label and the 2FA check are the same as on the website.

If the menu has moved, type "API Management" into the app's search bar.

Which permissions to tick: Reading and Futures only

A new key starts with Enable Reading, which lets the bot see balances and positions. A futures bot needs exactly one more box: Enable Futures. Nothing else.

Permissions checklist: keep Reading, tick Futures, restrict the IP; never Withdrawals, no Spot and Margin trading, never unrestricted

  • Enable Withdrawals: never. No trading bot needs it. HafizeBot never asks for it, and if you save a key that has it on, both the keys page and the bot warn you to switch it off. A key that cannot withdraw cannot send your money anywhere, even if it leaks.
  • Enable Spot & Margin Trading: not needed. Our bot trades USDⓈ-M futures only, so spot trading permission adds risk and no function.
  • Other permissions: leave them off. If you do not know why a bot would need a box, it does not.

To change permissions later, edit the key's restrictions in API Management and save.

Restrict the key to one IP address

Under the key's IP access settings, choose Restrict access to trusted IPs only and add the IP address your bot trades from. A restricted key only works from that server, so a key that leaks through a screenshot, a phishing page or an infected laptop is useless to whoever has it.

For a system-generated futures key this is not optional in practice. Binance's article says that since 30 January 2023 a system-generated key on an unrestricted IP can only be set to Enable Reading, and that unrestricted HMAC keys have no permission other than reading. Its alternatives are a self-generated key or switching off Binance's default security controls; we would not do the second for a trading key.

Map of key risk: a futures key locked to one server IP sits in the low-harm corner, one open to any IP does not

The HafizeBot IP is 91.99.78.29. It is the server every Binance call from our bot leaves from, and it is published on our step-by-step help page for connecting a key and on the keys page itself. Add exactly that address, nothing else. A key restricted to a different IP, or one with a typo in it, is refused by Binance on every request.

The numbers to know: two permissions, zero withdrawal rights, one IP, one bot per key

Set one-way mode and fund the USDⓈ-M Futures wallet

Two Binance settings outside the key decide whether the first order goes through.

Position mode. HafizeBot trades in Binance's one-way mode: one position per coin, long or short. In hedge mode Binance refuses the bot's orders with error -4061. To switch, open the USDⓈ-M futures trading screen, tap the settings icon at the top right, then Preference → Position Mode → One-way. Binance only allows the change with no open orders and no open positions. Our one-way mode help page covers the details, including using a sub-account if you trade hedge mode by hand.

The futures wallet. Spot, Funding and Earn balances do not count for futures. On the futures screen, find the Assets panel, click Transfer and move USDT into the USDⓈ-M Futures wallet. Binance notes that USDⓈ-M and COIN-M futures use separate wallets, so check which one you are moving into.

How much depends on your settings. Each trade uses your position size as margin:

Margin in use at 5 USDT per trade: 5, 15, 25 and 50 USDT for 1, 3, 5 and 10 open positions

At the default 5 USDT of margin per trade and the default limit of 3 positions, a full book ties up 15 USDT, and each repeat entry on a coin you already hold adds another 5. When the wallet runs short, Binance refuses the next order with "Margin is insufficient". Our guide to error -2019 explains the maths in full.

Where to enter the key for HafizeBot

Keys for HafizeBot go into one place: hafizebot.com/app/keys, after you log in with Telegram. We never ask for a key or a secret in a Telegram chat, by email or in a form, and anyone who does is not us. Older versions of this page described a form; that flow is gone.

The full setup, start to finish, is ten steps:

  1. On Binance: turn on 2FA, verify your identity and make a small deposit to Spot.
  2. On Binance: open the Futures account.
  3. On Binance: move USDT into the USDⓈ-M Futures wallet.
  4. On Binance: set position mode to one-way.
  5. On Binance: create a system-generated key labelled for the bot.
  6. On Binance: tick Enable Futures and leave Enable Withdrawals off.
  7. On Binance: restrict the key to 91.99.78.29.
  8. In Telegram: send /autotrade in @hafizebot. For an active VIP member it switches on immediately.
  9. On the website: open hafizebot.com/app/login, tap Log in with Telegram, go to the keys page and paste the key and the secret.
  10. In Telegram: check your limits with /settings or /summary, then send /on.

Seven of the ten steps happen on Binance, two in the Telegram bot and one on hafizebot.com

When you save, the secret is encrypted before it is stored and is never shown again; the page only confirms a key is set and shows its last four characters. Saving a key does not start trading by itself. That is what /on is for.

If the key you saved can withdraw, is open to any IP, or does not have Enable Futures, the keys page still saves it and tells you which of the three to fix on Binance.

What /on checks before the bot trades

When you send /on, the bot asks Binance once about your saved key before it switches auto-trading on:

  • Does the key work at all? If Binance refuses it (for example error -2015), auto-trading stays off and the bot tells you the code and what usually causes it.
  • Is Enable Futures ticked? If the key can read the account but not trade futures, auto-trading stays off, because every order would be refused anyway.
  • Anything to warn about? A key that can withdraw or is open to any IP gets a warning in the reply.

If Binance cannot be reached at that moment, the bot switches on and says the key was not checked, so an exchange hiccup does not keep anyone switched off. If no key is saved yet, /on says nothing can trade until you add one.

/on does not check your position mode or your futures balance. Those show up on the first order, and /lastsignals then gives the reason for each signal the bot took or skipped.

How to edit, rotate or revoke the key

Timeline of one key: created after Futures, restricted, saved on the website, checked by /on, deleted when anything looks wrong

  • To revoke it on Binance: open API Management and delete the key. From that moment Binance refuses it, and nothing can trade with it. You need nobody's permission for this.
  • To remove it from HafizeBot: on the keys page choose Delete key and confirm. Auto-trading is switched off first, then the key and secret are wiped. Positions and orders already open on Binance stay open; manage them there. Our post on what happens to open positions if the bot stops explains what keeps working.
  • To rotate it: create a new key the same way, save it on the keys page (it replaces the old one), then delete the old key on Binance.
  • If you pasted a key into a chat by mistake, or anything about the account looks wrong, delete the key on Binance and make a new one. Do not wait to find out whether it mattered.

One key per bot means you can cut one service off without breaking the others. What a malicious bot could do at each permission level is in our guide to connecting a trading bot to Binance safely.

Common errors after creating a key

Most first-hour problems are one missed box or one mistyped character, and Binance's error code says which:

Table of Binance codes after a new key: -2015, -2014, -2008, -1022, -2019 and -4061 with the usual fix for each

The one people meet most is -2015, "Invalid API-key, IP, or permissions for action": usually Enable Futures is not ticked, the IP restriction is not exactly the bot's IP, or the key was created before the Futures account. The full checklist is in Invalid API-Key, IP or Permissions: why the bot stopped. Codes -2014 and -1022 usually mean the key or the secret was pasted with a missing or extra character.

When Binance refuses a key or rejects an order for margin, HafizeBot switches auto-trading off and tells you why, rather than retrying the same failure. Once fixed, send /on. Our list of Binance Futures error codes covers the rarer ones.

What a working key does not tell you

A correctly made key is the safe part. It says nothing about whether a bot's signals are any good. For HafizeBot, every signal's result is on the live performance page, including the misses, and the stronger ones, strength 3 and up, appear 20 minutes later in the free Telegram channel, so you can watch them before you pay or connect a key. The signals themselves are AI-generated from a model that evaluates 240+ indicators, formulas and components.

Auto-trading is part of every VIP plan, which starts at 50 USDT a month for Tier 1, paid in USDT with /join in the bot.

Frequently asked questions

Is a Binance API key free? Yes. Binance does not charge for creating a key in API Management. What you pay is Binance's normal trading fees on the orders the key places, plus whatever the bot service charges.

How do I get a Binance Futures API key? There is no separate futures key. Open your Futures account first, then create a normal key in API Management and tick Enable Futures on it. A key created before the Futures account was opened cannot get that permission, so make a new one.

Why can I only tick Enable Reading on my new key? Because the key is not restricted by IP. Binance says that since 30 January 2023 a system-generated key on an unrestricted IP can only have Enable Reading. Add the bot's IP under Restrict access to trusted IPs only, and the other boxes become available.

Should I enable withdrawals for a trading bot? No. A trading bot places orders; it never needs to move money out of your account. Leave Enable Withdrawals off, so a leaked key cannot send your funds anywhere.

Where do I paste my Binance API key for HafizeBot? Only at hafizebot.com/app/keys, after logging in with Telegram. Never in a Telegram chat or by email; we never ask for a key or a secret that way.

What happens if I delete my API key on Binance? Binance refuses it from that moment, so the bot can no longer place or change orders. Positions already open stay open on your account, with whatever take-profit and stop orders Binance already holds for them.

The short version

Open Futures, then make one system-generated key per bot with Reading and Futures only, restrict it to the bot's IP, and paste it only on the bot's own website. Keep Enable Withdrawals off for good. A good key makes a bot safe to connect, not profitable to use: futures trading with leverage can lose money quickly, and none of this is investment advice. Only trade what you can afford to lose, and check the performance record before you connect anything.

binance api key how to create binance api key binance futures api key binance api key permissions binance api key ip whitelist trading bot setup