Get BTC prices on Google Sheets from Google Finance

Filipe Ferminiano picture Filipe Ferminiano · Jul 13, 2017 · Viewed 13k times · Source

I'm trying to get data from Google Finance in Google Sheets with this formula:

=GoogleFinance("CURRENCY:BTC")

But I'm getting this error:

GOOGLEFINANCE, the query for the symbol: 'CURRENCY:BTC' returned no data.

Although on Google Finance itself, I can get BTC prices:

https://www.google.com/finance?q=CURRENCY:BTC

with the same query strings.

How can I can fix this?

Answer

Ed Nelson picture Ed Nelson · Jul 13, 2017

You need to have a from and to currency like this:

=GoogleFinance("CURRENCY:USDBTC")

For historic close price use:

=GoogleFinance("CURRENCY:USDBTC","close","07/07/2017")

If you want only the price returned use:

=iferror(index(GoogleFinance("CURRENCY:USDBTC","close","07/07/2017"),2,2))