View Source AlphaVantage.StockTimeSeries (Alpha Vantage v0.3.0)
A set of functions for fetching realtime and historical global equity data from Alpha Vantage in 4 different temporal resolutions: (1) daily, (2) weekly, (3) monthly, and (4) intraday. Daily, weekly, and monthly time series contain 20+ years of historical data.
Summary
Functions
Returns daily time series (date, daily open, daily high, daily low, daily close, daily volume) of the global equity specified, covering 20+ years of historical data. The most recent data point is the prices and volume information of the current trading day, updated realtime.
Returns daily time series (date, daily open, daily high, daily low, daily close, daily volume, daily adjusted close, and split/dividend events) of the global equity specified, covering 20+ years of historical data. The most recent data point is the prices and volume information of the current trading day, updated realtime.
Returns intraday time series (timestamp, open, high, low, close, volume) of the equity specified.
Returns historical intraday time series for the trailing 2 years, covering over 2 million data points per ticker. The intraday data is derived from the Securities Information Processor (SIP) market-aggregated data. You can query both raw (as-traded) and split/dividend-adjusted intraday data from this endpoint. Common use cases for this API include data visualization, trading simulation/backtesting, and machine learning and deep learning applications with a longer horizon.
Returns monthly time series (last trading day of each month, monthly open, monthly high, monthly low, monthly close, monthly volume) of the global equity specified, covering 20+ years of historical data. The latest data point is the prices and volume information for the month (or partial month) that contains the current trading day, updated realtime.
Returns monthly adjusted time series (last trading day of each month, monthly open, monthly high, monthly low, monthly close, monthly adjusted close, monthly volume, monthly dividend) of the equity specified, covering 20+ years of historical data. The latest data point is the prices and volume information for the month (or partial month) that contains the current trading day, updated realtime.
Returns the latest price and volume information for a security of your choice.
Returns the best-matching symbols and market information based on keywords of your choice. The search results also contain match scores that provide you with the full flexibility to develop your own search and filtering logic.
Returns weekly time series (last trading day of each week, weekly open, weekly high, weekly low, weekly close, weekly volume) of the global equity specified, covering 20+ years of historical data. The latest data point is the prices and volume information for the week (or partial week) that contains the current trading day, updated realtime.
Returns 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 global equity specified, covering 20+ years of historical data. The latest data point is the prices and volume information for the week (or partial week) that contains the current trading day, updated realtime.
Functions
Returns daily time series (date, daily open, daily high, daily low, daily close, daily volume) of the global equity specified, covering 20+ years of historical data. The most recent data point is the prices and volume information of the current trading day, updated realtime.
Please reference https://www.alphavantage.co/documentation/#daily for more detail.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.
:outputsize
"compact"
returns only the latest 100 data points in the intraday time series (default);"full"
returns the full-length intraday time series.
The
"compact"
option is recommended if you would like to reduce the data size of each API call.
Returns daily time series (date, daily open, daily high, daily low, daily close, daily volume, daily adjusted close, and split/dividend events) of the global equity specified, covering 20+ years of historical data. The most recent data point is the prices and volume information of the current trading day, updated realtime.
Please reference https://www.alphavantage.co/documentation/#dailyadj for more detail.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.
:outputsize
"compact"
returns only the latest 100 data points in the intraday time series (default);"full"
returns the full-length intraday time series.
The
"compact"
option is recommended if you would like to reduce the data size of each API call.
Returns intraday time series (timestamp, open, high, low, close, volume) of the equity specified.
Please reference https://www.alphavantage.co/documentation/#intraday for more detail.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
:interval
Time interval between two consecutive data points in the time series. The following values are supported and accepted as strings:
"1min"
,"5min"
,"15min"
,"30min"
,"60min"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.
:outputsize
"compact"
returns only the latest 100 data points in the intraday time series (default);"full"
returns the full-length intraday time series.
The
"compact"
option is recommended if you would like to reduce the data size of each API call.
@spec intraday_extended_history(String.t(), String.t(), String.t(), Keyword.t()) :: AlphaVantage.Gateway.response()
Returns historical intraday time series for the trailing 2 years, covering over 2 million data points per ticker. The intraday data is derived from the Securities Information Processor (SIP) market-aggregated data. You can query both raw (as-traded) and split/dividend-adjusted intraday data from this endpoint. Common use cases for this API include data visualization, trading simulation/backtesting, and machine learning and deep learning applications with a longer horizon.
Please reference https://www.alphavantage.co/documentation/#intraday-extended for more detail.
Note: To ensure optimal API response time, this endpoint uses the CSV format which is more memory-efficient than JSON.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
:interval
Time interval between two consecutive data points in the time series. The following values are supported and accepted as strings:
"1min"
,"5min"
,"15min"
,"30min"
,"60min"
:slice
Two years of minute-level intraday data contains over 2 million data points, which can take up to Gigabytes of memory. To ensure optimal API response speed, the trailing 2 years of intraday data is evenly divided into 24 "slices" -
"year1month1"
,"year1month2"
,"year1month3"
, ...,"year1month11"
,"year1month12"
,"year2month1"
,"year2month2"
,"year2month3"
, ...,"year2month11"
,"year2month12"
. Each slice is a 30-day window, with"year1month1"
being the most recent and"year2month12"
being the farthest from today. By default,slice: "year1month1"
.
Optional (accepted as a keyword list)
:adjusted
By default,
adjusted: true
and the output time series is adjusted by historical split and dividend events. Setadjusted: false
to query raw (as-traded) intraday values.
Returns monthly time series (last trading day of each month, monthly open, monthly high, monthly low, monthly close, monthly volume) of the global equity specified, covering 20+ years of historical data. The latest data point is the prices and volume information for the month (or partial month) that contains the current trading day, updated realtime.
Please reference https://www.alphavantage.co/documentation/#monthly for more detail.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.
Returns monthly adjusted time series (last trading day of each month, monthly open, monthly high, monthly low, monthly close, monthly adjusted close, monthly volume, monthly dividend) of the equity specified, covering 20+ years of historical data. The latest data point is the prices and volume information for the month (or partial month) that contains the current trading day, updated realtime.
Please reference https://www.alphavantage.co/documentation/#monthlyadj for more detail.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.
Returns the latest price and volume information for a security of your choice.
Please reference https://www.alphavantage.co/documentation/#latestprice for more detail.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.
Returns the best-matching symbols and market information based on keywords of your choice. The search results also contain match scores that provide you with the full flexibility to develop your own search and filtering logic.
Please reference https://www.alphavantage.co/documentation/#symbolsearch for more detail.
Parameters
Required
:keywords
A text string of your choice. For example: keywords=
"microsoft"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.
Returns weekly time series (last trading day of each week, weekly open, weekly high, weekly low, weekly close, weekly volume) of the global equity specified, covering 20+ years of historical data. The latest data point is the prices and volume information for the week (or partial week) that contains the current trading day, updated realtime.
Please reference https://www.alphavantage.co/documentation/#weekly for more detail.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.
:outputsize
"compact"
returns only the latest 100 data points in the intraday time series (default);"full"
returns the full-length intraday time series.
The
"compact"
option is recommended if you would like to reduce the data size of each API call.
Returns 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 global equity specified, covering 20+ years of historical data. The latest data point is the prices and volume information for the week (or partial week) that contains the current trading day, updated realtime.
Please reference https://www.alphavantage.co/documentation/#weeklyadj for more detail.
Parameters
Required
:symbol
The name of the security of your choice, provided as a string. For example:
"MSFT"
Optional (accepted as a keyword list)
:datatype
"map"
returns a map (default);"json"
returns JSON format;"csv"
returns a CSV (comma separated value) file string.