binance.exceptions.BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action.

Author: AcN234Created Jun 29, 2023Updated Sep 1, 2025

Hello,

api_url='https://fapi.binance.com/fapi/'
testnet="False"
print(f"EASY BUCKS TRADING BOT LIVE")
# Binance API credentials
client = Client(api_key, api_secret,testnet="false")
client.API_URL = api_url

account_info = client.get_account()
accout_wallet_balence = account_info['totalWalletBalance']

This is my code. When I try To Run This binance.exceptions.BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action. occur .

With the same api if I use https://github.com/binance/binance-futures-connector-python this library its works file. 1688031677345_8vqlrf7rp3oxb598q8fi9cbcnpsxb7uc 1688027860358_fj0eptapde9ld1bu3iro3cb8gbwtgll0

Please help me.

Source: sammchardy/python-binance