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

Method string_div

python/ccxt/base/precise.py:203–209  ·  view source on GitHub ↗
(string1, string2, precision=18)

Source from the content-addressed store, hash-verified

201
202 @staticmethod
203 def string_div(string1, string2, precision=18):
204 if string1 is None or string2 is None:
205 return None
206 string2_precise = Precise(string2)
207 if string2_precise.integer == 0:
208 return None
209 return str(Precise(string1).div(string2_precise, precision))
210
211 @staticmethod
212 def string_add(string1, string2):

Callers 15

parse_positionMethod · 0.80
parse_positionMethod · 0.80
parse_marketMethod · 0.80
parse_positionMethod · 0.80
parse_dust_tradeMethod · 0.80
parse_position_riskMethod · 0.80
fetch_trading_feesMethod · 0.80
parse_contract_orderMethod · 0.80

Calls 2

PreciseClass · 0.70
divMethod · 0.45

Tested by 3

test_tickerFunction · 0.64
test_preciseFunction · 0.64
test_numberFunction · 0.64