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

Method safe_integer_2

python/ccxt/base/exchange.py:865–872  ·  view source on GitHub ↗
(dictionary, key1, key2, default_value=None)

Source from the content-addressed store, hash-verified

863
864 @staticmethod
865 def safe_integer_2(dictionary, key1, key2, default_value=None):
866 try:
867 return int(float(dictionary[key1]))
868 except Exception:
869 try:
870 return int(float(dictionary[key2]))
871 except Exception:
872 return default_value
873
874 @staticmethod
875 def safe_integer_product_2(dictionary, key1, key2, factor, default_value=None):

Callers 15

test_safe_methodsFunction · 0.95
handle_until_optionMethod · 0.95
parse_orderMethod · 0.80
parse_transactionMethod · 0.80
parse_conversionMethod · 0.80
parse_tickerMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_safe_methodsFunction · 0.76