简体   繁体   English

从 Google 财经的 Google 表格中获取 BTC 价格

[英]Get BTC prices on Google Sheets from Google Finance

I'm trying to get data from Google Finance in Google Sheets with this formula:我正在尝试使用以下公式从 Google 表格中的 Google 财经获取数据:

=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:虽然在 Google 财经本身,我可以获得 BTC 价格:

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

with the same query strings.使用相同的查询字符串。

How can I can fix this?我该如何解决这个问题?

You need to have a from and to currency like this:你需要有一个像这样的 from 和 to 货币:

=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))

As of 2020-08-15 the following formula works well (without any add-ons):截至 2020 年 8 月 15 日,以下公式运行良好(无任何附加组件):

=GOOGLEFINANCE("BTCUSD")

Seems like it works only for BTC and ETH though.似乎它只适用于 BTC 和 ETH。

2022-05-04 , the following works on Google Sheets: 2022-05-04 ,Google 表格上的以下作品:

=googlefinance("CURRENCY:USDBTC") as well as most combinations of currency and BTC (and ETH, LTC, BNB, XRP, XLM, and ADA), for example GBPBTC and JPYBTC. =googlefinance("CURRENCY:USDBTC")以及大多数货币和 BTC(以及 ETH、LTC、BNB、XRP、XLM 和 ADA)的组合,例如 GBPBTC 和 JPYBTC。

=googlefinance("CURRENCY:BTCUSD") works too, in the same combinations of coin and currency. =googlefinance("CURRENCY:BTCUSD")也适用于硬币和货币的相同组合。

Although finance.google.com has DOGE and LINK pricing, they don't seem to work the same way in the Sheet's googlefinance function.尽管 finance.google.com 有 DOGE 和 LINK 定价,但它们在 Sheet 的 googlefinance function 中的运作方式似乎并不相同。

Another way to work with crypto currency is to use the add-on where you can extract data from other sources.使用加密货币的另一种方法是使用附加组件,您可以在其中从其他来源提取数据。

=CRYPTOFINANCE("BTCUSD")

Link below:链接如下:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM