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

Method from_precision

python/ccxt/pro/cex.py:838–844  ·  view source on GitHub ↗
(self, amount, scale)

Source from the content-addressed store, hash-verified

836 return self.safe_order(parsedOrder, market)
837
838 def from_precision(self, amount, scale):
839 if amount is None:
840 return None
841 precise = Precise(amount)
842 precise.decimals = self.sum(precise.decimals, scale)
843 precise.reduce()
844 return str(precise)
845
846 def currency_from_precision(self, currency, amount):
847 scale = self.safe_integer(self.currencies[currency], 'precision', 0)

Callers 1

Calls 3

reduceMethod · 0.95
PreciseClass · 0.90
sumMethod · 0.45

Tested by

no test coverage detected