BRAIN Docs

Common Errors

Invalid API Key

This error means that the API Key was entered incorrectly or was not fully copied.

What to check:

  • The API Key was pasted in full
  • There are no extra spaces at the beginning or end
  • The correct exchange is selected
  • The API key was not deleted on the exchange
Invalid Secret Key

This error means that the Secret Key was entered incorrectly.

What to check:

  • The Secret Key was copied in full
  • There are no extra spaces
  • The Secret Key belongs to this exact API key
  • The key was not recreated or deleted

Important

Secret Key is often shown only once. If it was lost, you need to create a new API key.

Missing permissions

This error means that the API key does not have the required trading permissions.

What to check:

  • Trading permission is enabled
  • The required trading type is enabled, if the exchange separates Spot / Futures
  • The API key is active
  • The exchange account is available for trading
Withdrawal permission enabled

This error means that withdrawal access is enabled for the API key.

What to do:

  • Delete this API key on the exchange
  • Create a new API key
  • Enable only trading permissions
  • Do not enable Withdraw / Withdrawal

BRAIN must use only a trade-only API without access to withdrawals.

IP whitelist required

What to check:

  • Whether the exchange requires IP whitelist
  • Whether the IP addresses from the BRAIN instruction are added
  • Whether there is an error in the IP address
  • Whether any random IP addresses were added

If BRAIN does not require IP whitelist for a specific exchange, there is no need to add IP manually.

KYC required

Some exchanges may restrict API access without account verification.

What to check:

  • Whether verification / KYC has been completed
  • Whether trading is available on the account
  • Whether there are any regional restrictions
  • Whether API functions are blocked on the account
Passphrase required

Some exchanges require Passphrase / API Password in addition to API Key and Secret Key.

Usually this may be required for:

  • OKX
  • KuCoin
  • Bitget

What to check:

  • Passphrase was created when creating the API key
  • Passphrase was entered correctly
  • The Passphrase belongs to this exact API key
  • There are no extra spaces

If the Passphrase is lost, it is easier to create a new API key.

Exchange region restriction

The exchange may restrict API access or certain trading functions depending on the user’s region.

What to check:

  • Whether the exchange is available in the user’s region
  • Whether the required trading type is available
  • Whether there are any API restrictions
  • Whether additional verification is required
API key expired / inactive

Some API keys may become inactive if they are not used for a long time or if the exchange requires periodic key updates.

What to check:

  • The API key is active
  • The API key was not deleted
  • The API key was not disabled by the exchange
  • The key has not expired
  • All required permissions are still enabled

If the key is inactive, create a new API key and connect it in BRAIN again.

Authorization Error

What to check:

Make sure the API Key and Secret Key were copied correctly.

Check that the API key has the required trading permissions enabled.

Make sure IP whitelist is enabled and BRAIN IP addresses were added correctly.

If the error remains, delete the API key on the exchange and create a new one.

Invalid API credentials

This error appears if the exchange does not accept the API data entered in BRAIN.

What to check:

  • Make sure the correct exchange is selected in BRAIN.
  • Check that API Key and Secret Key are pasted into the correct fields.
  • If the exchange uses Passphrase / API Password, make sure it is entered correctly.
  • Check that the API key was not created with incorrect settings.
  • Make sure the required trading permissions are enabled.
  • Check that the IP addresses from BRAIN are added to the whitelist.
  • If the error still appears, delete the API key and create a new one from the beginning.
API does not work after setup

If the API key was created correctly, but the connection or strategy still does not work, check whether the futures account is activated and whether Hedge Mode is enabled, if this setting is available on the exchange.