hledger-stockquotes
hledger-stockquotes copied to clipboard
Allow Aliasing Commodity Symbols
From @simonmichael:
Some way to alias commodity symbols, since we don't all use the standard ticker symbols.
Maybe for when the config file is done(#6):
commodity-aliases:
<journal-commodity>: <ticker-symbol>
E.g.,:
commodity-aliases:
RETIRE: VFFVX
I think following the ledger
format for the alias sub-directive for the commodity directive might help in increasing cross-compatibility:
commodity ₹
alias INR
commodity "INE062A01020"
alias NSE:SBIN
Could definitely get behind this, to be able to use a fund's ISIN but also have a personal name.
Fixed in https://github.com/prikhi/hledger-stockquotes/commit/84c058d964c76cc87369ce5b09c469625a1059bc
I just went with extending the current yaml config. You can now specify the commodity-aliases
option, we will convert to alphavantage symbols when making the api requests & convert back to your journal symbols when writing the price directives.