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

Method encode_values_with_json

python/ccxt/aster.py:3964–3974  ·  view source on GitHub ↗
(self, values: dict)

Source from the content-addressed store, hash-verified

3962 return {'url': url, 'method': method, 'body': body, 'headers': headers}
3963
3964 def encode_values_with_json(self, values: dict) -> str:
3965 encodedString = ''
3966 keys = list(values.keys())
3967 for i in range(0, len(keys)):
3968 key = keys[i]
3969 value = values[key]
3970 isObj = isinstance(value, list) or self.is_dictionary(value)
3971 valueJsonified = self.json(value) if isObj else str(value)
3972 encoded = self.encode_uri_component(valueJsonified)
3973 encodedString += key + '=' + encoded + '&'
3974 return encodedString[0:-1]
3975
3976 def capitalize_keys(self, dict: dict) -> dict:
3977 capitalized = {}

Callers 1

signMethod · 0.95

Calls 4

is_dictionaryMethod · 0.80
encode_uri_componentMethod · 0.80
rangeFunction · 0.50
jsonMethod · 0.45

Tested by

no test coverage detected