Open
Description
I'm having trouble adapting the FX examples to regular stocks, and cannot find any examples or documentation on how stocks would work.
The stock I'm testing with is TEL on Oslo Bors and it's available on Quandl as https://www.quandl.com/data/YAHOO/OL_TEL
I have added a ticker definition in /usr/local/lib/python3.5/dist-packages/findatapy/conf/time_series_tickers_list.csv:
stocks,quandl,daily,TEL,OL,close,YAHOO/OL_TEL,5:00pm Oslo,,,
and request code as:
md_request = MarketDataRequest(start_date='year', cut='OL', category='stocks', fields=['close'], data_source='quandl', tickers=['TEL'])
But I'm getting this error:
2017-01-16 16:36:18,469 - findatapy.market.datavendorweb - INFO - Request Quandl data error Traceback (most recent call last): File "finapi.py", line 7, in df = market.fetch_market(md_request) File "/usr/local/lib/python3.5/dist-packages/findatapy/market/market.py", line 155, in fetch_market return self.market_data_generator.fetch_market_data(md_request) File "/usr/local/lib/python3.5/dist-packages/findatapy/market/marketdatagenerator.py", line 139, in fetch_market_data data_frame_agg = self.download_daily(market_data_request) File "/usr/local/lib/python3.5/dist-packages/findatapy/market/marketdatagenerator.py", line 434, in download_daily data_frame_agg = self.fetch_group_time_series(market_data_request_list) File "/usr/local/lib/python3.5/dist-packages/findatapy/market/marketdatagenerator.py", line 378, in fetch_group_time_series data_frame_group = result.get() File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get raise self._value File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/usr/lib/python3.5/multiprocessing/pool.py", line 44, in mapstar return list(map(*args)) File "/usr/local/lib/python3.5/dist-packages/findatapy/market/marketdatagenerator.py", line 339, in fetch_single_time_series data_frame_single = self.get_data_vendor(market_data_request.data_source).load_ticker(market_data_request) File "/usr/local/lib/python3.5/dist-packages/findatapy/market/datavendorweb.py", line 81, in load_ticker for i in range(0, len(fields)): UnboundLocalError: local variable 'fields' referenced before assignment
Metadata
Metadata
Assignees
Labels
No labels