Hey, i tried it several times, but it is showing me everytime, that my Data is incorrect, when I want to print the current BTC value.
Traceback (most recent call last):
File "C:/Users/brend/PycharmProjects/pythonProject1/Binance.py", line 10, in <module>
print(client.get_account())
File "C:\Users\brend\PycharmProjects\pythonBalkonRsp\venv\lib\site-packages\binance\client.py", line 1767, in get_account
return self._get('account', True, data=params)
File "C:\Users\brend\PycharmProjects\pythonBalkonRsp\venv\lib\site-packages\binance\client.py", line 237, in _get
return self._request_api('get', path, signed, version, **kwargs)
File "C:\Users\brend\PycharmProjects\pythonBalkonRsp\venv\lib\site-packages\binance\client.py", line 202, in _request_api
return self._request(method, uri, signed, **kwargs)
File "C:\Users\brend\PycharmProjects\pythonBalkonRsp\venv\lib\site-packages\binance\client.py", line 197, in _request
return self._handle_response()
File "C:\Users\brend\PycharmProjects\pythonBalkonRsp\venv\lib\site-packages\binance\client.py", line 230, in _handle_response
raise BinanceAPIException(self.response)
binance.exceptions.BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action.
Here is my code:
from binance.client import Client
#binance settings
api_key = "xxx"
api_secret = "xxx"
client = Client(api_key, api_secret)
client.API_URL = "https://testnet.binance.vision/api"
print(client.get_account())
print(client.get_asset_balance(asset='BTC'))
Could somebody please help me^^