Closed kevinaskevin closed 10 years ago
I haven't looked at the code base recently, but I don't think it requires a key, but instead just uses the data that Yahoo publishes freely.
Well than whats this ids variable in ystockquote.py
:
def get_all(symbol):
"""
Get all available quote data for the given ticker symbol.
Returns a dictionary.
"""
ids = \
'ydb2r1b3qpoc1d1cd2c6t1k2p2c8m5c3m6gm7hm8k1m3lm4l1t8w1g1w4g3p' \
'1g4mg5m2g6kvjj1j5j3k4f6j6nk5n4ws1xj2va5b6k3t7a2t615l2el3e7v1' \
'e8v7e9s6b4j4p5p6rr2r5r6r7s7'
values = _request(symbol, ids).split(',')
...
If you look down below that slightly, you'll see that each of these refers to a different data point returned from Yahoo:
def get_dividend_yield(symbol):
return _request(symbol, 'y')
def get_dividend_per_share(symbol):
return _request(symbol, 'd')
def get_ask_realtime(symbol):
return _request(symbol, 'b2')
etc.
thanks kevin
On Thu, Dec 19, 2013 at 6:29 PM, kevin notifications@github.com wrote:
Closed #11 https://github.com/cgoldberg/ystockquote/issues/11.
— Reply to this email directly or view it on GitHubhttps://github.com/cgoldberg/ystockquote/issues/11 .
I have registered for a Yahoo API key. Should I use that instead of whatever ystockquote is already using?