Cors Issue
shivam-880 opened this issue · 3 comments
shivam-880 commented
I am trying to consume binance rest apis in a small react app. Following is the issue that I face:
Failed to load https://api.binance.com/api/v1/ticker/allPrices: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Please suggest. TIA
beamsies commented
I think it is an issue when running in browser localhost. I used a google chrome plugin (named Allow-Control-Allow-Origin: *) to make it work on dev machine.
jaggedsoft commented
Yeah, no exchange lets you connect to their API from the browser or plugins unfortunately.
As nebsi mentioned, requires some sort of hack or workaround
jaggedsoft commented
My approach has always been to have a data source on my server, I pull from that, it pulls from binance. Annoying but works.