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

Method amount_to_precision

python/ccxt/async_support/bitmex.py:577–583  ·  view source on GitHub ↗
(self, symbol, amount)

Source from the content-addressed store, hash-verified

575 return Precise.string_mul(amount, precision)
576
577 def amount_to_precision(self, symbol, amount):
578 symbol = self.safe_symbol(symbol)
579 market = self.market(symbol)
580 oldPrecision = self.safe_value(self.options, 'oldPrecision')
581 if market['spot'] and not oldPrecision:
582 amount = self.convert_from_real_amount(market['base'], amount)
583 return super(bitmex, self).amount_to_precision(symbol, amount)
584
585 def convert_from_raw_quantity(self, symbol, rawQuantity, currencySide='base'):
586 if self.safe_value(self.options, 'oldPrecision'):

Callers 15

create_orderMethod · 0.95
edit_orderMethod · 0.95
create_order_requestMethod · 0.45
modify_margin_helperMethod · 0.45
create_orderMethod · 0.45
get_amountMethod · 0.45
create_order_requestMethod · 0.45
create_orderMethod · 0.45
edit_orderMethod · 0.45

Calls 4

safe_symbolMethod · 0.80
safe_valueMethod · 0.80
marketMethod · 0.45

Tested by

no test coverage detected