sammchardy / python-binance

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

Max retries exceeded fapi/v1 #1230

Open marcos379 opened 2 years ago

marcos379 commented 2 years ago

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 commented 2 years ago

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

Any tips when it will be fixed/updated?

halfelf commented 2 years ago

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.

marcos379 commented 2 years ago

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

halfelf commented 2 years ago

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.