The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Alphavantagepf interfaces the Alphavantage API to R
in a way most compatible with normalized data stores. It returns data in
data.table format, which is really the best choice for
financial time series analysis.
There is one main function to call to access all of the API functionality provided by Alphavantage.
To find parameters and defaults provided by the
alphavantagepf package, use av_funhelp()
av_funhelp("SERIES_INTRADAY")
#> Function: TIME_SERIES_INTRADAY
#> Category: equity
#>
#> Parameters:
#> R> symbol
#> R> interval (default: 15min)
#> O> adjusted
#> O> extended_hours
#> O> month
#> O> outputsize (default: compact)
#> O> entitlement (default: {entitlement})
#> [1] "Function: TIME_SERIES_INTRADAY\nCategory: equity\n\nParameters:\nR> symbol\nR> interval (default: 15min)\nO> adjusted\nO> extended_hours\nO> month\nO> outputsize (default: compact)\nO> entitlement (default: {entitlement})\n"Required parameters are listed with “R” and optional parameters (and any default provided by this package) are listed with “O”
Once the API key has been set, use the function
av_get_pf() which requires at minimum two arguments, a
symbol (put first to facilitate usage in pipes) and an
Alphavantage “function” av_fun.
The resulting output will be a data.table that depends
on the type of data requested. (Note that data is returned in a
data.table, which can be cast as tibbles as necessary.)
The output will always include the symbol requested or
the name of the av_fun used if a symbol isn’t relevent. If
that variable isn’t wanted (e.g. when called within a grouping function
group_by(symbol) |> do({}) then set
symbolvarnm="".
symbol will either be the symbol requested or the
value of av_fun if a symbol isn’t relevant.
variable which is the name of the data item
value_str, value_num and/or
value_df which will contain strings (converted to numeric
if possible) or (in the case of value_df) a nested
data.frame.
ltype is the inferred data-type, helpful for
selecting the correct columns.
av_get_pf("","TOP_GAINERS_LOSERS")
Key: <variable>
symbol variable ltype value_df value_str value_num
<char> <char> <char> <list> <char> <num>
1: TOP_GAINERS_LOSERS last_updated numeric [NULL] 2026-01-05 16:15:59 US/Eastern 2026
2: TOP_GAINERS_LOSERS metadata character [NULL] Top gainers, losers, and most actively t NA
3: TOP_GAINERS_LOSERS most_actively_traded list <data.frame[20x5]> NULL NA
4: TOP_GAINERS_LOSERS top_gainers list <data.frame[20x5]> NULL NA
5: TOP_GAINERS_LOSERS top_losers list <data.frame[20x5]> NULL NAav_extract_dfExtracting the nested data.frames can be a tedious task, so the
helper function av_extract_df() can be used to filter for
the correct variable and extract the data.frame
av_get_pf("","TOP_GAINERS_LOSERS") |> av_extract_df("top_losers")
Key: <variable>
symbol variable ltype value_df value_str value_num
<char> <char> <char> <list> <char> <num>
1: TOP_GAINERS_LOSERS last_updated numeric [NULL] 2026-01-05 16:15:59 US/Eastern 2026
2: TOP_GAINERS_LOSERS metadata character [NULL] Top gainers, losers, and most actively t NA
3: TOP_GAINERS_LOSERS most_actively_traded list <data.frame[20x5]> NULL NA
4: TOP_GAINERS_LOSERS top_gainers list <data.frame[20x5]> NULL NA
5: TOP_GAINERS_LOSERS top_losers list <data.frame[20x5]> NULL NAThese binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.