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") print(client.get_account())
And my second code:
from binance.spot import Spot client = Spot(api_key="XXXXXX" , api_secret="XXXXXX") print(client.account())
I’m sure of my keys and my IPV4 (in my trusted IPs list).
I tried other endpoints like: https://api2.binance.com.
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!