gpt4 book ai didi

Getting Tokyo stock price data to appear on Google spreadsheet(将东京股票价格数据显示在谷歌电子表格上)

转载 作者:bug小助手 更新时间:2023-10-25 16:34:44 31 4
gpt4 key购买 nike



I have no problem retrieving price data of US stocks. For example, to retrieve Apple price data, this formula =GOOGLEFINANCE("AAPL","changepct")/100 works fine. When I tried to retrieve Tokyo stocks price data, this formula GOOGLEFINANCE("TYO:1969","changepct")/100 cannot work. Both formulas look similar. I cannot figure out why. Is it because Tokyo stocks are not supported by Google Finance?

我检索美国股票的价格数据没有问题。例如,要检索Apple价格数据,可以使用以下公式=GOOGLEFINANCE(“AAPL”,“changepct”)/100。当我试图检索东京股票价格数据时,公式GOOGLEFINANCE(“TYO:1969”,“changepct”)/100不起作用。这两个公式看起来很相似。我想不出为什么。是不是因为东京的股票没有得到谷歌金融的支持?


更多回答

=GOOGLEFINANCE("TYO","changepct")/100 seems to work

=GOOGLEFINANCE(“TYO”,“changepct”)/100似乎起作用了

Unfortunately, TYO is listed in the US exchange, not Tokyo.

不幸的是,TYO是在美国交易所上市的,而不是东京。

support.google.com/docs/answer/3093281?hl=en-US says "GOOGLEFINANCE is only available in English and does not support most international exchanges"

Support.google.com/docs/answer/3093281?hl=en-US说:“GOOGLEFINANCE只有英文版本,不支持大多数国际交易。”

Actually, it support most international exchanges so far except Tokyo so far from my experience. I was hoping I made some mistake.

事实上,根据我的经验,到目前为止,它支持除东京以外的大多数国际交易所。我还以为我弄错了呢。

it's a shame, actually. I've heard that old google spreadsheets could support tokyo stocks

实际上,这是一种耻辱。我听说旧的谷歌电子表格可以支持东京的股票

优秀答案推荐


Is it because Tokyo stocks are not supported by Google Finance?




Yes.

是。



Try and the error message presently includes:

请尝试,错误消息目前包括:




When evaluating GOOGLEFINANCE, Google Spreadsheets is not authorised to access data for exchange: 'TYO'




My solution: Scrape the price from Google Finance website.

我的解决方案是:从谷歌财经网站上砍价。


=IMPORTXML("https://www.google.com/finance/quote/1969:TYO","//div[@class='YMlKec fxKbKc']")

This will give you "¥1,570.00". If you want to convert it to a number use the below:

这会给你“1,570.00元”。如果要将其转换为数字,请使用以下命令:


=VALUE(REGEXREPLACE(IMPORTXML("https://www.google.com/finance/quote/1969:TYO","//div[@class='YMlKec fxKbKc']"), "[¥]", ""))


pls using yahoo fiance,
using sheets extension func

请使用雅虎未婚夫,使用Sheet扩展函数


function yahooF(ticker) {

const url = `https://finance.yahoo.com/quote/${ticker}?p=${ticker}`;

const res = UrlFetchApp.fetch(url, {muteHttpExceptions: true});

const contentText = res.getContentText();

const price = contentText.match(/<fin-streamer(?:.*?)active="">(\d+[,]?[\d\.]+?)<\/fin-streamer>/); console.log(price[1]); return price[1];

}

https://www.lido.app/tutorials/yahoo-finance-google-sheets

Https://www.lido.app/tutorials/yahoo-finance-google-sheets



A simple solution is to use the German stock exchanges and convert the euro rates to dollars or yen with googlefinance. So for example: DIP for KDDI

一个简单的解决方案是利用德国证券交易所,通过谷歌金融将欧元汇率转换为美元或日元。例如:DIP for KDDI


更多回答

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

您的答案可以通过其他支持信息来改进。请编辑以添加更多详细信息,如引用或文档,以便其他人可以确认您的答案是正确的。你可以在帮助中心找到更多关于如何写出好答案的信息。

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com