Jump to content
  • 0
crixus

Script Google - Preciso de ajuda

Question

O seguinte script não retorna o valor de PRICE

 

function getPreco() {
	var url = "https://api2.binance.com/api/v3/ticker/price?symbol=ADABNB";
	var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true});
  var json = response.getContentText();
	var data = JSON.parse(json);
	//Logger.log(url);
	//Logger.log(response);
	//Logger.log(json);
  Logger.log(data);
  return data.price
}

 

Ao executar em script.google 

 

17:49:16	Notificação	Execução iniciada
17:49:14	Informação	{price=0.00433800, symbol=ADABNB}
17:49:17	Notificação	Execução concluída

 

Usando o return data.price o resultado não deveria ser 0.00433800 ?

 

 

 

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.