mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-17 20:04:19 +01:00
Add example for pulling down historical stock prices for Google
This commit is contained in:
committed by
Cameron Yick
parent
d99d31acb9
commit
eccd4a9bd4
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user