Skip to content

Commit

Permalink
Merge pull request #274 from atarax/atarax_intra_extended
Browse files Browse the repository at this point in the history
add intraday-extended endpoint
  • Loading branch information
PatrickAlphaC committed Dec 21, 2020
2 parents 83ffe43 + e2568f8 commit 65c7670
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion alpha_vantage/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ def get_intraday(self, symbol, interval='15min', outputsize='compact'):
_FUNCTION_KEY = "TIME_SERIES_INTRADAY"
return _FUNCTION_KEY, "Time Series ({})".format(interval), 'Meta Data'

@av._output_format
@av._call_api_on_func
def get_intraday_extended(self, symbol, interval='15min', slice='year1month1'):
""" Return extended intraday time series in one csv_reader object.
It raises ValueError when problems arise
Keyword Arguments:
symbol: the symbol for the equity we want to get its data
interval: time interval between two conscutive values,
supported values are '1min', '5min', '15min', '30min', '60min'
(default '15min')
slice: the trailing 2 years of intraday data is evenly divided into
24 "slices" - year1month1, year1month2, ..., year2month12
"""
_FUNCTION_KEY = "TIME_SERIES_INTRADAY_EXTENDED"
return _FUNCTION_KEY, "Time Series ({})".format(interval), 'Meta Data'

@av._output_format
@av._call_api_on_func
def get_daily(self, symbol, outputsize='compact'):
Expand Down Expand Up @@ -115,7 +132,7 @@ def get_monthly_adjusted(self, symbol):
@av._call_api_on_func
def get_quote_endpoint(self, symbol):
""" Return the latest price and volume information for a
security of your choice
security of your choice
Keyword Arguments:
symbol: the symbol for the equity we want to get its data
Expand Down

0 comments on commit 65c7670

Please sign in to comment.