X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git;a=blobdiff_plain;f=market.py;fp=market.py;h=9612b17406de5b45bec1e6dabb59e3e3c870d16d;hp=546ee948f59ded12e53d9c38e34da24477fda90f;hb=34865e65933da0db778e171fc787eca114ec562d;hpb=a4bb44d8bc27af7c57f439ffd9edca51c2f0afb4 diff --git a/market.py b/market.py index 546ee94..9612b17 100644 --- a/market.py +++ b/market.py @@ -427,16 +427,16 @@ class Processor: self.market.report.log_stage("{}_begin".format(process_name)) if "fetch_balances_begin" in step: - self.market.balances.fetch_balances(tag="{}_begin".format(process_name), - **step["fetch_balances_begin"]) + self.run_action("fetch_balances", step["fetch_balances_begin"], + dict(options, tag="{}_begin".format(process_name))) for action in self.ordered_actions: if action in step: self.run_action(action, step[action], options) if "fetch_balances_end" in step: - self.market.balances.fetch_balances(tag="{}_end".format(process_name), - **step["fetch_balances_end"]) + self.run_action("fetch_balances", step["fetch_balances_end"], + dict(options, tag="{}_end".format(process_name))) self.market.report.log_stage("{}_end".format(process_name)) @@ -459,6 +459,8 @@ class Processor: method = self.market.trades.close_trades elif action == "print_tickers": method = self.market.print_tickers + elif action == "fetch_balances": + method = self.market.balances.fetch_balances signature = inspect.getfullargspec(method) defaults = signature.defaults or []