How to get cid from market and symbol from google finance

这一生的挚爱 提交于 2019-12-11 17:19:26

问题


I would like to fetch the historical data from google finance.

Url should be like this, this is the link for Apple.

http://www.google.com/finance/historical?cid=22144&startdate=Jan+1%2C+2000&enddate=Jul+30%2C+2017&num=30&ei=bNl9WZC7MNCe0wSR8bw4&output=csv

It requires cid

I have symbol name AAAPL and market name NASDAQ though, I couldn't find how to get the cid 22144 from symbol and market name.

Google finance API is already closed.

How can I get cid number ???


回答1:


Are you certain you need the cid? I just tried this request to Google Finance:

https://www.google.co.uk/finance/historical?q=NASDAQ%3AAAPL&ei=k-99WaD9NMSYUsu_moAC&output=csv

This request returned a csv file.




回答2:


if you are trying to extract historical data for a time period of 1 year from today only then we can use AAPL else we need to provide cid along with the time period



来源:https://stackoverflow.com/questions/45400175/how-to-get-cid-from-market-and-symbol-from-google-finance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!