I use this script in Google script app to Signature the API Binance and work fine in the last year but now not working why? any solution.
The code
function SignatureTest() {
var key = 'Key';
var secret = 'Secret Key';
var curTime = Number(new Date().getTime()).toFixed(0);
var string = "symbol=LTCBTC×tamp=" + curTime;
var sKey = Utilities.computeHmacSha256Signature(string, secret);
sKey = sKey.map(function(e) {
var v = (e < 0 ? e + 256 : e).toString(16);
return v.length == 1 ? "0" + v : v;
}).join("");
var params = {
'method': 'get',
'headers': {'X-MBX-APIKEY': key},
'muteHttpExceptions': true
};
var url = "https://api.binance.com/api/v3/allOrders?" + string + "&signature=" + sKey;
var data = UrlFetchApp.fetch(url, params);
Logger.log(data.getContentText())
}
the result error:
{ "code": 0, "msg": "Service unavailable from a restricted location according to 'b. Eligibility' in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error." }
I try to run script above but not working