Skip to content

Commit

Permalink
Add example for pulling down historical stock prices for Google
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrosquall committed Dec 24, 2017
1 parent d99d31a commit eccd4a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,16 @@ Now you can use ``TiingoClient`` to make your API calls. (Other parameters are a
# Get Ticker
ticker_metadata = client.get_ticker_metadata("GOOGL")
# Get latest prices, based on 3+ sources, as CSV or JSON, sampled weekly
# Get latest prices, based on 3+ sources as JSON, sampled weekly
ticker_price = client.get_ticker_price("GOOGL", frequency="weekly")
# Get historical GOOGL prices from August 2017 as JSON, sampled daily
historical_prices = client.get_ticker_price("GOOGL",
fmt='json',
startDate='2017-08-01',
endDate='2017-08-31',
frequency='daily')
# Check what tickers are available, as well as metadata about each ticker
# including supported currency, exchange, and available start/end dates.
tickers = client.list_stock_tickers()
Expand Down
7 changes: 7 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ Now you can use ``TiingoClient`` to make your API calls. (Other parameters are a
# Get latest prices, based on 3+ sources, as CSV or JSON, sampled weekly
ticker_price = client.get_ticker_price("GOOGL", frequency="weekly")
# Get historical GOOGL prices from August 2017 as JSON, sampled daily
historical_prices = client.get_ticker_price("GOOGL",
fmt='json',
startDate='2017-08-01',
endDate='2017-08-31',
frequency='daily')
# Check what tickers are available, as well as metadata about each ticker
# including supported currency, exchange, and available start/end dates.
tickers = client.list_stock_tickers()
Expand Down

0 comments on commit eccd4a9

Please sign in to comment.