Skip to content

Workflow

How to Create a Binance API Key for Trading (Trade-Only, IP-Restricted)

Updated Ninja Terminal team

Short answer

To create a Binance API key for trading, open API Management, choose Create API, select System-generated, name the key, and pass security verification. Then restrict access to trusted IPs, enable Reading plus Spot & Margin Trading or Futures, leave Withdrawals off, and save the API key and secret.

A Binance API key lets software place orders on your account without your login password. The safest key for a trading terminal can read your account and trade, can only be used from listed IP addresses, and cannot withdraw. This guide builds that key and connects it to Ninja Terminal. See also Binance on Ninja Terminal.

What do you need before you start?

Binance requires three things before it lets you create a key:

  • Two-factor authentication (2FA) enabled on your account.
  • A deposit of any amount in your Spot Wallet to activate the account.
  • Completed identity verification.

If you want to trade futures, activate your Futures account before you create the key. Binance does not let you enable Futures on a key created earlier. Binance also does not offer Futures on keys for accounts that use Portfolio Margin.

How do you create the key?

  1. Open the Binance API Management page (profile icon, then Account, then API Management).
  2. Select Create API.
  3. Choose System-generated. This gives you an API key and a secret key. (Ninja Terminal asks for these two values.)
  4. Enter a name you will recognize, such as “Ninja Terminal”.
  5. Confirm with your 2FA devices or passkey. Binance creates the key.
  6. Keep this window open. You need the key and secret at the end.

How do you restrict the key to trusted IPs?

  1. Open Edit restrictions on the new key.
  2. Under IP access, select Restrict access to trusted IPs only (the wording can vary).
  3. In Ninja Terminal, choose Binance in the Add Account dialog. The setup shows an IP list and a button to copy it.
  4. Paste the addresses into Binance and select Confirm.

Binance accepts IPv4 addresses only. Without IP restrictions, a system-generated Binance key can only hold the Reading permission, and Binance requires IP restrictions before it allows Withdrawals at all.

Ninja Terminal generates the IP list during setup for the account you are adding. Copy it from that screen for each key. Do not reuse an old list from another account. If the list changes, Ninja Terminal asks you to add the new addresses and verify again.

Which permissions should you enable?

  1. Keep Enable Reading on.
  2. Turn on Enable Spot & Margin Trading if you trade spot.
  3. Turn on Enable Futures if you trade USD-M futures.
  4. Leave Enable Withdrawals off.
  5. Save, complete the security verification, and copy the API key and secret. Store the secret in a password manager.
Permission Needed by Ninja Terminal Notes
Enable Reading Yes Balances, positions, and open orders
Enable Spot & Margin Trading For spot Placing and canceling spot orders
Enable Futures For futures Must be active on the account before key creation
Enable Withdrawals No Keep off

How do you connect the key to Ninja Terminal?

  1. In Ninja Terminal, open Add Account and choose Binance.
  2. Paste the API key and the secret key. Add an optional nickname.
  3. Select Test. The result shows a check or a cross for each market (for example Spot and USD-M).
  4. Select Connect.

Ninja Terminal encrypts the key with AES-256-GCM and stores it on your device. Orders go from your browser to your own Binance account. Funds never move to Ninja Terminal. For the full model, read the API key security checklist.

What if the connection fails?

  • Error -2015 or “refused the connection”: an address is missing from the key’s trusted IP list, or the key was copied wrong. Add every listed address and paste the key again.
  • Trading toggles stay locked: add the trusted IPs first, then enable trading.
  • Futures check fails: create a new key after your Futures account is active.
  • Clock error: turn on automatic date and time on your device.

Frequently asked questions

What permissions does a Binance API key need for trading?

Enable Reading, plus Enable Spot & Margin Trading for spot and Enable Futures for futures. Leave Enable Withdrawals off. A trading tool does not need withdrawal permission.

Why can't I enable trading permissions on my Binance API key?

Binance only allows permissions beyond Reading when the key has IPv4 IP access restrictions (or is self-generated). Add trusted IPs first, then enable trading.

Why is Futures greyed out on my Binance API key?

Binance does not allow Futures on a key created before your Futures account was activated. Activate Futures first, then create a new key.

Does Ninja Terminal need the Binance secret key?

Yes. Binance system-generated keys use an API key and a secret. Ninja Terminal encrypts both with AES-256-GCM and stores them on your device.

Sources

  1. Binance Support — How to Create API Keys
  2. Binance — API Management

Trade every venue from one tab.

Binance, OKX, Bybit, and Hyperliquid with news, charts, and one-command orders. Included with Ninja Squad Pro membership.