I'm using the Alpha Vantage API to fetch stock market data. However, this API seems to be geared towards only providing series of data which is also implied in its aptly named functions like TimeSeries. That means that if I request a quote from the API I get a series of different dates, times and so forth.
What I'm after is to get only data from a specific date and nothing else. I could get todays date and then use the "is in" if loop to check for it, but that does not seem like a good solution and it would waste quite a bit of resources, so I'm looking to see if there is another better solution available. I have not seen any mention of getting a single entry from their API and tring to get a slice of the dict returned does not seem to work good as the dict is unsorted.
Does someone know about a good way of fetching only stock market data from a single date from the TimeSeries class ?
I came across this problem and this question, and after looking into the documentation I saw this Quote Endpoint that returns just the latest info. Here is the description:
Example from the documentation:
https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=MSFT&apikey=demo
If you need data from another day in the past you can download all historical data once and cache it.