sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
6.01k stars 2.2k forks source link

API KEY Error when fetching Wallet address #1414

Open kadnan opened 5 months ago

kadnan commented 5 months ago

Describe the bug I am using the below code to fetch the USDR wallet addresss:

addr = client_live.get_deposit_address(coin='USDT',network='TRX')

but it gives error:

addr = client_live.get_deposit_address(coin='USDT',network='TRX')
  File "/Users/AdnanAhmad/.pyenv/versions/3.9.4/lib/python3.9/site-packages/binance/client.py", line 2742, in get_deposit_address
    return self._request_margin_api('get', 'capital/deposit/address', True, data=params)
  File "/Users/AdnanAhmad/.pyenv/versions/3.9.4/lib/python3.9/site-packages/binance/client.py", line 364, in _request_margin_api
    return self._request(method, uri, signed, **kwargs)
  File "/Users/AdnanAhmad/.pyenv/versions/3.9.4/lib/python3.9/site-packages/binance/client.py", line 315, in _request
    return self._handle_response(self.response)
  File "/Users/AdnanAhmad/.pyenv/versions/3.9.4/lib/python3.9/site-packages/binance/client.py", line 324, in _handle_response
    raise BinanceAPIException(response, response.status_code, response.text)
binance.exceptions.BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action.

It gives error on the following line:

addr = client_live.get_deposit_address(coin='USDT',network='TRX')

All I want to fetch addresses