sammchardy / python-binance

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

APIError(code=-5000): GET /fapi/v1/positionRisk is retired, please use GET /fapi/v2/positionRisk #1347

Open Tenzdenek opened 11 months ago

Tenzdenek commented 11 months ago

at first I received the error 0 Invalid JSON error message from Binance: but as I found out, it is a wrongly set endpoint and so I edited the client file as mentioned here once, but now I get this problem and I have no idea where to change the fapi mentioned above so that the program worked for me, I'm already completely wireless, guys.

dima-dmytruk23 commented 11 months ago

https://github.com/sammchardy/python-binance/pull/1342

Tenzdenek commented 11 months ago

could you plese send me your client because i change so many thinks i loss in what i must rewrite what i must change for new endpoint v2

dima-dmytruk23 commented 11 months ago

не могли бы вы прислать мне своего клиента, потому что я изменил так много мыслей, что я теряю то, что я должен переписать, что я должен изменить для новой конечной точки v2

https://github.com/sammchardy/python-binance/blob/420a7a0d1d4a6caeb80d6ec5c3cf21e9298308f1/binance/client.py

Tenzdenek commented 11 months ago

i everythink from this rewrite and still get the same error. your code with client work ? i copy your client.py and wtill get the same erorr :(

tempestblaze commented 11 months ago

i everythink from this rewrite and still get the same error. your code with client work ? i copy your client.py and wtill get the same erorr :(

Same issue. Created temporary fix for positionRisk only https://github.com/sammchardy/python-binance/commit/583d0e14ead92a55d82ccf6a7c514e52e441de85

TA2018b commented 11 months ago

My not-fixed-fix↓ You don't have to rewrite client. Just using bare _request function works. https://github.com/sammchardy/python-binance/issues/1345#issuecomment-1669613187