<p>I suggest using a library for this.
This is the one I use: <a href="https://chrome.google.com/webstore/detail/cryptofinance/bhjnahcnhemcnnenhgbmmdapapblnlcn?hl=en" rel="nofollow noreferrer">link</a></p>
<p>Code would then be: <code>=CRYPTOFINANCE(&quot;COINMARKETCAP:ETH/USD&quot;, &quot;price&quot;)</code></p>
<p>The library explains itself rather well.</p>

CC BY-SA 3.0
2017-12-05T09:47:18.723Z
Thank you for the answer but I was looking more to integrate without an add-on!
David
CC BY-SA 3.0
2017-11-29T21:56:15.240Z
2017-11-29T21:56:15.240Z
2020-06-16T11:10:03.350Z
mitchken
<p>How can I integrate the <strong>real-time</strong> value of the BTC/EUR pair to a Google sheet? What script can I use? </p>

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

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

<blockquote>
  <p>function getETHtoUSDTpoloniex() {
  var url = "<a href="https://poloniex.com/public?command=returnTicker" rel="nofollow noreferrer">https://poloniex.com/public?command=returnTicker</a>";</p>
  
  <p>var response = UrlFetchApp.fetch(url);
  var test = response.getContentText();</p>
  
  <p>var myjson = JSON.parse(test);
  //var leng = myjson.data.length;</p>
  
  <p>var USDT_ETH = myjson["USDT_ETH"];</p>
  
  <p>var price = USDT_ETH.last;</p>
  
  <p>return parseFloat(price); }</p>
</blockquote>

<p>Help please! </p>

<accounting><europe>
Integrate Bitcoin price in Google Sheets through Google Script
David
# Integrate Bitcoin price in Google Sheets through Google Script

(Asked by: username_0 on 2017-11-05)

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!

**Tags:** accounting, europe


---

## 1 answers

### Answer by username_1 on 2017-11-29. Score: 1

I suggest using a library for this.
This is the one I use: [link](https://chrome.google.com/webstore/detail/cryptofinance/bhjnahcnhemcnnenhgbmmdapapblnlcn?hl=en)

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

The library explains itself rather well.

> **Comments:**
> **username_0**: Thank you for the answer but I was looking more to integrate without an add-on!  

---

