Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a function to allow you to ad hoc get a list of values #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ystockquote.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,13 @@ def get_price_eps_estimate_next_year(symbol):
def get_short_ratio(symbol):
return _request(symbol, 's7')

def get_by_id_list(symbol, id_list):
"""
Get a list of values matching the id_list provided,
such as ['a', 'y', 'o']
"""
values = _request(symbol, ''.join(id_list)).split(',')
return values

def get_historical_prices(symbol, start_date, end_date):
"""
Expand Down