def __init__(self,
sources, indicators, exchanges, inhablers,
override_vars={}, quiet=False, *args, **kwargs):
super(BaseBot,self).__init__()
self._quiet = quiet
self.exchanges = exchanges
self.sources = sources
self.indicators = indicators
self.inhablers = inhablers
self.vars = self.DEFAULT_VARS.copy()
self.stats = self.DEFAULT_STATS.copy()
print("Overriding: %s" % (override_vars,))
self.vars.update(override_vars)
if self.CSV_FIELDS:
# Get a data log open; all bots should use one
csv_fp = open(self.vars['output_stats_csv'], 'w')
self._csv = csv.DictWriter(csv_fp, ['timestamp']+self.CSV_FIELDS)
评论列表
文章目录