Request failed with status code 451

Hi!

When I try to communicate with the binance api I receive a 451, for what I was reading this it is because the server is hosted in the United States and with United States ips it is not possible to establish communication with api.binance.com

For which I proceeded to change the location, I tried with Brazil, Europe and Asia and I still get the same error.


Can you access the Binance API from a country other than the United States? I don’t understand why by changing the region of the functions in Firebase I keep getting the same error

Hi,

If you are looking purely to fetch data, you can use the new endpoint: https://data.binance.com. It seems you are using Google Cloud which other users have reported to have had issues with all of their IPs resolving to US locations, regardless of server region.

Fantastic, well done. Please see the thread that started this solution. Thanks a lot, keep up the good work!

Hello @jonte please read this: API Error 451 Unavailable For Legal Reasons - #17 by andreaskrueger Thanks.