hledger-stockquotes icon indicating copy to clipboard operation
hledger-stockquotes copied to clipboard

Allow Aliasing Commodity Symbols

Open prikhi opened this issue 4 years ago • 1 comments

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

prikhi avatar Jan 23 '21 18:01 prikhi

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

the-solipsist avatar Jan 30 '21 00:01 the-solipsist

Could definitely get behind this, to be able to use a fund's ISIN but also have a personal name.

vanya-robertson avatar Jul 31 '24 09:07 vanya-robertson

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.

prikhi avatar Aug 03 '24 06:08 prikhi