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

Method safe_integer_product

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

Source from the content-addressed store, hash-verified

803
804 @staticmethod
805 def safe_integer_product(dictionary, key, factor, default_value=None):
806 try:
807 return int(float(dictionary[key]) * factor)
808 except Exception:
809 return default_value
810
811 @staticmethod
812 def safe_timestamp(dictionary, key, default_value=None):

Callers 15

test_safe_methodsFunction · 0.95
parse_orderMethod · 0.80
parse_contract_tickerMethod · 0.80
parse_uta_orderMethod · 0.80
parse_my_uta_tradeMethod · 0.80
parse_ledger_entryMethod · 0.80
parse_positionMethod · 0.80
fetch_spot_marketsMethod · 0.80
parse_contract_marketMethod · 0.80
parse_marketMethod · 0.80
parse_tradeMethod · 0.80
parse_ohlcvMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_safe_methodsFunction · 0.76