emmtte / list

Google Sheets automatic creation with Google Apps Script (GAS) for managing a cryptocurrency tracking spreadsheet with multi exchanges
262 stars 77 forks source link

Error 403 binance API #48

Open Fungraphic opened 3 years ago

Fungraphic commented 3 years ago

hello, i just tried your portfolio and i have a binance error. It seems to me that binance has made an update. Could this be the problem? Capture d’écran_2021-03-16_14-06-06

stevegwh commented 3 years ago

After researching it seems that Binance blacklists the IP addresses of the Google servers that Google Sheets uses to make the request. No idea how it could be fixed.

sguntaka98 commented 3 years ago

I have the same issue, does anyone have a fix for this?

fabrixpo commented 3 years ago

Same here... and have no idea on how to fix.

RocketRene commented 3 years ago

Same here

jbiju94 commented 3 years ago

Happen to find this -

When Apps Script runs a script, the script is assigned to one of the Google Cloud nodes. This notes makes an outbound IP connection to fetch the data from Binance. When one node (ip address) is generating to much traffic on Binance it may get banned for a period of time. Luckily, Google has a large pool of IP addresses for Apps Script. Let's all treat these lovely APIs with RESPECT and don't hammer them to hard to avoid bans. If you write your own scripts, try using the Google Cache Service when possible. source

Can we migrate to App Script with Google Cache Service? is it possible?

machichiotte commented 3 years ago

In Apps Script, go to Settings -> enable manifest "appscript.json" Go back to your editor, you should see appscript.json in your files. Open this manifest.

After runtimeVersion in the manifest, add this : "urlFetchWhitelist": [ "https://api.binance.com/", "https://api1.binance.com/", "https://api2.binance.com/", "https://api3.binance.com/", "https://fapi.binance.com/", "https://dapi.binance.com/", "https://pro-api.coinmarketcap.com/v1/", "https://api.kraken.com/0/private/", "https://api.kucoin.com/api/v1/accounts/" ] Remove kraken/kucoin if not needed