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

Method safe_number

python/ccxt/base/exchange.py:6835–6837  ·  view source on GitHub ↗
(self, obj, key: IndexType, defaultNumber: Num = None)

Source from the content-addressed store, hash-verified

6833 return self.precisionMode == SIGNIFICANT_DIGITS
6834
6835 def safe_number(self, obj, key: IndexType, defaultNumber: Num = None):
6836 value = self.safe_string(obj, key)
6837 return self.parse_number(value, defaultNumber)
6838
6839 def safe_number_n(self, obj: object, arr: List[IndexType], defaultNumber: Num = None):
6840 value = self.safe_string_n(obj, arr)

Callers 15

test_safe_methodsFunction · 0.95
safe_ledger_entryMethod · 0.95
safe_orderMethod · 0.95
parse_fee_numericMethod · 0.95
safe_tickerMethod · 0.95
parse_ohlcvMethod · 0.95
safe_networkMethod · 0.95
safe_positionMethod · 0.95
safe_open_interestMethod · 0.95
parse_currencyMethod · 0.80

Calls 2

safe_stringMethod · 0.95
parse_numberMethod · 0.95

Tested by 10

test_safe_methodsFunction · 0.76
tco_mininum_amountFunction · 0.64
tco_mininum_costFunction · 0.64
test_fetch_last_pricesFunction · 0.64
fetch_best_bid_askFunction · 0.64
tco_mininum_amountFunction · 0.64
tco_mininum_costFunction · 0.64
test_fetch_last_pricesFunction · 0.64