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

Method safe_float

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

Source from the content-addressed store, hash-verified

756
757 @staticmethod
758 def safe_float(dictionary, key, default_value=None):
759 try:
760 return float(dictionary[key])
761 except Exception:
762 return default_value
763
764 @staticmethod
765 def safe_string(dictionary, key, default_value=None):

Callers 15

test_safe_methodsFunction · 0.95
handle_deltaMethod · 0.80
handle_deltaMethod · 0.80
handle_ohlcvMethod · 0.80
handle_deltaMethod · 0.80
handle_ohlcvMethod · 0.80
handle_order_bookMethod · 0.80
handle_deltaMethod · 0.80
handle_deltaMethod · 0.80
handle_bid_asksMethod · 0.80
handle_ohlcvMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_safe_methodsFunction · 0.76