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

Method request

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

Source from the content-addressed store, hash-verified

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