blob: 08838a7f971537975037790a63ef665cd0a82c05 (
plain) (
tree)
|
|
import ccxt_wrapper as ccxt
market = ccxt.poloniexE({
"apiKey": "XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX",
"secret": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
})
# For requests logging
requests = []
market.session.origin_request = market.session.request
def request_wrap(self, *args, **kwargs):
r = self.origin_request(*args, **kwargs)
requests.append({
"method": args[0],
"url": args[1],
"body": kwargs["data"],
"headers": kwargs["headers"],
"status": r.status_code,
"response": r.text,
})
return r
market.session.request = request_wrap.__get__(market.session, market.session.__class__)
|