MCPcopy
hub / github.com/ccxt/ccxt / safe_string

Method safe_string

python/ccxt/base/exchange.py:765–772  ·  view source on GitHub ↗
(dictionary, key, default_value=None)

Source from the content-addressed store, hash-verified

763
764 @staticmethod
765 def safe_string(dictionary, key, default_value=None):
766 try:
767 value = dictionary[key]
768 if value is not None and value != '':
769 return str(value)
770 except Exception:
771 pass
772 return default_value
773
774 @staticmethod
775 def safe_string_lower(dictionary, key, default_value=None):

Callers 15

fetch_unified_orderMethod · 0.95
cancel_unified_orderMethod · 0.95
fetch_deposit_addressMethod · 0.95
test_safe_methodsFunction · 0.95
test_base64_to_binaryFunction · 0.95
test_binary_to_base64Function · 0.95
safe_number_omit_zeroMethod · 0.95
features_mapperMethod · 0.95

Calls

no outgoing calls

Tested by 15

test_safe_methodsFunction · 0.76
test_base64_to_binaryFunction · 0.76
test_binary_to_base64Function · 0.76
expand_settingsMethod · 0.64
get_test_symbolMethod · 0.64
expand_settingsMethod · 0.64
get_test_symbolMethod · 0.64