How muFunds works
In a few words, muFunds fetches a web page from the chosen data source, reads the data you asked for from it, and returns it to your spreadsheet.
More precisely, these are the steps it follows:
- You call the muFunds function from a Google Sheets spreadsheet with an
option(asset attribute), anid(asset identifier) and, optionally, asource(website to fetch the data from). - If you give a
source, muFunds plans to fetch that source’s detail page for theid. Otherwise, it plans to fetch a Morningstar page in generic mode (morningstar). - If the page is in Google Apps Script’s cache from the last 2 hours, no external call is made. Otherwise, the page is fetched and saved in the cache for the next 2 hours.
- The requested attribute is read from the page’s HTML and returned.
Considerations
- More technical details and the actual code are in the muFunds repository on GitHub.