从雅虎和谷歌财经获取股票报价,从雅虎财经获取历史价格。
例子:
>>> import stockquote, os
>>> h = list(stockquote.historical_quotes("GOOG", "20010101", "20101231"))
>>> print os.linesep.join(["%s: %s" % (k, h[0][k]) for k in sorted(h[0].keys())])
Adj Close: 593.97
Close: 593.97
Date: 2010-12-31
High: 598.42
Low: 592.03
2022-04-11 23:24:16
6KB
Python
1