Zhenku
Wards · Lock the Door · API

Binance API Key Permissions and IP Whitelist: What Each Setting Allows, and What to Do After a Leak

Zhenku Editorial · Cheng Mo Updated 2026-11-13 About 14 min
A robotic arm holding a gold key can only pass through one narrow gate, kept on a leash by the guardian beast (cover illustration, AI-generated)

On Binance, the permission boxes you tick and the IP restriction you set look like two separate settings, but the rules tie them together: a system-generated key with no IP restriction can only read, and withdrawals can't be switched on until you add an IPv4 restriction. The first rule has applied since 2023-01-30 00:00 (UTC); both are in Binance's current Help Center article (checked November 2026). If you want a tool to trade for you without binding an IP, Binance lists exactly three ways out: add an IP restriction, switch to a self-generated Ed25519 or RSA key, or disable the default security controls. Below, the two settings are taken one at a time, what each stops and what it doesn't, followed by how to read error -2015 and what to do after a leak.

Two settings inside one key

An API key lets a program talk to Binance as you. Binance offers two kinds. A system-generated key uses HMAC symmetric encryption, and you get two strings back: the API Key and the Secret Key. A self-generated key uses Ed25519 or RSA: you create the public-private key pair yourself with third-party software and give Binance only the public key. Whichever kind a tool holds, it can act within whatever the key's settings allow.

Two settings decide what a leak costs you, and they tend to get blurred together:

They fail in different ways. Permissions don't care who is using the key; they only cap what that person can do. An IP restriction can't stop a request coming from an address on your list, so if the server running your tool is breached, the attacker is already standing inside the whitelist. When a key goes wrong, it's usually permissions opened wider than needed plus a secret that got out. To check the keys you already have, tick through the API Permission Risk Check.

Permissions: what the key is allowed to do

The permission flags in Binance's developer docs (the Get API Key Permission endpoint) map to these switches: reading, spot and margin trading, withdrawals, internal transfer between master and sub-accounts, universal transfer, futures, and vanilla options. A few more cover Portfolio Margin and the FIX API, which everyday tools don't touch. The rule stays simple: tick only what the tool actually uses.

The two transfer permissions are the ones people tick without thinking. Internal transfer moves funds between your master account and sub-accounts instantly; universal transfer authorizes the key to use a dedicated transfer endpoint across supported currencies. Both move money. Internal transfer stays between your master account and sub-accounts, so coins don't leave your name, but whatever split you set up across sub-accounts can be shuffled; where a universal transfer can send funds is defined by the endpoint docs. If a tool doesn't need them, leave them off as well.

The payoff of least privilege only shows after a leak: someone holding a read-only key can see your balance and orders, and can't move a coin.

High-risk itemWithdrawal is the only permission that can send coins out of your account. When a tool asks for it, ask back: does it actually need to move funds off Binance? Bookkeeping, price feeds and copy-trading don't. If it doesn't, don't grant it.
Binance app screenshot: the API Management page with the Create API button outlined in red next to Create Tax Report API and Delete all API, followed by notes on the 30-key limit and keeping keys secret
In the app: More → API Management → Create API · image from the Binance Help Center article How to Create API Keys on Binance? (updated 2026-11-06) · collected 2026-11-08 · your app may look different · compiled from official material; this site is not Binance

IP restriction: where the key can be used

With an IP restriction in place, the key only accepts requests from the IPv4 addresses you list and refuses everything else. A leaked secret is useless to someone sitting on their own network.

How it ties into permissions is spelled out in Binance's Help Center:

Key typeReadingTrading and other permissionsWithdrawals
System-generated (HMAC), no IP restrictionYesNoNo
System-generated (HMAC), IPv4 restriction addedYesYesCan be enabled
Self-generated (Ed25519 / RSA)YesYes; Binance lists it as one way to get other permissions without an IP restrictionStill requires an IPv4 restriction

Source: Binance Help Center, "How to Create API Keys on Binance?" (article 360002502072, marked updated 2026-11-06). Checked November 2026; go by what the page shows live. Account status can still block a single permission, as with the Futures case above.

The third way out Binance lists is to "disable the default security controls". It does what it says: it removes this protection so an unrestricted key can carry other permissions. We don't recommend it. A leaked key would then work from anywhere.

Home IP keeps changing: which way to go

Most home broadband connections get a public IP that changes. Bind it and the tool loses its connection the day the address rotates; leave it unbound and a system-generated key is stuck at reading. For automated trading there are two steadier options:

The second deserves a pause. This is our inference, not Binance's wording: a self-generated key with no IP restriction has exactly one thing between it and an attacker, the private key on your machine. Wherever that file lives, and whoever can reach it, becomes the only line of defense. Our own preference is a fixed-IP server whenever one is available, keeping self-generated keys for setups that genuinely have no stable address.

You'll also run into claims that keys without an IP restriction get disabled after 90 days. Binance's current Help Center article doesn't say that, and the endpoint that reports a key's permissions has no expiry field, so we don't repeat it here.

Quick winBind every trading key to the fixed IP of the server it runs on. That one step narrows "secret leaks, orders get placed" a great deal.

Keeping the secret safe

Permissions and IP limits are backstops for after a leak; not leaking is the front line.

Rotating and cleaning up

A key isn't something you create once and forget.

Open API Management on Binance and read down the list: is each key still in use, are its permissions more than it needs, does it have an IP restriction? Where you're unsure, run it through the API Permission Risk Check.

The risk in third-party tools

Pasting a key into a third-party tool hands part of your account's control to that tool and the people running it. The IP restriction helps less here than you might expect: the tool runs on its own servers, the IP you bound is that server's, and if the server is breached the attacker is already on the whitelist.

One to remember"Is this tool worth trusting with my account?" and "Is this key set up tightly?" are two separate gates. Both have to be passed.

Error -2015: which part failed

When a tool's log shows -2015, the full message reads Invalid API-key, IP, or permissions for action. (Binance's official spot API error codes, code name REJECTED_MBX_KEY). Three possible causes are packed into one line. Check them in this order:

  1. The key: was the API Key copied wrong or with a stray space, or has the key already been deleted on Binance?
  2. The IP: is the address the tool actually sends from on your list? A tool moving servers, or a home connection reconnecting, both change it.
  3. The permission: is the one this action needs switched on? Futures is the classic case: a key created before your Futures account existed can't get Futures permission, so make a new key.

Forum threads and some tool help pages suggest setting the IP to unrestricted "just to test". Don't fix it that way. Under the current rules a system-generated key set to unrestricted drops to reading only, so the trade still fails; switching off the default security controls to get around that strips the protection entirely. Find which of the three it is and fix only that.

Suspected leak: revoke and rebuild

Orders you never placed, a device that held the key may be infected, a tool provider announcing an incident: any one of these is enough. Work through it in order:

  1. Delete (revoke) the key immediately in Binance API Management so it stops working entirely. That means delete, not merely edit its permissions or IP list; as long as the old secret exists, it can still be used.
  2. Check recent account activity: order history, asset movements and logged-in devices. If you find operations you didn't perform, the problem runs beyond the API, so handle it end to end with the account-hacked recovery steps: change the login password, review 2FA, and freeze the account if needed.
  3. Trace where the leak came from: which device, which tool? If you don't close that off, a new key can leak the same way.
  4. Rebuild a tighter key for any tool you still need: only the permissions it uses, and an IP restriction on a server you control.

A compromised API is often tied up with the account's overall security, so don't stop at the key. The full emergency drill is in the complete account-recovery guide, and the API Permission Risk Check helps map the weak points in the keys you still have.

Guard against a second scamWhen something goes wrong with an API, don't trust anyone who messages you out of the blue offering to "recover" your account or "get your funds back". Binance won't message you privately, won't ask for your Secret Key, and won't ask for your password or verification codes. For how to check whether a message is genuinely official, see how to tell whether a "Binance" message is real.
In a lineAPI security guards against "a program, or someone else, operating your account for you"; it does nothing about the market rising or falling. However solidly you configure a key, that's no promise your strategy will make money. This piece is about account and asset safety only, and is not investment advice of any kind.

FAQ

Can a Binance API key be used to withdraw my funds?

Only when three things line up: the key has withdrawal permission, the request comes from an IP on its whitelist, and the secret has leaked, for example because the server running your tool was itself compromised. Withdrawal can't be enabled without an IPv4 restriction, so under the current rules a key with withdrawals on and no IP binding can't be created. If you don't need withdrawals, leave them off; if you do, bind only a server you control.

If I've set an IP whitelist, do I still need to keep the API key secret?

Yes. If an attacker sends requests from an allowed address, say by breaking into that very server, the IP restriction won't stop them, and later changes to your IP settings can open gaps. Use least privilege, an IP restriction and strict secrecy together.

I think an API key has leaked. What's the first thing to do?

First, delete (revoke) the key on Binance straight away so it stops working, rather than just editing its permissions. Then check recent orders, assets and logins for anything odd, confirm the account as a whole is safe, and only then rebuild a fresh key, with tightened permissions and an IP whitelist, for any tool you still need.

Is it OK to use one key for several tools?

Not advisable. Create a separate key for each tool, so if any one has a problem you revoke only that key without dragging in the others, and the investigation stays clean. Feed one key to several tools and a single leak exposes them all.

Do the permission options and IP rules change?

They do, and one big change has already happened: since 2023-01-30 00:00 (UTC), a system-generated key with no IP restriction can only be set to reading. Separately, withdrawals require an IPv4 restriction; Binance doesn't put a start date on that one. Both rules were still in Binance's Help Center when we checked in November 2026. If they change again, go by what Binance's API creation and management pages and Help Center show at the time.

Will a key without an IP restriction be deleted after 90 days?

Plenty of guides say so. Binance's current Help Center article on creating API keys doesn't mention it, so we don't treat it as a rule. Whether a key still exists, and its status, is whatever API Management shows.

CM
Cheng Mo · Zhenku Editorial

"Cheng Mo" is a pen name, not a licensed expert. What we do is take Binance's official API settings and published rules and lay them out in an order an ordinary user can follow, checked line by line against Binance's own pages. We don't give investment advice; if you spot something we've got wrong, do let us know via corrections.

Sources

  • Binance Help Center · How to Create API Keys on Binance? (article 360002502072, marked updated 2026-11-06; checked 2026-11-13)
  • Binance spot API docs · error codes, -2015 REJECTED_MBX_KEY (errors.md on GitHub)
  • Binance developer docs · Get API Key Permission (GET /sapi/v1/account/apiRestrictions), permission field descriptions