1

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()
None

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.

njzk2
  • 38,969
  • 7
  • 69
  • 107
exceed
  • 459
  • 7
  • 19
  • I couldn't find anything either. Do you need the European Stock Market specifically? – baranskistad Sep 23 '16 at 19:11
  • Its the oslo stock market I specifically need, but it would be convenient if it supported the other or some of the other stock markets in europe as well. I checked the data provider for the Oslo stock exchange and they seem to have an API but requires you to make an order and pay an unknown amount of money to them. As this is for my own personal use I'm not looking to pay to get that data. – exceed Sep 23 '16 at 19:19

1 Answers1

1

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]: zipline.data.load_from_yahoo(stocks=["NAS.OL"]).tail(10)
Out[9]:
                           NAS.OL
Date
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
Randy
  • 14,349
  • 2
  • 36
  • 42
  • Ah, great, that works. Actually, using data from your example I just modified my original code to use the yahoo finance Share function to take the quote "NAS.OL" instead of just "NAS" and that worked. Thanks :) – exceed Sep 23 '16 at 19:22
  • No problem -- glad it was an easy fix! – Randy Sep 23 '16 at 19:23