Revert to working version

This commit is contained in:
2025-01-27 20:48:24 -05:00
parent 43f5ae3c53
commit 1ef6cc4857
2 changed files with 46 additions and 35 deletions

View File

@@ -77,3 +77,28 @@ class KrakenBot(KrakenAPI):
order.close_price, order.close_price2, order.deadline, order.validate, order.otp)
self.log.info(order)
self.update()
def update(self, full=False):
self.log.debug(f"update: full={full}")
self._update_tradable_asset_pairs()
self._filter_tradable_asset_pairs()
self._update_account_balance()
self._filter_account_balance()
self._update_trade_balance()
if full:
self._update_ohlc_data()
self.model.update(
self.tradable_asset_pairs,
self.ohlc_data
)
self.trading_strategy.update(
self.tradable_asset_pairs,
self.ohlc_data,
self.model.analysis,
self.account_balance
)
def execute(self):
self.log.debug(f"execute")
for order in self.trading_strategy.orders:
self._add_standard_order(order)