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

Method parse_conversion

python/ccxt/binance.py:13529–13616  ·  view source on GitHub ↗
(self, conversion: dict, fromCurrency: Currency = None, toCurrency: Currency = None)

Source from the content-addressed store, hash-verified

13527 return self.parse_conversions(rows, code, fromCurrencyKey, toCurrencyKey, since, limit)
13528
13529 def parse_conversion(self, conversion: dict, fromCurrency: Currency = None, toCurrency: Currency = None) -> Conversion:
13530 #
13531 # fetchConvertQuote
13532 #
13533 # {
13534 # "quoteId":"12415572564",
13535 # "ratio":"38163.7",
13536 # "inverseRatio":"0.0000262",
13537 # "validTimestamp":1623319461670,
13538 # "toAmount":"3816.37",
13539 # "fromAmount":"0.1"
13540 # }
13541 #
13542 # createConvertTrade
13543 #
13544 # {
13545 # "orderId":"933256278426274426",
13546 # "createTime":1623381330472,
13547 # "orderStatus":"PROCESS"
13548 # }
13549 #
13550 # createConvertTrade BUSD
13551 #
13552 # {
13553 # "tranId": 118263407119,
13554 # "status": "S"
13555 # }
13556 #
13557 # fetchConvertTrade, fetchConvertTradeHistory BUSD
13558 #
13559 # {
13560 # "tranId": 118263615991,
13561 # "type": 244,
13562 # "time": 1664442078000,
13563 # "deductedAsset": "BUSD",
13564 # "deductedAmount": "1",
13565 # "targetAsset": "USDC",
13566 # "targetAmount": "1",
13567 # "status": "S",
13568 # "accountType": "MAIN"
13569 # }
13570 #
13571 # fetchConvertTrade
13572 #
13573 # {
13574 # "orderId":933256278426274426,
13575 # "orderStatus":"SUCCESS",
13576 # "fromAsset":"BTC",
13577 # "fromAmount":"0.00054414",
13578 # "toAsset":"USDT",
13579 # "toAmount":"20",
13580 # "ratio":"36755",
13581 # "inverseRatio":"0.00002721",
13582 # "createTime":1623381330472
13583 # }
13584 #
13585 # fetchConvertTradeHistory
13586 #

Callers 3

fetch_convert_quoteMethod · 0.95
create_convert_tradeMethod · 0.95
fetch_convert_tradeMethod · 0.95

Calls 6

safe_integer_nMethod · 0.80
safe_string_2Method · 0.80
safe_string_nMethod · 0.80
safe_number_2Method · 0.80
safe_currency_codeMethod · 0.45
iso8601Method · 0.45

Tested by

no test coverage detected