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

Method get_amount

python/ccxt/bybit.py:1646–1654  ·  view source on GitHub ↗
(self, symbol: str, amount: float)

Source from the content-addressed store, hash-verified

1644 return [subType, params]
1645
1646 def get_amount(self, symbol: str, amount: float):
1647 # some markets like options might not have the precision available
1648 # and we shouldn't crash in those cases
1649 market = self.market(symbol)
1650 emptyPrecisionAmount = (market['precision']['amount'] is None)
1651 amountString = self.number_to_string(amount)
1652 if not emptyPrecisionAmount and (amountString != '0'):
1653 return self.amount_to_precision(symbol, amount)
1654 return amountString
1655
1656 def get_price(self, symbol: str, price: str):
1657 if price is None:

Callers 2

create_order_requestMethod · 0.95
edit_order_requestMethod · 0.95

Calls 2

marketMethod · 0.45
amount_to_precisionMethod · 0.45

Tested by

no test coverage detected