diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-07 17:39:29 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-04-07 19:43:48 +0200 |
commit | e7d7c0e5645da35adcbfec9e51deb68f012c422f (patch) | |
tree | 990a884e058cff0467f7486efb422fb6b659f709 /ccxt_wrapper.py | |
parent | c682bdf4a02a45312ef1aadf8aa26136cf308414 (diff) | |
download | Trader-e7d7c0e5645da35adcbfec9e51deb68f012c422f.tar.gz Trader-e7d7c0e5645da35adcbfec9e51deb68f012c422f.tar.zst Trader-e7d7c0e5645da35adcbfec9e51deb68f012c422f.zip |
Acceptance test preparation
Save some headers for http requests
Wait for all threads after the end of main
Simplify library imports for mocking
Diffstat (limited to 'ccxt_wrapper.py')
-rw-r--r-- | ccxt_wrapper.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ccxt_wrapper.py b/ccxt_wrapper.py index bedf84b..366586c 100644 --- a/ccxt_wrapper.py +++ b/ccxt_wrapper.py | |||
@@ -47,6 +47,8 @@ class poloniexE(poloniex): | |||
47 | self.session._parent = self | 47 | self.session._parent = self |
48 | 48 | ||
49 | def request_wrap(self, *args, **kwargs): | 49 | def request_wrap(self, *args, **kwargs): |
50 | kwargs["headers"]["X-market-id"] = str(self._parent._market.market_id) | ||
51 | kwargs["headers"]["X-user-id"] = str(self._parent._market.user_id) | ||
50 | try: | 52 | try: |
51 | r = self.origin_request(*args, **kwargs) | 53 | r = self.origin_request(*args, **kwargs) |
52 | self._parent._market.report.log_http_request(args[0], | 54 | self._parent._market.report.log_http_request(args[0], |