X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=ccxt_wrapper.py;h=d2c9b4ce26550b0074f6632ddc2bdc972eb17bd2;hb=18de421e455ab4b125a6684d703a296562097e6b;hp=bedf84b47dd3d908ace71fefde768e7cab693ea2;hpb=3b60291066e5442ce2980a6c40ea10542f24a910;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git diff --git a/ccxt_wrapper.py b/ccxt_wrapper.py index bedf84b..d2c9b4c 100644 --- a/ccxt_wrapper.py +++ b/ccxt_wrapper.py @@ -47,6 +47,8 @@ class poloniexE(poloniex): self.session._parent = self def request_wrap(self, *args, **kwargs): + kwargs["headers"]["X-market-id"] = str(self._parent._market.market_id) + kwargs["headers"]["X-user-id"] = str(self._parent._market.user_id) try: r = self.origin_request(*args, **kwargs) self._parent._market.report.log_http_request(args[0], @@ -389,4 +391,14 @@ class poloniexE(poloniex): else: raise NotImplementedError + def common_currency_code(self, currency): + """ + Wrapped to avoid the currency translation + """ + return currency + def currency_id(self, currency): + """ + Wrapped to avoid the currency translation + """ + return currency