sundance sundance - 1 year ago 90
Python Question

Is there a python module for the european stock markets?

I'm looking to get stock quotes from the oslo stock exchange, but the known modules like google finance (which only covers NYSE and NASDAQ according to its project page) and yahoo-finance does not provide this functionality. I though that yahoo-finance would, but clearly it does not even though its available on the yahoo finance website.

For example:

>>> import yahoo_finance
>>> yahoo = yahoo_finance.Share('NAS')
>>> print yahoo.get_price()

This works if I change the stock quote to a stock on the NASDAQ or NYSE stock exchange. I dont however see any mention about not supporting other stock exchanges on the yahoo-finance project website.

After searching a bit on google I did not find any other python module that provides this functionality.

Does someone know about any python module that provides stock quote data for the european stock exchanges ? Specifically the oslo stock exchange.. They dont seem to have any official rest apis or similar either.

Answer Source

You might just need to specify the exchange in the stock name. Zipline's load_from_yahoo seems to work fine with it assuming you were looking for Norwegian Air Shuttle and I suspect the library you're working with would as well:

In [9]:["NAS.OL"]).tail(10)
2016-09-09 00:00:00+00:00   308.2
2016-09-12 00:00:00+00:00   302.2
2016-09-13 00:00:00+00:00   301.5
2016-09-14 00:00:00+00:00   298.0
2016-09-15 00:00:00+00:00   296.9
2016-09-16 00:00:00+00:00   299.6
2016-09-19 00:00:00+00:00   300.0
2016-09-20 00:00:00+00:00   297.6
2016-09-21 00:00:00+00:00   291.9
2016-09-22 00:00:00+00:00   302.9
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download