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

Method handle_request_network

python/ccxt/base/exchange.py:5435–5450  ·  view source on GitHub ↗

:param dict params: - extra parameters :param dict request: - existing dictionary of request :param str exchangeSpecificKey: - the key for chain id to be set in request :param dict currencyCode: - (optional) existing dictionary of request :param boolean isReq

(self, params: dict, request: dict, exchangeSpecificKey: str, currencyCode: Str = None, isRequired: bool = False)

Source from the content-addressed store, hash-verified

5433 return [value, params]
5434
5435 def handle_request_network(self, params: dict, request: dict, exchangeSpecificKey: str, currencyCode: Str = None, isRequired: bool = False):
5436 """
5437 :param dict params: - extra parameters
5438 :param dict request: - existing dictionary of request
5439 :param str exchangeSpecificKey: - the key for chain id to be set in request
5440 :param dict currencyCode: - (optional) existing dictionary of request
5441 :param boolean isRequired: - (optional) whether that param is required to be present
5442 :returns dict[]: - returns [request, params] where request is the modified request object and params is the modified params object
5443 """
5444 networkCode = None
5445 networkCode, params = self.handle_network_code_and_params(params)
5446 if networkCode is not None:
5447 request[exchangeSpecificKey] = self.network_code_to_id(networkCode, currencyCode)
5448 elif isRequired:
5449 raise ArgumentsRequired(self.id + ' - "network" param is required for self request')
5450 return [request, params]
5451
5452 def resolve_path(self, path, params):
5453 return [

Callers 1

Calls 3

network_code_to_idMethod · 0.95
ArgumentsRequiredClass · 0.90

Tested by 1