alpha_vantage package
Submodules
alpha_vantage.alphavantage module
- class alpha_vantage.alphavantage.AlphaVantage(key=None, output_format='json', treat_info_as_error=True, indexing_type='date', proxy=None, rapidapi=False)
Bases:
objectBase class where the decorators and base function for the other classes of this python wrapper will inherit from.
- classmethod _call_api_on_func(func)
Decorator for forming the api call with the arguments of the function, it works by taking the arguments given to the function and building the url to call the api on it
- Keyword Arguments:
func – The function to be decorated
- _handle_api_call(url)
Handle the return call from the api and return a data and meta_data object. It raises a ValueError on problems
- Keyword Arguments:
url – The url of the service
data_key – The key for getting the data from the jso object
meta_data_key – The key for getting the meta data information out
object (of the json)
- classmethod _output_format(func, override=None)
Decorator in charge of giving the output its right format, either json or pandas
- Keyword Arguments:
func – The function to be decorated
override – Override the internal format of the call, default None
- classmethod _output_format_sector(func, override=None)
Decorator in charge of giving the output its right format, either json or pandas (replacing the % for usable floats, range 0-1.0)
- Keyword Arguments:
func – The function to be decorated
override – Override the internal format of the call, default None
- Returns:
A decorator for the format sector api call
- map_to_matype(matype)
Convert to the alpha vantage math type integer. It returns an integer correspondent to the type of math to apply to a function. It raises ValueError if an integer greater than the supported math types is given.
- Keyword Arguments:
matype – The math type of the alpha vantage api. It accepts
type. (integers or a string representing the math) –
0 = Simple Moving Average (SMA),
1 = Exponential Moving Average (EMA),
2 = Weighted Moving Average (WMA),
3 = Double Exponential Moving Average (DEMA),
4 = Triple Exponential Moving Average (TEMA),
5 = Triangular Moving Average (TRIMA),
6 = T3 Moving Average,
7 = Kaufman Adaptive Moving Average (KAMA),
8 = MESA Adaptive Moving Average (MAMA)
- set_proxy(proxy=None)
Set a new proxy configuration
- Keyword Arguments:
proxy – Dictionary mapping protocol or protocol and hostname to
proxy. (the URL of the)
alpha_vantage.cryptocurrencies module
- class alpha_vantage.cryptocurrencies.CryptoCurrencies(key=None, output_format='json', treat_info_as_error=True, indexing_type='date', proxy=None, rapidapi=False)
Bases:
AlphaVantageThis class implements all the crypto currencies api calls
- get_crypto_intraday(symbol, market, interval, outputsize='compact')
Returns the intraday time series of the cryptocurrency specified, updated realtime.
- Keyword Arguments:
symbol – digital/crypto currency of your choice
market – exchange market of your choice
interval – time interval between two consecutive values, supported values are ‘1min’, ‘5min’, ‘15min’, ‘30min’, ‘60min’
outputsize – The size of the call, supported values are ‘compact’ and ‘full; the first returns the last 100 points in the data series, and ‘full’ returns the full-length intraday times series (default ‘compact’)
- get_digital_currency_daily(symbol, market)
Returns the daily historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD..
- Keyword Arguments:
symbol – The digital/crypto currency of your choice. It can be any
example (market in the market list. For)
symbol=BTC.
market – The exchange market of your choice. It can be any of the
example – market=CNY.
- get_digital_currency_exchange_rate(from_currency, to_currency)
Returns the realtime exchange rate for any pair of digital currency (e.g., BTC) or physical currency (e.g., USD). :keyword from_currency: The currency you would like to get the exchange rate :keyword for. It can either be a physical currency or digital/crypto currency.: :keyword For example: from_currency=USD or from_currency=BTC. :keyword to_currency: The destination currency for the exchange rate. :keyword It can either be a physical currency or digital/crypto currency.: :keyword For example: to_currency=USD or to_currency=BTC.
- get_digital_currency_monthly(symbol, market)
Returns the monthly historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD..
- Keyword Arguments:
symbol – The digital/crypto currency of your choice. It can be any
example (market in the market list. For)
symbol=BTC.
market – The exchange market of your choice. It can be any of the
example – market=CNY.
- get_digital_currency_weekly(symbol, market)
Returns the weekly historical time series for a digital currency (e.g., BTC) traded on a specific market (e.g., CNY/Chinese Yuan), refreshed daily at midnight (UTC). Prices and volumes are quoted in both the market-specific currency and USD..
- Keyword Arguments:
symbol – The digital/crypto currency of your choice. It can be any
example (market in the market list. For)
symbol=BTC.
market – The exchange market of your choice. It can be any of the
example – market=CNY.
alpha_vantage.foreignexchange module
- class alpha_vantage.foreignexchange.ForeignExchange(*args, **kwargs)
Bases:
AlphaVantageRealtime currency exchange rates for physical and digital currencies.
- get_currency_exchange_daily(from_symbol, to_symbol, outputsize='compact')
Returns the daily exchange rate for any pair of physical currency (e.g., EUR) or physical currency (e.g., USD).
- Keyword Arguments:
from_symbol – The currency you would like to get the exchange rate for. For example: from_symbol=EUR or from_symbol=USD.
to_symbol – The destination currency for the exchange rate. For example: to_symbol=USD or to_symbol=JPY.
outputsize – The size of the call, supported values are ‘compact’ and ‘full; the first returns the last 100 points in the data series, and ‘full’ returns the full-length daily times series, commonly above 1MB (default ‘compact’)
- get_currency_exchange_intraday(from_symbol, to_symbol, interval='15min', outputsize='compact')
Returns the intraday exchange rate for any pair of physical currency (e.g., EUR) or physical currency (e.g., USD).
- Keyword Arguments:
from_symbol – The currency you would like to get the exchange rate for. For example: from_currency=EUR or from_currency=USD.
to_symbol – The destination currency for the exchange rate. For example: to_currency=USD or to_currency=JPY.
interval – time interval between two conscutive values, supported values are ‘1min’, ‘5min’, ‘15min’, ‘30min’, ‘60min’ (default ‘15min’)
outputsize – The size of the call, supported values are ‘compact’ and ‘full; the first returns the last 100 points in the data series, and ‘full’ returns the full-length intraday times series, commonly above 1MB (default ‘compact’)
- get_currency_exchange_monthly(from_symbol, to_symbol, outputsize='compact')
Returns the monthly exchange rate for any pair of physical currency (e.g., EUR) or physical currency (e.g., USD).
- Keyword Arguments:
from_symbol – The currency you would like to get the exchange rate for. For example: from_symbol=EUR or from_symbol=USD.
to_symbol – The destination currency for the exchange rate. For example: to_symbol=USD or to_symbol=JPY.
interval – time interval between two conscutive values, supported values are ‘1min’, ‘5min’, ‘15min’, ‘30min’, ‘60min’ (default ‘15min’)
outputsize – The size of the call, supported values are ‘compact’ and ‘full; the first returns the last 100 points in the data series, and ‘full’ returns the full-length monthly times series, commonly above 1MB (default ‘compact’)
- get_currency_exchange_rate(from_currency, to_currency)
Returns the realtime exchange rate for any pair of physical currency (e.g., EUR) or physical currency (e.g., USD).
- Keyword Arguments:
from_currency – The currency you would like to get the exchange rate
currency. (It can either be a physical currency or digital/crypto)
example (For) – from_currency=USD or from_currency=BTC.
to_currency – The destination currency for the exchange rate.
currency.
example – to_currency=USD or to_currency=BTC.
- get_currency_exchange_weekly(from_symbol, to_symbol, outputsize='compact')
Returns the weekly exchange rate for any pair of physical currency (e.g., EUR) or physical currency (e.g., USD).
- Keyword Arguments:
from_symbol – The currency you would like to get the exchange rate for. For example: from_symbol=EUR or from_symbol=USD.
to_symbol – The destination currency for the exchange rate. For example: to_symbol=USD or to_symbol=JPY.
outputsize – The size of the call, supported values are ‘compact’ and ‘full; the first returns the last 100 points in the data series, and ‘full’ returns the full-length weekly times series, commonly above 1MB (default ‘compact’)
alpha_vantage.techindicators module
- class alpha_vantage.techindicators.TechIndicators(*args, **kwargs)
Bases:
AlphaVantageThis class implements all the technical indicator api calls
- get_ad(symbol, interval='daily', month=None, entitlement=None)
Return the Chaikin A/D line values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_adosc(symbol, interval='daily', fastperiod=None, slowperiod=None, month=None, entitlement=None)
Return the Chaikin A/D oscillator values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’
fastperiod – Positive integers are accepted (default=None)
slowperiod – Positive integers are accepted (default=None)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_adx(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the average directional movement index values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_adxr(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the average directional movement index rating in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_apo(symbol, interval='daily', series_type='close', fastperiod=None, slowperiod=None, matype=None, month=None, entitlement=None)
Return the absolute price oscillator values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘60min)’
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
fastperiod – Positive integers are accepted (default=None)
slowperiod – Positive integers are accepted (default=None)
matype –
Moving average type. By default, fastmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
0 = Simple Moving Average (SMA),
1 = Exponential Moving Average (EMA),
2 = Weighted Moving Average (WMA),
3 = Double Exponential Moving Average (DEMA),
4 = Triple Exponential Moving Average (TEMA),
5 = Triangular Moving Average (TRIMA),
6 = T3 Moving Average,
7 = Kaufman Adaptive Moving Average (KAMA),
8 = MESA Adaptive Moving Average (MAMA)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_aroon(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the aroon values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_aroonosc(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the aroon oscillator values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_atr(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the average true range values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_bbands(symbol, interval='daily', time_period=20, series_type='close', nbdevup=None, nbdevdn=None, matype=None, month=None, entitlement=None)
Return the bollinger bands values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – Number of data points used to calculate each BBANDS value. Positive integers are accepted (e.g., time_period=60, time_period=200) (default=20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
nbdevup – The standard deviation multiplier of the upper band. Positive integers are accepted as default (default=2)
nbdevdn – The standard deviation multiplier of the lower band. Positive integers are accepted as default (default=2)
matype –
Moving average type. By default, matype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
0 = Simple Moving Average (SMA),
1 = Exponential Moving Average (EMA),
2 = Weighted Moving Average (WMA),
3 = Double Exponential Moving Average (DEMA),
4 = Triple Exponential Moving Average (TEMA),
5 = Triangular Moving Average (TRIMA),
6 = T3 Moving Average,
7 = Kaufman Adaptive Moving Average (KAMA),
8 = MESA Adaptive Moving Average (MAMA)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_bop(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the balance of power values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_cci(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the commodity channel index values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_cmo(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the Chande momentum oscillator in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_dema(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return double exponential moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_dx(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the directional movement index values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ema(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return exponential moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ht_dcperiod(symbol, interval='daily', series_type='close', month=None, entitlement=None)
Return the Hilbert transform, dominant cycle period in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ht_dcphase(symbol, interval='daily', series_type='close', month=None, entitlement=None)
Return the Hilbert transform, dominant cycle phase in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ht_phasor(symbol, interval='daily', series_type='close', month=None, entitlement=None)
Return the Hilbert transform, phasor components in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ht_sine(symbol, interval='daily', series_type='close', month=None, entitlement=None)
Return the Hilbert transform, sine wave values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
series_type – The desired price type in the time series. Four types
supported (are) – ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ht_trendline(symbol, interval='daily', series_type='close', month=None, entitlement=None)
Return the Hilbert transform, instantaneous trendline values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ht_trendmode(symbol, interval='daily', series_type='close', month=None, entitlement=None)
Return the Hilbert transform, trend vs cycle mode in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_kama(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return Kaufman adaptative moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_macd(symbol, interval='daily', series_type='close', fastperiod=None, slowperiod=None, signalperiod=None, month=None, entitlement=None)
Return the moving average convergence/divergence time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
fastperiod – Positive integers are accepted (default=None)
slowperiod – Positive integers are accepted (default=None)
signalperiod – Positive integers are accepted (default=None)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_macdext(symbol, interval='daily', series_type='close', fastperiod=None, slowperiod=None, signalperiod=None, fastmatype=None, slowmatype=None, signalmatype=None, month=None, entitlement=None)
Return the moving average convergence/divergence time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
fastperiod – Positive integers are accepted (default=None)
slowperiod – Positive integers are accepted (default=None)
signalperiod – Positive integers are accepted (default=None)
fastmatype – Moving average type for the faster moving average. By default, fastmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
slowmatype – Moving average type for the slower moving average. By default, slowmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
signalmatype –
Moving average type for the signal moving average. By default, signalmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
0 = Simple Moving Average (SMA),
1 = Exponential Moving Average (EMA),
2 = Weighted Moving Average (WMA),
3 = Double Exponential Moving Average (DEMA),
4 = Triple Exponential Moving Average (TEMA),
5 = Triangular Moving Average (TRIMA),
6 = T3 Moving Average,
7 = Kaufman Adaptive Moving Average (KAMA),
8 = MESA Adaptive Moving Average (MAMA)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_mama(symbol, interval='daily', series_type='close', fastlimit=None, slowlimit=None, month=None, entitlement=None)
Return MESA adaptative moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
fastlimit – Positive floats for the fast limit are accepted (default=None)
slowlimit – Positive floats for the slow limit are accepted (default=None)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_mfi(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the money flow index values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_midpoint(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the midpoint values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_midprice(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the midprice values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_minus_di(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the minus directional indicator values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_minus_dm(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the minus directional movement values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_mom(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the momentum values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_natr(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the normalized average true range values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_obv(symbol, interval='daily', month=None, entitlement=None)
Return the on balance volume values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_plus_di(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the plus directional indicator values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_plus_dm(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the plus directional movement values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ppo(symbol, interval='daily', series_type='close', fastperiod=None, slowperiod=None, matype=None, month=None, entitlement=None)
Return the percentage price oscillator values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
fastperiod – Positive integers are accepted (default=None)
slowperiod – Positive integers are accepted (default=None)
matype –
Moving average type. By default, fastmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
0 = Simple Moving Average (SMA),
1 = Exponential Moving Average (EMA),
2 = Weighted Moving Average (WMA),
3 = Double Exponential Moving Average (DEMA),
4 = Triple Exponential Moving Average (TEMA),
5 = Triangular Moving Average (TRIMA),
6 = T3 Moving Average,
7 = Kaufman Adaptive Moving Average (KAMA),
8 = MESA Adaptive Moving Average (MAMA)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_roc(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the rate of change values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_rocr(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the rate of change ratio values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_rsi(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the relative strength index time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_sar(symbol, interval='daily', acceleration=None, maximum=None, month=None, entitlement=None)
Return the midprice values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
acceleration – The acceleration factor. Positive floats are accepted ( default 0.01)
maximum – The acceleration factor maximum value. Positive floats are accepted (default 0.20 )
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_sma(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return simple moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_stoch(symbol, interval='daily', fastkperiod=None, slowkperiod=None, slowdperiod=None, slowkmatype=None, slowdmatype=None, month=None, entitlement=None)
Return the stochatic oscillator values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
fastkperiod – The time period of the fastk moving average. Positive integers are accepted (default=None)
slowkperiod – The time period of the slowk moving average. Positive integers are accepted (default=None)
slowdperiod – The time period of the slowd moving average. Positive integers are accepted (default=None)
slowkmatype – Moving average type for the slowk moving average. By default, fastmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
slowdmatype –
Moving average type for the slowd moving average. By default, slowmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
0 = Simple Moving Average (SMA),
1 = Exponential Moving Average (EMA),
2 = Weighted Moving Average (WMA),
3 = Double Exponential Moving Average (DEMA),
4 = Triple Exponential Moving Average (TEMA),
5 = Triangular Moving Average (TRIMA),
6 = T3 Moving Average,
7 = Kaufman Adaptive Moving Average (KAMA),
8 = MESA Adaptive Moving Average (MAMA)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_stochf(symbol, interval='daily', fastkperiod=None, fastdperiod=None, fastdmatype=None, month=None, entitlement=None)
Return the stochatic oscillator values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
fastkperiod – The time period of the fastk moving average. Positive integers are accepted (default=None)
fastdperiod – The time period of the fastd moving average. Positive integers are accepted (default=None)
fastdmatype –
Moving average type for the fastdmatype moving average. By default, fastmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
0 = Simple Moving Average (SMA),
1 = Exponential Moving Average (EMA),
2 = Weighted Moving Average (WMA),
3 = Double Exponential Moving Average (DEMA),
4 = Triple Exponential Moving Average (TEMA),
5 = Triangular Moving Average (TRIMA),
6 = T3 Moving Average,
7 = Kaufman Adaptive Moving Average (KAMA),
8 = MESA Adaptive Moving Average (MAMA)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_stochrsi(symbol, interval='daily', time_period=20, series_type='close', fastkperiod=None, fastdperiod=None, fastdmatype=None, month=None, entitlement=None)
Return the stochatic relative strength index in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
fastkperiod – The time period of the fastk moving average. Positive integers are accepted (default=None)
fastdperiod – The time period of the fastd moving average. Positive integers are accepted (default=None)
fastdmatype –
Moving average type for the fastdmatype moving average. By default, fastmatype=0. Integers 0 - 8 are accepted (check down the mappings) or the string containing the math type can also be used.
0 = Simple Moving Average (SMA),
1 = Exponential Moving Average (EMA),
2 = Weighted Moving Average (WMA),
3 = Double Exponential Moving Average (DEMA),
4 = Triple Exponential Moving Average (TEMA),
5 = Triangular Moving Average (TRIMA),
6 = T3 Moving Average,
7 = Kaufman Adaptive Moving Average (KAMA),
8 = MESA Adaptive Moving Average (MAMA)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_t3(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return triple exponential moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_tema(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return triple exponential moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_trange(symbol, interval='daily', month=None, entitlement=None)
Return the true range values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_trima(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return triangular moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_trix(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return the1-day rate of change of a triple smooth exponential moving average in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_ultosc(symbol, interval='daily', timeperiod1=None, timeperiod2=None, timeperiod3=None, month=None, entitlement=None)
Return the ultimate oscillaror values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
timeperiod1 – The first time period indicator. Positive integers are accepted. By default, timeperiod1=7
timeperiod2 – The first time period indicator. Positive integers are accepted. By default, timeperiod2=14
timeperiod3 – The first time period indicator. Positive integers are accepted. By default, timeperiod3=28
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_vwap(symbol, interval='5min', month=None, entitlement=None)
Returns the volume weighted average price (VWAP) for intraday time series.
- 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 5min)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_willr(symbol, interval='daily', time_period=20, month=None, entitlement=None)
Return the Williams’ %R (WILLR) values in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_wma(symbol, interval='daily', time_period=20, series_type='close', month=None, entitlement=None)
Return weighted moving average time series in two json objects as data and meta_data. 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’, ‘daily’, ‘weekly’, ‘monthly’ (default ‘daily’)
time_period – How many data points to average (default 20)
series_type – The desired price type in the time series. Four types are supported: ‘close’, ‘open’, ‘high’, ‘low’ (default ‘close’)
month – ONLY applicable to intraday intervals. By default, not set and the technical indicator values will be calculated based on the most recent 30 days of intraday data.
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
alpha_vantage.timeseries module
- class alpha_vantage.timeseries.TimeSeries(key=None, output_format='json', treat_info_as_error=True, indexing_type='date', proxy=None, rapidapi=False)
Bases:
AlphaVantageThis class implements all the api calls to times series
- get_daily(symbol, outputsize='compact')
Return daily time series in two json objects as data and meta_data. It raises ValueError when problems arise
- Keyword Arguments:
symbol – the symbol for the equity we want to get its data
outputsize – The size of the call, supported values are ‘compact’ and ‘full; the first returns the last 100 points in the data series, and ‘full’ returns the full-length daily times series, commonly above 1MB (default ‘compact’)
- get_daily_adjusted(symbol, outputsize='compact', entitlement=None)
Return daily adjusted (date, daily open, daily high, daily low, daily close, daily split/dividend-adjusted close, daily volume) time series in two json objects as data and meta_data. It raises ValueError when problems arise
- Keyword Arguments:
symbol – the symbol for the equity we want to get its data
outputsize – The size of the call, supported values are ‘compact’ and ‘full; the first returns the last 100 points in the data series, and ‘full’ returns the full-length daily times series, commonly above 1MB (default ‘compact’)
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_intraday(symbol: str, interval: str = '15min', outputsize: str = 'compact', month: str = None, extended_hours: str = 'true', adjusted: str = 'true', entitlement=None)
Return intraday time series in two json objects as data and meta_data. 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’)
outputsize – The size of the call, supported values are ‘compact’ and ‘full; the first returns the last 100 points in the data series, and ‘full’ returns the full-length intraday times series, commonly above 1MB (default ‘compact’)
month – If not None, specify a year and month to get data, supported format is YYYY-MM. For example “2009-01” (default None)
extended_hours – By default, extended_hours=true and the output time series will include both the regular trading hours and the extended trading hours (4:00am to 8:00pm Eastern Time for the US market). Set extended_hours=false to query regular trading hours (9:30am to 4:00pm US Eastern Time) only. (default ‘true’)
adjusted – By default, adjusted=true and the output time series is adjusted by historical split and dividend events. Set adjusted=false to query raw (as-traded) intraday values. (default ‘true’)
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_market_status()
Return current market status (open vs. closed) of major trading venues. It raises ValueError when problems arise
- get_monthly(symbol)
Return monthly time series in two json objects as data and meta_data. It raises ValueError when problems arise
- Keyword Arguments:
symbol – the symbol for the equity we want to get its data
- get_monthly_adjusted(symbol)
Return monthly time series in two json objects as data and meta_data. It raises ValueError when problems arise
- Keyword Arguments:
symbol – the symbol for the equity we want to get its data
- get_quote_endpoint(symbol, entitlement=None)
- Return the latest price and volume information for a
security of your choice
- Keyword Arguments:
symbol – the symbol for the equity we want to get its data
entitlement – Supported values are ‘realtime’ for realtime US stock market data or ‘delayed’ for 15-minute delayed US stock market data
- get_symbol_search(keywords)
Return best matching symbols and market information based on keywords. It raises ValueError when problems arise
- Keyword Arguments:
keywords – the keywords to query on
- get_weekly(symbol)
Return weekly time series in two json objects as data and meta_data. It raises ValueError when problems arise
- Keyword Arguments:
symbol – the symbol for the equity we want to get its data
- get_weekly_adjusted(symbol)
weekly adjusted time series (last trading day of each week, weekly open, weekly high, weekly low, weekly close, weekly adjusted close, weekly volume, weekly dividend) of the equity specified, covering up to 20 years of historical data. :keyword symbol: the symbol for the equity we want to get its data