Skip to content

Withdrawal Data Dictionary

About This Page

What: All code tables, database table structures, and field meanings related to withdrawals — pure reference type Audience: Product managers and operations staff who need to look up specific numbers/codes Prerequisites: None, refer anytime. For business explanations of rules see Withdrawal Rules ManualReading time: Reference type, search as needed Owner: Withdrawal Product Manager


Withdrawal Task Status Codes

Status CodeConstantMeaningDescription
0PENDINGPendingTask created, awaiting approval
1PROCESSINGProcessingApproval in progress (Audit / Confirm / Remittance)
2DONECompletedWithdrawal successful, funds remitted
3REJECTEDRejectedApproval not passed or risk control intercept
4WITHDRAWWithdrawnUser actively cancelled
5REVERSEReversedRemitted funds have been reversed

Withdrawal Action Codes

ActionMeaningDescription
NEXTSubmit to next stepApproval passed, advance to next step
REJECTEDRejectReject withdrawal application
CANCELUser cancelUser actively cancels withdrawal
REVERSEReversalReverse already remitted funds
FOLLOWFollow upMark as being followed up
CANCEL_FOLLOWCancel follow-upRemove follow-up mark
TRANSFERTransferTransfer task to another person for handling

Withdrawal Channel Codes

Channel KeyNameModeSupported Banks
auto_bsBSTBSTCMB, CMBC, Airstar
hsbcHSBC Online BankingOnline BankingHSBC
haseHang Seng Online BankingOnline BankingHang Seng
boc_fpsBOC FPSFPSBOC
cgb_fps_apiCGB FPSFPSCGB
scStandard CharteredFPSSCB
bocBOC Same-bankTraditionalBOC
manualICBC ManualTraditionalICBC Asia
chats_rtgsCHATS/RTGSTraditionalHK banks
tele_transferCross-border WireTraditionalBOC (cross-border)
ewbEWB WireTraditionalEWB
checkChequeTraditional

BST Authorization (Mandate) Status Codes

StatusMeaningDescription
CLOSENot authorizedInitial state or cancelled, cannot deposit/withdraw
PROCESSINGAuthorizingWaiting for bank processing, cannot deposit/withdraw
OPENAuthorizedCan deposit/withdraw normally
WAITINGAwaiting confirmationUser needs to confirm on bank side
FAILAuthorization failedBank rejected, need to re-initiate
CANCELCancelledUser or system cancelled

Authorization vs Agreement

CMB/CMBC use "BST agreement", Airstar uses "Mandate authorization". Different terminology, same business meaning. Status code differences see BST Overview.


Bank Callback Result Codes

CMB / CMBC BST Callback

Result CodeMeaningSystem Handling
0SuccessTask → DONE, notify user
-5TimeoutAutomatically switch to backup exit_server for retry
-6Bank rejectionMark as failed, requires manual handling

Airstar BST Status

Airstar uses polling mode, with independent status codes for deposits and withdrawals:

Deposit status:

StatusMeaning
NEWInstruction created
PENDINGBank processing
SUCCESSDeposit arrived
FAILEDFailed
REFUNDEDRefunded (Airstar exclusive)

Withdrawal status:

StatusMeaning
NEWInstruction created
PENDINGBank processing
SUCCESSWithdrawal complete
FAILEDFailed

Airstar Error Codes

140630xxx Series (Bank → moomoo)

Error CodeMeaningCommon Cause
14063001xAuthorization-related errorsMandate status abnormal, authorization expired
14063002xDeposit-related errorsAmount exceeds limit, account abnormal
14063003xWithdrawal-related errorsInsufficient balance, account frozen

140630xxx Series (Bank Error Codes, Detailed)

Error CodeMeaningDescription
140630001Parameter error, transfer failedRequest parameter error
140630002Agreement does not exist, transfer failedBST authorization does not exist
140630003Transfer amount exceeds remaining limitExceeds BST transfer quota
140630005Customer account balance insufficientBank account balance insufficient
140630007Customer account number errorBank account number incorrect
140630008Customer name errorName does not match bank records
140630009Customer status does not allow depositDeposit-specific
140630010Customer status does not allow withdrawalWithdrawal-specific
140630099System reason, transfer failedCatch-all error

140670xxx Series (Pre-check Error Codes)

Error CodeMeaningCheck Type
140670001Authorization expired, cannot deposit/withdrawAuthorization check
140670002Authorized bank card does not exist, cannot deposit/withdrawAuthorization check
140670003Risk control restriction, cannot deposit/withdrawRisk control check
140670004Account has outstanding debt, cannot withdrawNegative equity check
140670005Securities account balance insufficient, cannot withdrawRisk control check
140670006Dormant account, cannot depositAccount check
140670007Securities account does not exist/closed, cannot deposit/withdrawAccount check
140670008NSS questionnaire not completed, cannot withdrawAudit check
140670009GDCA not completed, cannot deposit/withdrawAudit check
140670010Online account opening new card binding, deposit amount cannot be less than 10000Audit check (deposit)
140670011Online account opening new card binding, deposit not yet exceeding 10000, cannot withdrawAudit check (withdrawal)
140670012Review rejected withdrawal requestBusiness rejection
140670099Other error, system abnormalCatch-all

140600xxx Series (Authorization Error Codes)

Error CodeMeaning
140600001Bank rejected authorization
140600002Mobile number does not match bank registration
140600003Account name does not match bank registration
140600004ID information does not match bank registration
140600005Bank account number error
140600099Bank rejected authorization (catch-all)

INFO

Complete BST bank-specific error code reference table see BST Overview § Error Codes.


Bank Channel Type Codes (TransType)

BST Channels

TransTypeCodeBankPurpose
101BST_CMBCCMBC BSTDeposit/Withdrawal
102BST_CMBCCHINACMB BSTDeposit/Withdrawal
304ASB_BSTAirstar BSTDeposit/Withdrawal

Bank Direct Connect Channels

TransTypeCodeBankPurpose
201HANGSENGHang Seng BankDeposit
202ICBCASIAICBC AsiaDeposit
203BANKCOMMBank of CommunicationsDeposit
204CMBCCMBC BankDeposit
205CMBCCHINACMB BankDeposit
207VELOVelo Bank (sub-account)Deposit
209ANZANZ BankDeposit
220SGICBC_SUBACCSingapore ICBC (sub-account)Deposit
301BOCBOC B2EDeposit
302HASE_EDDIHang Seng eDDA/eDDI (deposit direct debit)Deposit only
303HSBC_EDDIHSBC eDDA/eDDI (deposit direct debit)Deposit only

SBA Procedure Status Codes

Main Status

StatusMeaningIs Terminal
newNewly createdNo
pendingDeduction complete, awaiting/executing transferNo
end_okWithdrawal successfulYes
end_rejectWithdrawal rejectedYes
end_cancelWithdrawal cancelledYes
end_reverseWithdrawal reversedYes

Sub-status (ext_status)

Main StatusSub-statusMeaningUser-Visible Status
newfreezeAwaiting freezeProcessing
new(empty)Awaiting deductionProcessing
newwaitingCancellableProcessing (cancellable)
newmanual_confirmPending manual confirmationProcessing
newconfirmedConfirmedProcessing
pendingdeduct_doneDeduction completeProcessing
pendingtransfer_autoAuto transfer in progress (BST)Processing
pendingtransfer_manualAwaiting manual transferProcessing
pendingtransfer_doneTransfer completeProcessing
pendingtransfer_rejectTransfer rejectedProcessing
pendingunfreezeUnfreezingProcessing
pendingmove_nextDeferred to next trading dayProcessing
pendingwaiting_tradeWaiting for trading dayProcessing
end_oktransfer_doneFinal successCompleted

Core Field Descriptions

Withdrawal Task Fields (Task)

FieldBusiness Meaning
tidWithdrawal task ID (unique identifier)
uidUser ID (moomoo account number)
amountWithdrawal amount
currencyCurrency: HKD / USD / CNH / JPY / SGD
methodWithdrawal channel key, may be null (requires manual selection)
statusTask status (0~5)
sub_statusSub-status — channel-specific subprocess status
templateApproval template key
stepCurrent approval step (audit / confirm / remittance)
procedure_idSBA Procedure ID
bank_card_idUser bank card ID
bank_idBank ID (BST bank identification)
import_bank_idReceiving bank ID (user side)
export_bank_idPaying bank ID (company side)
feeWithdrawal fee (currently all 0)
real_amountActual arrived amount
high_riskHigh-risk bitmask value

Approval Flow Fields (Flow)

FieldBusiness Meaning
task_idAssociated withdrawal task ID
stepApproval step
actionAction (NEXT / REJECTED / CANCEL etc.)
operator_idOperator ID (0 = system automatic)
operator_nameOperator name
remarkRemarks
create_timeOperation time

Database Table Overview

The withdrawal system has 10 core tables:

Main Tables

Table NamePurposeKey Fields
tasksWithdrawal task main tabletid, uid, status, method, template, step, procedure_id, amount, currency
task_logStatus change logtid, old_status, new_status, operator, time
flowsApproval operation flowtask_id, step, action, operator_id, remark
sba_listTask-SBA associationtid, procedure_id, request_id, sba_status, ext_status

Queue Tables

Table NamePurposeKey Fields
queueAsync event queueevent, tid, start_time, processing, retry_times, lock

Bank Tables

Table NamePurposeKey Fields
cmb_listCMB bank-side withdrawal recordsserial_id, uid, amount, currency, status(0-3), tid
ms_listCMBC bank-side withdrawal recordsref_no, sec_ac(uid), amt, ccy, status(0-3), tid
task_cgb_fpsCGB FPS withdrawal statustid, api_status, batch_no, trace_no, error_code

Configuration and Auxiliary Tables

Table NamePurposeKey Fields
auto_settingsBST auto-withdrawal configurationid(bank), {hk/us/cn}_status, amount, max_amount, alarm_amount, stop_amount
bank_card_statusBank card currency availability statusbank_card_id, hkd_status, usd_status, cnh_status
check_extraCheque withdrawal extra infotid, check_id, check_date, print_status
nick_listUser Chinese/English name cacheuid, nick_cn, nick_en (for CHATS/RTGS)
If requirements change: Adding new withdrawal channel tables

Reference the task_cgb_fps pattern: Create an independent status tracking table for each channel with API integration. Must include at minimum tid, api_status, error_code, trace_no.


I want to...Go to
See why a specific rule exists and whether it can be changedWithdrawal Rules Manual
Understand how a withdrawal flows end-to-endWithdrawal Lifecycle
See a specific channel's technical execution detailsChannel Execution Manual
Troubleshoot a withdrawal issue by symptomWithdrawal Troubleshooting
Look up more terms and abbreviationsGlossary
Was this page helpful?

内部业务文档 · 仅限 moomoo 团队使用