Bug fixes and housekeeping from ingestion testing

This commit is contained in:
fredfortier
2017-10-12 01:24:21 -04:00
parent 4895bef392
commit 73378962aa
3 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ class Bitfinex(Exchange):
self._portfolio = portfolio
self.minute_writer = None
self.minute_reader = None
self.num_candles_limit = 1000
self.num_candles_limit = 10000
# Max is 90 but playing it safe
# https://www.bitfinex.com/posts/188
+7 -4
View File
@@ -418,7 +418,8 @@ class Exchange:
return value
def get_history(self, assets, end_dt, bar_count, data_frequency):
def get_history(self, assets, end_dt, bar_count, data_frequency,
fallback_exchange=True):
"""
Retrieve OHLCV bars from the Catalyst and/or exchange API.
@@ -443,11 +444,13 @@ class Exchange:
asset=asset,
end=end_dt,
bar_count=bar_count,
data_frequency=data_frequency
data_frequency=data_frequency,
fallback_exchange=fallback_exchange
)
return candles
def get_asset_history(self, asset, end, bar_count, data_frequency):
def get_asset_history(self, asset, end, bar_count, data_frequency,
fallback_exchange=True):
"""
Retrieve the OHLVC bars of a single asset.
@@ -495,7 +498,7 @@ class Exchange:
)
data += candles
if exchange_start is not None:
if exchange_start is not None and fallback_exchange:
candles = self.get_candles(
data_frequency=data_frequency,
assets=[asset],
+2 -1
View File
@@ -227,7 +227,8 @@ class ExchangeBundle:
assets=[asset],
end_dt=end_dt,
bar_count=bar_count,
data_frequency=data_frequency
data_frequency=data_frequency,
fallback_exchange=False
)
num_candles = 0