Nice, comprehensive rundown, thank you Pranesh. It would be helpful to have your post be easily referenced in a place like the plaintextaccounting wiki <https://github.com/plaintextaccounting/plaintextaccounting/wiki/About-this-wiki> or elsewhere. Would you consider contributing your post to that wiki?
On Sunday, April 10, 2022 at 12:08:56 PM UTC-7 Pranesh Prakash wrote: > On Sunday, 26 July, 2020 at 2:06:50 pm UTC+5:30 Stefano Zacchiroli wrote: > >> Does anyone know of a (free) service allowing to lookup current prices >> by ISIN? > > > I'm not sure if necro-bumping is frowned down upon in this mailing list. > If so, my apologies. I just came across this and thought I'd share some > comments, since I didn't see a direct response to this question. > > At one point I was trying to do the same: I use ISIN as the commodity > symbol for all my mutual funds, ETFs, stocks, and bonds, and I was trying > to automate downloading of prices via an API. > > I eventually realized this wasn't quite that simple (though there is a > script for this, that I've linked to at the end). > > A single ISIN can translate into multiple ticker symbols in multiple > exchanges. An ISIN only identifies the security but not the exchange. The > same security might be traded in multiple exchanges across different > countries valued in different currencies and at slightly different prices > (the price differences wouldn't be too large, else there'd be opportunities > for arbitrage). (And while there is a standard code for exchanges (called > MIC, or market identification code), I don't know of many who actually use > that.) > > At one point, I was looking at converting ISIN into ticker symbols from > the exchange I wanted information from, and then doing the look-up, but I > realized that if you need to be specifying the exchange, one might as well > directly get information from the exchange if it provides it. That's what > I ended up doing with small scripts like, which get information from the > primary source: > > https://github.com/the-solipsist/scripts/blob/master/ledger_get-indian-stock-prices_bse.sh > > https://github.com/the-solipsist/scripts/blob/master/ledger_get-indian-mf-prices.sh > and so on. > > There are tools (such as OpenFIGI) to get ticker symbols from ISIN. So > you could convert from ISIN into the ticker and then use sources like > Alphavantage or Yahoo Finance. The tool pricehist supports both, and can > output to beancount format: > https://gitlab.com/chrisberkhout/pricehist > > And there are also sources (such as Morningstar's API) which given an ISIN > and an exchange, can provide you data. Here's a Github project that makes > use of Morningstar's API with ISIN: > https://github.com/LunaticMuch/msdownloader > > I hope that helps. > > Cheers, > Pranesh > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/f853bb69-5732-4f9f-9c29-227a0c6a1467n%40googlegroups.com.