Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time_series_intraday_extended queries no longer working with new API #63

Open
snovum opened this issue Aug 16, 2023 · 4 comments
Open

Comments

@snovum
Copy link
Contributor

snovum commented Aug 16, 2023

Hi! According to the Alpha Vantage Documentation time_series_intraday_extended queries have now been folded into time_series_intraday queries via an added optional month parameter. I'm just wondering how one might incorporate month and the additional optional parameters adjusted and extended hours into the julia version as well?

The parameters in time_series_intraday queries are documented as follows:

TIME_SERIES_INTRADAY

This API returns current and 20+ years of historical intraday OHLCV time series of the equity specified, covering extended trading hours where applicable (e.g., 4:00am to 8:00pm Eastern Time for the US market). You can query both raw (as-traded) and split/dividend-adjusted intraday data from this endpoint. The OHLCV data is sometimes called "candles" in finance literature.

API Parameters
❚ Required: function

The time series of your choice. In this case, function=TIME_SERIES_INTRADAY

❚ Required: symbol

The name of the equity of your choice. For example: symbol=IBM

❚ Required: interval

Time interval between two consecutive data points in the time series. The following values are supported: 1min, 5min, 15min, 30min, 60min

❚ Optional: 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.

❚ Optional: 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.

❚ Optional: month

By default, this parameter is not set and the API will return intraday data for the most recent days of trading. You can use the month parameter (in YYYY-MM format) to query a specific month in history. For example, month=2009-01. Any month in the last 20+ years since 2000-01 (January 2000) is supported.

❚ Optional: outputsize

By default, outputsize=compact. Strings compact and full are accepted with the following specifications: compact returns only the latest 100 data points in the intraday time series; full returns trailing 30 days of the most recent intraday data if the month parameter (see above) is not specified, or the full intraday data for a specific month in history if the month parameter is specified. The "compact" option is recommended if you would like to reduce the data size of each API call.

❚ Optional: datatype

By default, datatype=json. Strings json and csv are accepted with the following specifications: json returns the intraday time series in JSON format; csv returns the time series as a CSV (comma separated value) file.

❚ Required: apikey

Sorry new to github so not sure if this is the correct forum or protocol for this issue. Thanks!

@ellisvalentiner
Copy link
Owner

@snovum Thanks for bringing this to my attention. I haven't looked at the API docs in some time so there are likely several methods that need updating. I'll see if I can get to it before the end of the week.

@snovum
Copy link
Contributor Author

snovum commented Aug 17, 2023

Thanks for looking into it! I submitted a pull request just in case it would be helpful but probably need someone with more experience to accurately address the issue.

@snovum
Copy link
Contributor Author

snovum commented Aug 29, 2023

Sorry I think my pull request did not get submitted so I tried it a second time. Thanks!

@snovum
Copy link
Contributor Author

snovum commented Sep 2, 2023

Appreciate your help with this. Sorry but I am still getting the following errors when I try to access extended data via the month argument. Any pointers you could provide when you have the time would be greatly appreciated. thanks.

] rm AlphaVantage # I removed previous installation
add https://github.com/ellisvalentiner/AlphaVantage.jl.git # added package via URL 

julia> RawData = AlphaVantage.time_series_intraday("AAPL", "1min"; month = "2000-01")
ERROR: MethodError: no method matching time_series_intraday(::String, ::String; month::String)

Closest candidates are:
  time_series_intraday(::String, ::String; client, outputsize, datatype, parser) got unsupported keyword argument "month"
   @ AlphaVantage ~/.julia/packages/AlphaVantage/c1lna/src/stock_time_series.jl:22
  time_series_intraday(::String) got unsupported keyword argument "month"
   @ AlphaVantage ~/.julia/packages/AlphaVantage/c1lna/src/stock_time_series.jl:22

Stacktrace:
 [1] kwerr(::NamedTuple{(:month,), Tuple{String}}, ::Function, ::String, ::String)
   @ Base ./error.jl:165
 [2] top-level scope
   @ REPL[26]:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants