我的 Google 应用程序脚本项目需要独占 IP 地址

Exclusive IP address needed for my Google App Script Project

我在脚本中使用了以下代码:

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

var allPairs = UrlFetchApp.fetch(urlAllCurrencyPairsPrice);

var jsonAllPairs = JSON.parse(allPairs); 

由于 Google 使用共享 IP 地址,我从 Binance 服务器收到一条错误消息,指出我已超出请求限制。我发送了一张工单,他们回答说我需要一个专属 IP 地址。如何在 Google App 脚本中获取和使用它?

AFAIK Google 不为 Google Apps 脚本项目提供静态 IP 地址,但您可以自己检查 Google Apps Script official documentation 以确保安全。

一种替代方法是开发一个独立于 Apps 脚本的应用程序,仅用于获取 Binance API 并要求您的互联网服务提供商分配一个独占 IP 地址,然后将获取的数据传递给您的 Apps 脚本使用 Apps 脚本 API.

的项目