(self, conversion: dict, fromCurrency: Currency = None, toCurrency: Currency = None)
| 8947 | return self.parse_conversions(dataList, code, 'fromCoin', 'toCoin', since, limit) |
| 8948 | |
| 8949 | def parse_conversion(self, conversion: dict, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion: |
| 8950 | # |
| 8951 | # fetchConvertQuote |
| 8952 | # |
| 8953 | # { |
| 8954 | # "quoteTxId": "1010020692439481682687668224", |
| 8955 | # "exchangeRate": "0.000015330836780000", |
| 8956 | # "fromCoin": "USDT", |
| 8957 | # "fromCoinType": "crypto", |
| 8958 | # "toCoin": "BTC", |
| 8959 | # "toCoinType": "crypto", |
| 8960 | # "fromAmount": "10", |
| 8961 | # "toAmount": "0.000153308367800000", |
| 8962 | # "expiredTime": "1727257413353", |
| 8963 | # "requestId": "" |
| 8964 | # } |
| 8965 | # |
| 8966 | # createConvertTrade |
| 8967 | # |
| 8968 | # { |
| 8969 | # "exchangeStatus": "processing", |
| 8970 | # "quoteTxId": "1010020692439483803499737088" |
| 8971 | # } |
| 8972 | # |
| 8973 | # fetchConvertTrade, fetchConvertTradeHistory |
| 8974 | # |
| 8975 | # { |
| 8976 | # "accountType": "eb_convert_uta", |
| 8977 | # "exchangeTxId": "1010020692439483803499737088", |
| 8978 | # "userId": "100406395", |
| 8979 | # "fromCoin": "USDT", |
| 8980 | # "fromCoinType": "crypto", |
| 8981 | # "fromAmount": "10", |
| 8982 | # "toCoin": "BTC", |
| 8983 | # "toCoinType": "crypto", |
| 8984 | # "toAmount": "0.00015344889", |
| 8985 | # "exchangeStatus": "success", |
| 8986 | # "extInfo": {}, |
| 8987 | # "convertRate": "0.000015344889", |
| 8988 | # "createdAt": "1727257904726" |
| 8989 | # } |
| 8990 | # |
| 8991 | timestamp = self.safe_integer_2(conversion, 'expiredTime', 'createdAt') |
| 8992 | fromCoin = self.safe_string(conversion, 'fromCoin') |
| 8993 | fromCode = self.safe_currency_code(fromCoin, fromCurrency) |
| 8994 | to = self.safe_string(conversion, 'toCoin') |
| 8995 | toCode = self.safe_currency_code(to, toCurrency) |
| 8996 | return { |
| 8997 | 'info': conversion, |
| 8998 | 'timestamp': timestamp, |
| 8999 | 'datetime': self.iso8601(timestamp), |
| 9000 | 'id': self.safe_string_2(conversion, 'quoteTxId', 'exchangeTxId'), |
| 9001 | 'fromCurrency': fromCode, |
| 9002 | 'fromAmount': self.safe_number(conversion, 'fromAmount'), |
| 9003 | 'toCurrency': toCode, |
| 9004 | 'toAmount': self.safe_number(conversion, 'toAmount'), |
| 9005 | 'price': None, |
| 9006 | 'fee': None, |
no test coverage detected