zhouaini528 / binance-php

Binance API Like the official document interface, Support for arbitrary extension.
MIT License
107 stars 43 forks source link

403 error #37

Open ynsorer opened 2 years ago

ynsorer commented 2 years ago

hello, i have been using your library for a long time but a problem started. I get 403 error while trading on binance futures.There is no such problem when I try on testnet network. I have no problems when I try other libraries. I am sure my api access is not blocked.I hope you are still here and can support me thank you

zhouaini528 commented 2 years ago

hello, i have been using your library for a long time but a problem started. I get 403 error while trading on binance futures.There is no such problem when I try on testnet network. I have no problems when I try other libraries. I am sure my api access is not blocked.I hope you are still here and can support me thank you

Thank you for your support and discovery. I will solve this problem

ynsorer commented 2 years ago

Hello again. I found the cause of the problem. this may be my fault.

$BASE_URL="https://fapi.binance.com/";  look at last slash. the last slash  was causing the 403 error, but why?  I've been using it like this for a long time
$binance=new BinanceFuture($KEY,$SECRET,$BASE_URL);

and i will ask one more thing Is it possible to use curl class as an alternative to guzzlehttp? what path should i follow?

thank you and sorry again. I will continue to use your class! its best :)