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

Method parseTransfer

js/src/cex.js:1640–1676  ·  view source on GitHub ↗
(transfer, currency = undefined)

Source from the content-addressed store, hash-verified

1638 return this.parseTransfer(data, currency);
1639 }
1640 parseTransfer(transfer, currency = undefined) {
1641 //
1642 // transferBetweenSubAccounts
1643 //
1644 // {
1645 // "ok": "ok",
1646 // "data": {
1647 // "transactionId": "30225415"
1648 // }
1649 // }
1650 //
1651 // transfer between main/sub
1652 //
1653 // {
1654 // "ok": "ok",
1655 // "data": {
1656 // "accountId": "sub1",
1657 // "clientTxId": "27ba8284-67cf-4386-9ec7-80b3871abd45",
1658 // "currency": "USDT",
1659 // "status": "approved"
1660 // }
1661 // }
1662 //
1663 const currencyId = this.safeString(transfer, 'currency');
1664 const currencyCode = this.safeCurrencyCode(currencyId, currency);
1665 return {
1666 'info': transfer,
1667 'id': this.safeString2(transfer, 'transactionId', 'clientTxId'),
1668 'timestamp': undefined,
1669 'datetime': undefined,
1670 'currency': currencyCode,
1671 'amount': undefined,
1672 'fromAccount': undefined,
1673 'toAccount': undefined,
1674 'status': this.parseTransactionStatus(this.safeString(transfer, 'status')),
1675 };
1676 }
1677 /**
1678 * @method
1679 * @name cex#fetchDepositAddress

Calls 4

safeStringMethod · 0.45
safeCurrencyCodeMethod · 0.45
safeString2Method · 0.45

Tested by

no test coverage detected