BLD: misc adjustments to fetch all candles on the Binance exchange

This commit is contained in:
Frederic Fortier
2018-01-25 23:38:37 -05:00
parent 43737a9730
commit fa60457a0f
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -178,6 +178,7 @@ class Exchange:
if symbols is None:
# Make a distinct list of all symbols
symbols = list(set([asset.symbol for asset in self.assets]))
symbols.sort()
if quote_currency is not None:
for symbol in symbols[:]:
+4 -3
View File
@@ -67,7 +67,7 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm):
self.current_day = None
if self.simulate_orders is None \
and self.sim_params.arena == 'backtest':
and self.sim_params.arena == 'backtest':
self.simulate_orders = True
# Operations with retry features
@@ -115,7 +115,7 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm):
# be in-line with CXXT and many exchanges. We'll consider
# adding more order types in the future.
if not isinstance(style, ExchangeLimitOrder) or \
not isinstance(style, MarketOrder):
not isinstance(style, MarketOrder):
raise OrderTypeNotSupported(
order_type=style.__class__.__name__
)
@@ -901,7 +901,8 @@ class ExchangeTradingAlgorithmLive(ExchangeTradingAlgorithmBase):
sleeptime=self.attempts['retry_sleeptime'],
retry_exceptions=(ExchangeRequestError,),
cleanup=lambda: log.warn('Fetching open orders again.'),
args=(asset,))
args=(asset,)
)
@api_method
def get_order(self, order_id, exchange_name):