yfinance icon indicating copy to clipboard operation
yfinance copied to clipboard

Add function to map MIC to yahoo suffix

Open mxdev88 opened this issue 3 years ago • 1 comments

In most cases, Yahoo Finance builds its symbol from the ticker symbol + a yahoo market suffix

It would be quite useful if the yfinance had a built in way to map MIC code to Yahoo suffixes.

For example,

suffix = yf.market_suffix(mic='XPAR')

This would allow to 'easily' build many of the yahoo symbols from systems that use MIC as market identifiers.

e.g. 'XPAR' => '.PA', 'XNYM' => '.NYM', 'XCBT' => '.CBT', and so on...

@ranaroussi, if that makes sense I can contribute a PR.

mxdev88 avatar May 05 '21 20:05 mxdev88

As only you have requested this, best if you implement outside yfinance to minimise code bloat.

ValueRaider avatar Jan 06 '23 17:01 ValueRaider