Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertRtk committed Dec 13, 2020
1 parent 9da2d85 commit 1c3176f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion marketools/stqscraper/stockquotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ def read_ohlcv_from_csv(file_path):
return output


class StockQuotes():
class StockQuotes:
def __init__(self, ticker):
super().__init__()
self.ticker = ticker
self._historical_ohlc = None

@property
def data(self):
if self._historical_ohlc is None:
self._historical_ohlc = self._get_data()
return self._historical_ohlc

@property
def csv_file_path(self):
return path.join(DATA_DIR, f'{self.ticker}_ohcl.csv')
Expand Down

0 comments on commit 1c3176f

Please sign in to comment.