Integrate Bitcoin price in Google Sheets through Google Script

0

How can I integrate the real-time value of the BTC/EUR pair to a Google sheet? What script can I use?

For ETH/USD I use Poloniex and a script for that, but there is no BTC/EUR pair on Poloniex.

This is the script I use for Poloniex and the ETH/USD pair:

function getETHtoUSDTpoloniex() { var url = "https://poloniex.com/public?command=returnTicker";

var response = UrlFetchApp.fetch(url); var test = response.getContentText();

var myjson = JSON.parse(test); //var leng = myjson.data.length;

var USDT_ETH = myjson["USDT_ETH"];

var price = USDT_ETH.last;

return parseFloat(price); }

Help please!

Hollossy

Posted 2017-11-05T21:46:29.047

Reputation: 217

Answers

1

I suggest using a library for this. This is the one I use: link

Code would then be: =CRYPTOFINANCE("COINMARKETCAP:ETH/USD", "price")

The library explains itself rather well.

mitchken

Posted 2017-11-05T21:46:29.047

Reputation: 111

Thank you for the answer but I was looking more to integrate without an add-on!Hollossy 2017-12-05T09:47:18.723