Gbox4 / tstock

📈A command line tool to view stock charts in the terminal.
GNU General Public License v3.0
584 stars 44 forks source link

tstock command returns "Error: The API did not return data." when using non-premium AlphaVantage api key #26

Open forestsmills opened 2 years ago

forestsmills commented 2 years ago

The simple command format tstock {stock name abbreviation} no longer works as AlphaVantage has made the TIME_SERIES_DAILYfunction premium only. The TIME_SERIES_DAILY_ADJUSTED function is not premium only and works fine as far as i can tell.

To make tstock use TIME_SERIES_DAILY_ADJUSTED change line 148 of core.py from api_function = 'TIME_SERIES_DAILY' to api_function = 'TIME_SERIES_DAILY_ADJUSTED'

vincedchart commented 1 month ago

pursuant to the core.py settings, my test request to the following url with my true api key : https://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&symbol=IBM&interval=5min&apikey=DUMB000API000KEY0005ZO

got the result:

{ "Information": "Thank you for using Alpha Vantage! This is a premium endpoint. You may subscribe to any of the premium plans at https://www.alphavantage.co/premium/ to instantly unlock all premium endpoints" }

So I'm seeing that Error that you described, again. Any fix?

used tstock air.pa -t week instead