python-binance
python-binance copied to clipboard
Max retries exceeded fapi/v1
Im retrienving my open positions in a given symbol, BTCBUSD for example, using futures_position_information(symbol='BTCBUSD') then i get back Error: HTTPSConnectionPool(host='fapi.binance.com', port=443): Max retries exceeded with url: /fapi/v1/positionRisk? In my client(api_key, api_secret) im using timeout=20 ok.
My issue or question (idk) is: Why its using v1 if we got a v2 for this function?
i saw its broken: ⚠️ Probably broken, python code below is implemented on v1 endpoint.
Any tips when it will be fixed/updated?
Since the error cannot be reproduced stably without specifying a longer timeout, futures_position_information
could be considered fine.
Back to other questions:
It's just nobody has enough motivation to make a pull request since the old v1 API still working.
A fix is very simple and easy, however, there have been too many unmerged pull requests and I wonder whether the author has enough time to continue this project.
@halfelf i did it myself changing to it request via GET directly from Binance in v2 API. Its the second or third time i got error from futures_position_information, i just dont remember others.
client._request('get', 'https://fapi.binance.com/fapi/v2/positionRisk', signed=True, force_params=True, data={})
works as expected. Github issue tracking is not for programming bugs. Please try stackoverflow or binance official forum.