BinanceAPIException: code=-2015

Hi everyone,

I’m trying to use the API: binance-connector-python

I have a problem that seems commun, but I couldn’t fix my issue:
APIError(code=-2015): Invalid API-key, IP, or permissions for action.

I tried two different codes with the same issue (of course I changed my API Keys for this post, in my real code, I don’t have “XXXXXX” but the real keys):

from binance.client import Client

client = Client(api_key="XXXXXX",  api_secret="XXXXXX")


And my second code:

from import Spot

client = Spot(api_key="XXXXXX" , api_secret="XXXXXX")


I’m sure of my keys and my IPV4 (in my trusted IPs list).
I tried other endpoints like:
I have selected three restrictions:

  • Enable Reading
  • Enable Spot & Margin Trading
  • Enable Withdrawals

I have two idea to where come the problem :

  • I’m french, and for exemple I can’t “Enable Futures” because of “local regulations”, I don’t see why it would be a problem with spot but anyway.
  • I’m not yet “Verified Plus”.

Thank you everyone!


You can’t pass this as API key in the code, it should be replaced by your REAL API key.

I have put my real API key, just changed it for the screen shot.