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

Doesn't work funding_wallet and get_user_asset methods #1339

Closed mixartemev closed 11 months ago

mixartemev commented 1 year ago

Describe the bug Doesn't work funding_wallet and get_user_asset methods

To Reproduce Code snippet to reproduce the behavior:

bc = Client(KEY, SECRET)
fund_assets = bc.funding_wallet()
bc = AsyncClient(KEY, SECRET)
assets = await bc.get_user_asset()
fund_assets = await bc.funding_wallet()

Expected behavior get the data

Environment (please complete the following information):

Logs or Additional context

 File "/home/dev/af_core/venv/lib/python3.11/site-packages/binance/client.py", line 8717, in get_user_asset
    return await self._request_margin_api("get", "asset/getUserAsset", True, data=params, version=3)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dev/af_core/venv/lib/python3.11/site-packages/binance/client.py", line 7613, in _request_margin_api
    return await self._request(method, uri, signed, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dev/af_core/venv/lib/python3.11/site-packages/binance/client.py", line 7566, in _request
    return await self._handle_response(response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dev/af_core/venv/lib/python3.11/site-packages/binance/client.py", line 7574, in _handle_response
    raise BinanceAPIException(response, response.status, await response.text())
binance.exceptions.BinanceAPIException: APIError(code=-1000): Request method 'GET' not supported
PJV0043 commented 11 months ago

Thank you for the comprehensive bug report. The error message you provided states: APIError(code=-1000): Request method 'GET' not supported. This suggests that the method associated with the API endpoint you're trying to access is no longer accepting GET requests, or perhaps never did.

mixartemev commented 11 months ago

Thank you for the comprehensive bug report. The error message you provided states: APIError(code=-1000): Request method 'GET' not supported. This suggests that the method associated with the API endpoint you're trying to access is no longer accepting GET requests, or perhaps never did.

Yes, I know, I already fixed it, but I forgot to close the issue:)