@ignore handles positive & negative numbers too. parsePrecision() does not handle negative numbers, but self method handles :param str precision: The number of digits to the right of the decimal :returns str: a string number equal to 1e-precision
(self, precision: Str)
| 6863 | return parsedPrecision + '0' |
| 6864 | |
| 6865 | def integer_precision_to_amount(self, precision: Str): |
| 6866 | """ |
| 6867 | @ignore |
| 6868 | handles positive & negative numbers too. parsePrecision() does not handle negative numbers, but self method handles |
| 6869 | :param str precision: The number of digits to the right of the decimal |
| 6870 | :returns str: a string number equal to 1e-precision |
| 6871 | """ |
| 6872 | if precision is None: |
| 6873 | return None |
| 6874 | if Precise.string_ge(precision, '0'): |
| 6875 | return self.parse_precision(precision) |
| 6876 | else: |
| 6877 | positivePrecisionString = Precise.string_abs(precision) |
| 6878 | positivePrecision = int(positivePrecisionString) |
| 6879 | parsedPrecision = '1' |
| 6880 | for i in range(0, positivePrecision - 1): |
| 6881 | parsedPrecision = parsedPrecision + '0' |
| 6882 | return parsedPrecision + '0' |
| 6883 | |
| 6884 | def load_time_difference(self, params={}): |
| 6885 | serverTime = self.fetch_time(params) |
no test coverage detected