Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.futures_account_balance() fails while other api is working well #1290

Open
OldChi opened this issue Feb 15, 2023 · 1 comment
Open

Comments

@OldChi
Copy link

OldChi commented Feb 15, 2023

Describe the bug
I could call client.get_account() successfully without Exception, but calling client.futures_account_balance() leads to BinanceAPIException.

To Reproduce
File e:\Python\Python310\lib\site-packages\binance\client.py:6055, in Client.futures_account_balance(self, **params)
6049 def futures_account_balance(self, **params):
6050 """Get futures account balance
6051
6052 https://binance-docs.github.io/apidocs/futures/en/#future-account-balance-user_data
6053
6054 """
-> 6055 return self._request_futures_api('get', 'balance', True, data=params)

File e:\Python\Python310\lib\site-packages\binance\client.py:339, in Client._request_futures_api(self, method, path, signed, **kwargs)
336 def _request_futures_api(self, method, path, signed=False, **kwargs) -> Dict:
337 uri = self._create_futures_api_uri(path)
--> 339 return self._request(method, uri, signed, True, **kwargs)

File e:\Python\Python310\lib\site-packages\binance\client.py:315, in Client._request(self, method, uri, signed, force_params, **kwargs)
312 kwargs = self._get_request_kwargs(method, signed, force_params, **kwargs)
314 self.response = getattr(self.session, method)(uri, **kwargs)
--> 315 return self._handle_response(self.response)

File e:\Python\Python310\lib\site-packages\binance\client.py:324, in Client._handle_response(response)
319 """Internal helper for handling API responses from the Binance server.
320 Raises the appropriate exceptions when necessary; otherwise, returns the
321 response.
322 """
323 if not (200 <= response.status_code < 300):
--> 324 raise BinanceAPIException(response, response.status_code, response.text)
325 try:
326 return response.json()

BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action, request ip:

@chan1919
Copy link

chan1919 commented Jun 7, 2023

The same Error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants