Skip to content

“API keys do not have the required permissions” ​

This is what the bot answers while you are creating an exchange bot if the key pair has the right format but the exchange does not allow it to trade. The full text is “API keys do not have the required permissions”. For a bot that is already running the same problem sounds different: “Your API key is invalid or lacks required permissions. Update API keys according to the instructions” or “The API key has no permission for this operation”.

What it means ​

The key exists and the exchange recognizes it, but when the key was issued on the exchange the permissions needed for orders and positions were not ticked. The message does not say which permission exactly is missing.

Why it happens ​

Bot typePermission needed
Bybit SpotSpot Trading
Bybit FuturesDerivatives / Contract Trading (orders and positions)
BingX FuturesRead and Perpetual Futures Trading — see How to create an API key on BingX

On BingX the bot may also answer while checking the key: “The exchange refused to verify this API key: the key lacks the required permissions, or our server address is missing from its IP allowlist.” — check the permissions and, if the key has an IP list, that it contains the server address the bot showed.

Typical reasons:

  • the key was issued read-only, without the right to trade — such a key is rejected right when it is added, both with manual input and with the Bybit login: “This API key is read-only. The bot needs trading permissions: create a key with Orders and Positions permissions (on some exchanges this permission is called «Perpetual Futures Trading»).”;
  • spot and futures need two different key pairs — a spot key is connected to a futures bot or the other way round;
  • the key permissions were changed on the exchange after the bot was connected;
  • the key belongs to a copy-trading master account — such a key is rejected separately: “This API key belongs to a copy-trading master account. All your Grid/DCA orders would be automatically copied to your followers. Please use a regular account without copy-trading.”;
  • the key has the withdrawal permission enabled — such a key is also rejected right away: “This API key has the withdrawal permission enabled. The bot does not need it, and if the key ever leaked, it could be used to withdraw money from your account…” Remove the Withdraw permission in the key settings on the exchange or issue a key without it;
  • the key has P2P trading permissions enabled — the bot rejects them the same way: “This API key has P2P trading permissions enabled…” Remove the P2P permissions in the key settings on the exchange or issue a key without them.

The bot does not need the withdrawal and P2P trading permissions — do not enable them: the bot will not accept a key with them.

What to do ​

  1. Open API key management on the exchange and check the permissions. The simplest way is to issue a new key with the permission from the table above, without the withdrawal right.
  2. Copy the key and the secret in full, without extra spaces.
  3. If the bot is not created yet — send the new pair in the creation wizard: the key and the secret in one message, separated by a space.
  4. If the bot already exists — bot card → 🔑 API keys, and send the new pair the same way, separated by a space.
  5. The warning “API key without IP whitelist” is not an error: the bot works without the IP restriction too, this is a security recommendation.

The same key pair cannot be linked to two bots — the bot answers “This API key pair already exists in the system”. Issue a separate pair for the second bot.

When to contact support ​

If the key was issued with the right permission, the pair has been updated, and the bot still answers about permissions — write to support: give the bot name and its type (Spot or Futures). Never forward the key secret to anyone.