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

Method parseTransactionStatusByType

ts/src/binance.ts:8741–8779  ·  view source on GitHub ↗
(status, type = undefined)

Source from the content-addressed store, hash-verified

8739 }
8740
8741 parseTransactionStatusByType (status, type = undefined) {
8742 if (type === undefined) {
8743 return status;
8744 }
8745 const statusesByType: Dict = {
8746 'deposit': {
8747 '0': 'pending',
8748 '1': 'ok',
8749 '6': 'ok',
8750 // Fiat
8751 // Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial credit Stopped
8752 'Processing': 'pending',
8753 'Failed': 'failed',
8754 'Successful': 'ok',
8755 'Refunding': 'canceled',
8756 'Refunded': 'canceled',
8757 'Refund Failed': 'failed',
8758 },
8759 'withdrawal': {
8760 '0': 'pending', // Email Sent
8761 '1': 'canceled', // Cancelled (different from 1 = ok in deposits)
8762 '2': 'pending', // Awaiting Approval
8763 '3': 'failed', // Rejected
8764 '4': 'pending', // Processing
8765 '5': 'failed', // Failure
8766 '6': 'ok', // Completed
8767 // Fiat
8768 // Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial credit Stopped
8769 'Processing': 'pending',
8770 'Failed': 'failed',
8771 'Successful': 'ok',
8772 'Refunding': 'canceled',
8773 'Refunded': 'canceled',
8774 'Refund Failed': 'failed',
8775 },
8776 };
8777 const statuses = this.safeDict (statusesByType, type, {});
8778 return this.safeString (statuses, status, status);
8779 }
8780
8781 parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {
8782 //

Callers 1

parseTransactionMethod · 0.95

Calls 2

safeDictMethod · 0.45
safeStringMethod · 0.45

Tested by

no test coverage detected