Yet another Excel VBA tool to fetch financial data from Yahoo.
As Yahoo discontinued their ichart download API since 2017, it becomes more difficult to fetch financial data from Yahoo Finance, especially historical data, which requires a valid cookie to access. This Excel VBA tool doe not deal with historical data, but it allows users to fetch multiple types of real-time information from Yahoo Finance website, using some of the Yahoo APIs that programmers found out on the Internet.
See the Excel spreadsheet for details. The instructions tell you how to integrate it into your workbook. The main part of the code is put into the Excel worksheet object rather than into a standard module at request. For convenience, I also exported the code to GetDataModule.bas. You do not need to import anything to the spreadsheet, because the spreadsheet is already usable.
Ver 2.00
- Significantly improved the stability when fetching basic information, including prices, time and exchanges.
- Added Sector and Industry. Other asset profile information is provided in the work area.
- Use the open source VBA-JSON to parse the response from Yahoo. With VBA-JSON it can parse complex JSON structures,
including asset profile information from Yahoo website.
VBA-JSON is published under MIT License.
Ver 2.01
- Added 'On Error' statement
VBA-JSON (c) Tim Hall, JSON conversion and parsing for VBA, MIT Licnese