from ccxt import ExchangeError, InsufficientFunds, ExchangeNotAvailable, InvalidOrder, OrderNotCached, OrderNotFound, RequestTimeout, InvalidNonce
class Computation:
+ @staticmethod
+ def eat_several(market):
+ return lambda x, y: market.ccxt.fetch_nth_order_book(x["symbol"], y, 15)
+
computations = {
"default": lambda x, y: x[y],
"average": lambda x, y: x["average"],
if tick in self.tick_actions:
update, compute_value = self.tick_actions[tick]
elif tick % 3 == 1:
- update = "market_adjust"
- compute_value = "default"
+ if tick < 20:
+ update = "market_adjust"
+ compute_value = "default"
+ else:
+ update = "market_adjust_eat"
+ compute_value = Computation.eat_several(self.market)
else:
update = "waiting"
compute_value = None