aboutsummaryrefslogtreecommitdiff
path: root/market.py
diff options
context:
space:
mode:
Diffstat (limited to 'market.py')
-rw-r--r--market.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/market.py b/market.py
index 41c4c9c..82df34f 100644
--- a/market.py
+++ b/market.py
@@ -15,6 +15,7 @@ class Market:
15 report = None 15 report = None
16 trades = None 16 trades = None
17 balances = None 17 balances = None
18 options = None
18 19
19 def __init__(self, ccxt_instance, args, **kwargs): 20 def __init__(self, ccxt_instance, args, **kwargs):
20 self.args = args 21 self.args = args
@@ -26,6 +27,7 @@ class Market:
26 self.balances = BalanceStore(self) 27 self.balances = BalanceStore(self)
27 self.processor = Processor(self) 28 self.processor = Processor(self)
28 29
30 self.options = kwargs.get("options", {})
29 for key in ["user_id", "market_id"]: 31 for key in ["user_id", "market_id"]:
30 setattr(self, key, kwargs.get(key, None)) 32 setattr(self, key, kwargs.get(key, None))
31 33
@@ -466,7 +468,7 @@ class Processor:
466 468
467 def parse_args(self, action, default_args, kwargs): 469 def parse_args(self, action, default_args, kwargs):
468 method, allowed_arguments = self.method_arguments(action) 470 method, allowed_arguments = self.method_arguments(action)
469 args = {k: v for k, v in {**default_args, **kwargs}.items() if k in allowed_arguments } 471 args = {k: v for k, v in {**default_args, **kwargs, **self.market.options}.items() if k in allowed_arguments }
470 472
471 if "repartition" in args and "base_currency" in args["repartition"]: 473 if "repartition" in args and "base_currency" in args["repartition"]:
472 r = args["repartition"] 474 r = args["repartition"]