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

Alternative for get_daily_adjusted? #21

Closed
CyberBearSec opened this issue Mar 27, 2024 · 2 comments
Closed

Alternative for get_daily_adjusted? #21

CyberBearSec opened this issue Mar 27, 2024 · 2 comments

Comments

@CyberBearSec
Copy link

I have no issue eventually paying for premium endpoints but I am just now learning - your code is MUCH appreciated! - and I would like to avoid paying for learning. Whenever I run the ts.get_daily_adjusted call, I am told it is a premium endpoint - what free endpoint can I use that would not break the rest of your code?

@imolitor
Copy link

in the config part, replace

"key_adjusted_close": "5. close" with
"key_adjusted_close": "4. close"

in the download-data function use this for the time-series: ts.get_daily


def download_data(config):
    ts = TimeSeries(key=config["alpha_vantage"]["key"])
    data, meta_data = ts.get_daily(config["alpha_vantage"]["symbol"], outputsize=config["alpha_vantage"]["outputsize"])

and finally, in the plot section, there is an error (likely because of newer libraries. Remove the b=None setting in the following line:

plt.grid(which='major', axis='y', linestyle='--')

This should work now (as of 2024-03-27)

@CyberBearSec
Copy link
Author

It works great now - thank you so much for taking the time to figure this out!

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