aboutsummaryrefslogtreecommitdiff
path: root/market.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-24 15:18:56 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-24 16:06:44 +0100
commit445b4a7712fb7fe45e17b6b76356dd3be42dd900 (patch)
tree80b7ac28d5d2ed26a7c52ae02d3dc251396b92fb /market.py
parentc7c1e0b26821fdd5622f81fb456f1028d4c9ab09 (diff)
downloadTrader-445b4a7712fb7fe45e17b6b76356dd3be42dd900.tar.gz
Trader-445b4a7712fb7fe45e17b6b76356dd3be42dd900.tar.zst
Trader-445b4a7712fb7fe45e17b6b76356dd3be42dd900.zip
Move request wrapper to ccxt
Diffstat (limited to 'market.py')
-rw-r--r--market.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/market.py b/market.py
index 496ec45..055967c 100644
--- a/market.py
+++ b/market.py
@@ -33,18 +33,6 @@ class Market:
33 33
34 ccxt_instance = ccxt.poloniexE(config) 34 ccxt_instance = ccxt.poloniexE(config)
35 35
36 # For requests logging
37 ccxt_instance.session.origin_request = ccxt_instance.session.request
38 ccxt_instance.session._parent = ccxt_instance
39
40 def request_wrap(self, *args, **kwargs):
41 r = self.origin_request(*args, **kwargs)
42 self._parent._market.report.log_http_request(args[0],
43 args[1], kwargs["data"], kwargs["headers"], r)
44 return r
45 ccxt_instance.session.request = request_wrap.__get__(ccxt_instance.session,
46 ccxt_instance.session.__class__)
47
48 return cls(ccxt_instance, args, **kwargs) 36 return cls(ccxt_instance, args, **kwargs)
49 37
50 def store_report(self): 38 def store_report(self):