hledger-stockquotes is an addon for hledger that
reads your journal file, pulls the historical stock prices for commodities,
and writes out a new journal file containing the respective price
directives.
The AlphaVantage API is used to fetch the
stock quotes and you will need a
free API key to use this
program.
You can install hledger-stockquotes with Stack: stack install --resolver
nightly hledger-stockquotes. Then run hledger-stockquotes --help to see
the usage instructions & all available options.