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

Method safe_integer_omit_zero

python/ccxt/base/exchange.py:3647–3651  ·  view source on GitHub ↗
(self, obj: object, key: IndexType, defaultValue: Int = None)

Source from the content-addressed store, hash-verified

3645 return defaultValue if (final is None) else final
3646
3647 def safe_integer_omit_zero(self, obj: object, key: IndexType, defaultValue: Int = None):
3648 timestamp = self.safe_integer(obj, key, defaultValue)
3649 if timestamp is None or timestamp == 0:
3650 return None
3651 return timestamp
3652
3653 def after_construct(self):
3654 # networks

Callers 15

test_safe_methodsFunction · 0.95
parse_tickerMethod · 0.80
parse_tickerMethod · 0.80
parse_tickerMethod · 0.80
parse_adl_rankMethod · 0.80
parse_tickerMethod · 0.80
parse_tickerMethod · 0.80

Calls 1

safe_integerMethod · 0.95

Tested by 1

test_safe_methodsFunction · 0.76