-1

I am using the following code in my script:

var urlAllCurrencyPairsPrice ="https://api.binance.com/api/v1/ticker/24hr";

var allPairs = UrlFetchApp.fetch(urlAllCurrencyPairsPrice);

var jsonAllPairs = JSON.parse(allPairs); 

Since Google uses shared IP address, I receive an error message from Binance server stating that I have exceeded the request limit. I sent a ticket, they answered that I need an exclusive IP address. How can I obtain and use it in Google App Script?

Worthwelle
  • 1,244
  • 1
  • 16
  • 19
user9830671
  • 13
  • 1
  • 6
  • In your script, it seems that you are not using API key. When API key is used, you can access and retrieve data from there using Google Apps Script. https://support.binance.com/hc/en-us/articles/360002502072-How-to-create-API – Tanaike Jun 19 '18 at 22:10
  • Some endpoints are accessed without api key. – user9830671 Jun 19 '18 at 22:45
  • 1
    Yes. But such error occurs. If you wanted to retrieve values without using API key, I apologize that my comment will not be useful for your situation. At that time, I recommend @Rubén's answer. – Tanaike Jun 19 '18 at 22:53

1 Answers1

1

AFAIK Google doesn't offer static IP address for Google Apps Script projects but you could checkout the Google Apps Script official documentation by yourself just to be sure.

One alternative is to develop an app independent of Apps Script just to do the fetch of the Binance API and ask your Internet Service Provider to assign an exclusive IP address then pass the fetched data to your Apps Script project by using the Apps Script API.

Rubén
  • 34,714
  • 9
  • 70
  • 166
  • 1
    As an another way, the API key can be also used for this situation. https://support.binance.com/hc/en-us/articles/360002502072-How-to-create-API – Tanaike Jun 19 '18 at 22:23