From ef8fa5e5454a17c49fe14f6a2c1cffa9cd985bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 4 Aug 2018 20:12:33 +0200 Subject: Add liquidity option for cryptoportfolio users --- market.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'market.py') diff --git a/market.py b/market.py index 41c4c9c..82df34f 100644 --- a/market.py +++ b/market.py @@ -15,6 +15,7 @@ class Market: report = None trades = None balances = None + options = None def __init__(self, ccxt_instance, args, **kwargs): self.args = args @@ -26,6 +27,7 @@ class Market: self.balances = BalanceStore(self) self.processor = Processor(self) + self.options = kwargs.get("options", {}) for key in ["user_id", "market_id"]: setattr(self, key, kwargs.get(key, None)) @@ -466,7 +468,7 @@ class Processor: def parse_args(self, action, default_args, kwargs): method, allowed_arguments = self.method_arguments(action) - args = {k: v for k, v in {**default_args, **kwargs}.items() if k in allowed_arguments } + args = {k: v for k, v in {**default_args, **kwargs, **self.market.options}.items() if k in allowed_arguments } if "repartition" in args and "base_currency" in args["repartition"]: r = args["repartition"] -- cgit v1.2.3