问题描述
我想开发一个小型应用程序,以自动从Google财经获取股票价格并将其存储在我的本地计算机中,以供将来分析.
I want to develop a small application to get stock price from Google Finance automatically and store it in my local machine for future analysis.
有人可以给我一些入门的线索吗?
Can anyone give me some clue how to get started?
我知道一些C#.会适合这个目的吗?
I know some C#. Will it be suitable for this purpose?
谢谢.
推荐答案
Google财经小工具API 已正式自2012年10月起已弃用,但截至2014年4月,它仍处于活动状态:
The Google Finance Gadget API has been officially deprecated since October 2012, but as of April 2014, it's still active:
http://www.google.com/finance/info?q=纳斯达克:ADBE
请注意,如果您的应用程序用于公开消费,使用Google Finance API违反了Google的服务条款.
Note that if your application is for public consumption, using the Google Finance API is against Google's terms of service.
这给出了一个JSON响应,可以在切掉前两个字符('//')之后使用C#中的简单JSON解析器对其进行解析.
This gives a JSON response which can be parsed using a simple JSON parser in C# after chopping off the first two chars ('//').
要再次下载历史数据,可以使用Google API.
For downloading historic data again, you could use the Google APIs.
提供从开始日期到结束日期的当日股票价格的CSV.使用简单的CSV解析器从存储在数据库中的数据中获取有意义的数据.但是,此format = csv选项不适用于少数证券交易所.
gives out a CSV of end of day stock prices from startdate to enddate. Use a simple CSV parser to get meaningful data out of this stored on your db. However, this format=csv option does not work for a few stock exchanges.
这篇关于如何使用Google财经?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!