blob: 224cc32bae3b19b51f20cc2ee2158062664f86ad (
plain) (
tree)
|
|
import ccxt_wrapper as ccxt
from store import ReportStore
def get_market(config):
market = ccxt.poloniexE(config)
# For requests logging
market.session.origin_request = market.session.request
def request_wrap(self, *args, **kwargs):
r = self.origin_request(*args, **kwargs)
ReportStore.log_http_request(args[0], args[1], kwargs["data"],
kwargs["headers"], r)
return r
market.session.request = request_wrap.__get__(market.session, market.session.__class__)
return market
|