python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

Max retries exceeded fapi/v1

Open marcos379 opened this issue 2 years ago • 4 comments

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?

marcos379 avatar Aug 08 '22 16:08 marcos379

i saw its broken: ⚠️ Probably broken, python code below is implemented on v1 endpoint.

Any tips when it will be fixed/updated?

marcos379 avatar Aug 08 '22 18:08 marcos379

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 avatar Aug 09 '22 07:08 halfelf

@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.

marcos379 avatar Aug 09 '22 11:08 marcos379

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.

halfelf avatar Aug 11 '22 01:08 halfelf