lavolp3 / MMM-AVStock

MagicMirror module for displaying stock price with yfinance API
MIT License
39 stars 18 forks source link

How ti find correct symbols? #21

Closed smartroad closed 3 years ago

smartroad commented 4 years ago

Hi,

Just started using this as friend has asked to have stocks on his MM. I have desperately trying to understand how the symbols work for different stock exchanges. Is there anywhere on Alpha Vantage that I can search for a company and get their stock symbol?

For example one I am looking for is Rolls Royce, who are "rr" on the London Stock Exchange (FTSE). I have tried "rr", "rr.LS", "rr.LSE", "rr.FTS", "rr.FTSE" and nothing comes up. Is there an easy way to search for the correct symbols to use with this module?

Cheers!!

lavolp3 commented 4 years ago

Try "RR.LON"

THere's a keyword search function included in the API. https://www.alphavantage.co/documentation/#symbolsearch I found the RR.LON ticker using https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=rolls&apikey=NXXXXXXXXXXXXX

Thinking about how to implement this into the module. If you have an idea, let me know.