MCPcopy Create free account
hub / github.com/ccxt/ccxt / request

Method request

python/ccxt/btcbox.py:805–813  ·  view source on GitHub ↗
(self, path, api='public', method='GET', params={}, headers=None, body=None, config={})

Source from the content-addressed store, hash-verified

803 raise ExchangeError(feedback) # unknown message
804
805 def request(self, path, api='public', method='GET', params={}, headers=None, body=None, config={}):
806 response = self.fetch2(path, api, method, params, headers, body, config)
807 if isinstance(response, str):
808 # sometimes the exchange returns whitespace prepended to json
809 response = self.strip(response)
810 if not self.is_json_encoded_object(response):
811 raise ExchangeError(self.id + ' ' + response)
812 response = json.loads(response)
813 return response

Callers

nothing calls this directly

Calls 5

ExchangeErrorClass · 0.90
fetch2Method · 0.45
stripMethod · 0.45
loadsMethod · 0.45

Tested by

no test coverage detected