Skip to content

Deposit Quick Reference

About This Page

What: All deposit-related reference data — status codes, limits, tolerances, processing times, field definitions. This page is the single source of truth; other pages reference rather than duplicate Audience: Product managers and operations staff who need to look up specific numbers/codes Prerequisites: None, consult anytime Reading time: Reference type, search as needed Owner: Deposit Product Manager


Quick Navigation — What you might want to do:

Deposit Status Codes

Apply Status

Status CodeMeaningDescription
0PendingUser has submitted, waiting for bank statement arrival and matching
1ProcessingMatched/debit confirmed, SBA crediting in progress
2CompletedDeposit successful, funds have reached securities account
3RejectedTimeout rejection or operations rejection
4WithdrawnUser cancelled proactively
5ReversedCredited funds have been withdrawn

Flow Status

Status CodeMeaningDescription
0PendingBank statement just arrived, waiting for matching
1ProcessedMatched and deposit completed
2ErrorProcessing failed, manual intervention required
3LockedOperations locked for investigation
4In-transitFunds in transit, unconfirmed
9DeletedMarked as invalid

Match Result Codes

Result CodeMeaningNext Step
0No matchSkip, wait for next round
1Assisted matchWritten to match table, awaiting operations confirmation
2Full matchEnters auto-credit decision

Currency & Auto-Credit Limits

CurrencyCodeSingle Auto-Credit LimitDaily Auto Count Limit
HKD (Hong Kong Dollar)12,000,00010 per user
USD (US Dollar)2300,00010 per user
CNH (Offshore RMB)32,000,00010 per user
JPY (Japanese Yen)440,000,00010 per user
SGD (Singapore Dollar)5350,00010 per user

Boundary Note: Limits are assessed per transaction (not cumulative), using closed intervals (<=), meaning amounts exactly equal to the limit can still be auto-credited. Exceeding the limit doesn't fail — it just cannot be auto-credited and requires operations manual confirmation. The daily 10-transaction limit is calculated per calendar day (00:00~24:00 HKT), regardless of trading days.

Why These Limits?

CurrencyLimitDesign Rationale
HKD 2 millionCovers 99%+ of normal deposits. Deposits exceeding 2 million are extremely rare, and the larger the amount, the greater the risk and impact of mismatching
USD 300KApproximately equal to HKD 2 million (at ~6.5 exchange rate), maintaining equivalent limits across currencies
CNH 2 millionSet equal to HKD
JPY 40 millionApproximately equal to HKD 2 million (at ~0.05 exchange rate)
SGD 350KApproximately equal to HKD 2 million (at ~5.7 exchange rate)
Daily 10 transactionsNormal users rarely deposit more than 3 times a day. 10 provides ample margin while preventing abnormal batch deposits
If Change Needed: Modify Auto-Credit Limits

Code location: deposit/src/app/Business/Match/MatchBase.php (approximately lines 38-44)

MAX_AUTO_DEPOSIT_AMOUNT_HKD = 2000000
MAX_AUTO_DEPOSIT_AMOUNT_USD = 300000
MAX_AUTO_DEPOSIT_AMOUNT_CNH = 2000000
MAX_AUTO_DEPOSIT_AMOUNT_JPY = 40000000
MAX_AUTO_DEPOSIT_AMOUNT_SGD = 350000
MAX_AUTO_DEPOSIT_COUNT = 10  // Daily per-user limit

Common change scenarios:

  • Raise/lower a currency's limit -> Modify the corresponding constant value. Note: this affects auto-credit decisions for all banks
  • Adjust daily count limit -> Modify MAX_AUTO_DEPOSIT_COUNT
  • Use different limits for a specific bank -> Need to override the limit check logic in that bank's Match class (currently all banks share the same limits)

Matching Tolerance Rules

Standard Tolerance

Formula: Apply.amount - tolerance <= Flow.amount <= Apply.amount (statement amount can be at most "tolerance" less than application, closed interval)

ScenarioCurrencyTolerance
Local transferHKD / CNH / JPY0 ~ 20
Local transferUSD / SGD0 ~ 3
Cross-region/Cross-bankHKD / CNH / JPY0 ~ 420
Cross-region/Cross-bankUSD / SGD0 ~ 60

Boundary Note: When the difference is exactly equal to the tolerance value, it still counts as a match. Example: HKD local tolerance 20: application 50,000, statement 49,980 -> match successful. Cross-region tolerance is larger because intermediary bank fees are unpredictable.

Bank-Specific Tolerances

Different banks have their own tolerance standards. "Auto-credit tolerance" is used for fully automatic crediting decisions; "assisted match tolerance" is used to generate candidate match pairs for manual confirmation — the latter is more lenient.

BankCurrencyAuto-Credit ToleranceAssisted Match Tolerance
BOCHKHKD0~200~20
BOCHKUSD0~30~3
HSBCHKD0~650~420
HSBCUSD0~140~60
ICBC AsiaHKD0~200~20
ICBC AsiaUSD0~550~55
DBSHKD0~3500~350
DBSUSD0~500~50
EWBHKD0~420
EWBUSD0~60
EWB Sub-accountAll currencies0~400~100
ZA Sub-accountHKD0~3500~350
ZA Sub-accountUSD0~500~50
Singapore ICBCHKD0~5000~500
Singapore ICBCUSD0~700~70

Matching Time Windows

Statement TypeMatching WindowApplicable Banks/Scenarios
Standard statementStatement date -3 days ~ +2 daysMost banks' regular statements
BOCHK statementStatement date -3 days ~ +4 daysBOCHK B2E (greater statement delay)
Real-time statementStatement arrival time ~ +2 daysMT910, BST and other real-time pushes
Real-time FPSStatement arrival time -1 hour ~ +2 daysFPS (allows statement slightly earlier than application)
Non-real-time statementStatement date -3 days ~ +2 daysBatch-imported historical statements

Boundary Note: "Days" in time windows are calculated as calendar days (not trading days). "-3 days" means application date - 3 x 24 hours, precise to the second. "Statement date" uses arrival timestamp (precise to the second) for real-time statements, and transaction date (precise to day, using 00:00:00) for batch statements.

Why Different Statement Types Use Different Windows?

WindowDesign Rationale
Standard -3/+2 daysUser may apply first then transfer (apply up to 3 days early), or transfer first then apply (apply up to 2 days late). Covers the vast majority of normal operation sequences
BOCHK +4 daysB2E pulls only 3 times daily + 2-hour format conversion; statements may enter the system 1~2 days after the transaction, hence an additional 2-day extension
FPS -1 hourFPS arrives in seconds, but user may transfer first then apply (bank statement arrives seconds to tens of seconds before application). -1 hour covers this "transfer before apply" scenario
Real-time +2 daysReal-time statements are precise to the second, using more precise time comparison rather than day-level comparison, reducing mismatching risk for same-amount same-user multiple deposits

Timeout and Auto-Rejection Configuration

After application timeout, the system automatically handles in two phases: first notification (reminder to upload proof), then rejection. Days are calculated in HKEX trading days.

BankDeposit MethodNotification DaysRejection Days (after notification)
ICBC/Hang Seng/BOCHKFPS11
ICBC/Hang Seng/BOCHKOnline banking same-bank11
ICBC/Hang Seng/BOCHKOnline banking cross-bank (HKD)21
ICBC/Hang Seng/BOCHKOnline banking cross-bank (USD/CNH)41
ICBC/Hang Seng/BOCHKATM21
ICBC/Hang Seng/BOCHKCheque21
HSBCOnline banking same-bank11
HSBCOnline banking cross-bank41
EWBAll methods41
ZA Sub-accountAll methodsNo notification10

Proof supplement timeout: If proof supplement required and not provided within 20 trading days -> Auto-rejection. If proof provided but no statement within 10 trading days -> Auto-rejection.

Boundary Note: "Days" in the timeout table are calculated in HKEX trading days (excluding weekends and Hong Kong public holidays). Proof supplement timeout is calculated in trading days. The two standards differ — deposit timeout uses trading days because banks only process transfers on trading days.

If Change Needed: Adjust Timeout Rejection Days

Code location: deposit/src/app/Business/AutoNoticeReject.php (approximately lines 371-424)

Timeout notification and rejection days are configured by bank and deposit method through the getConfig() method, returning a structure of:

[
    'notice_day' => notification days,    // Trading days after application creation to send notification
    'reject_day' => rejection days,       // Trading days after notification sent to auto-reject
]

Common change scenarios:

  • Adjust notification days for a specific bank/method -> Modify the notice_day value in the corresponding branch of getConfig()
  • Adjust proof supplement timeout -> Search for supplement related constants (current: not provided=20 days, provided but no statement=10 days)
  • Add timeout configuration for a new bank -> Add a new conditional branch in getConfig()
  • Disable auto-notification for a bank (like ZA sub-account mode) -> Set notice_day to null or a special marker

Notes:

  • Days are calculated in HKEX trading days (excluding weekends and public holidays); trading calendar maintained in deposit/config/ directory
  • Modifying notification days affects the timing of push messages sent to users
  • After rejection, the system automatically sends a rejection notification to the user (rejection reason code=9 timeout)

Auto-Processing Hours

MethodOperating HoursSuspension Period
BST Bank-SecuritiesMonday 08:00 ~ Friday 16:00
eDDA (HSBC/Hang Seng)Monday 07:00 ~ Saturday 10:00
Airstar BSTWorking day business hours
FPSSimilar to BST
Matching engine7x24 (every 3 minutes)Auto-credit subject to above hour restrictions

Daily 16:00~16:10 is the account reconciliation suspension period; all auto-deposit processing is paused.

Auto-Credit Processing Hours (by Currency)

Different currencies have different auto-credit start times — USD starts 2 hours later than other currencies to avoid USD settlement period interference:

CurrencyStart TimeEnd TimeSaturdayDescription
HKD07:00Next day 04:00Closes at 09:55Covers full HK stock trading day
USD09:01Next day 04:00Closes at 09:55Later than HKD, avoids USD settlement interference
CNH07:00Next day 04:00Closes at 09:55Same as HKD
JPY07:00Next day 04:00Closes at 09:55Same as HKD
SGD07:00Next day 04:00Closes at 09:55Same as HKD

Statements outside processing hours are still matched by the matching engine but won't trigger auto-credit — downgraded to assisted match awaiting operations confirmation.

Configuration location: deposit/src/app/Business/DepositConfigNew.php (USD special start time approximately line 440, Saturday close approximately line 498)

2412 Suspension Windows (applies to all auto-credits):

Suspension PeriodReasonImpact Scope
08:55 ~ 09:00Pre-market reconciliationAll auto-credits suspended
16:05 ~ 16:10Post-market reconciliationAll auto-credits suspended

Configuration location: deposit/src/app/Business/DepositConfigNew.php:603-641

eDDA Bank Maintenance Windows:

BankMaintenance PeriodImpact
Hang SengSunday 00:00 ~ 08:30Does not accept eDDI requests
HSBCSunday 00:00 ~ 12:00Does not accept eDDI requests

eDDI instructions submitted during maintenance windows enter Blank status and auto-activate in the next working period. See eDDA Direct Debit Deposit - Processing Hours & Maintenance Windows.


Processing Time Reference

MethodFastestTypicalSlowest
eDDAMinutes~5 minutesHours (bank-side delay)
BST Bank-Securities~10 minutes~10 minutesNext trading day (non-business hours)
Airstar BST~10 minutes~10 minutesNext trading day
FPS3 minutes3~5 minutesNext matching cycle
Online banking same-bank2 hours2 hoursSame day
Online banking cross-bank2 days2~3 days4 days (foreign currency)
ATM/Counter2 hours2 hoursNext trading day 11:00
Bill payment2 hours2 hoursNext trading day
Cheque2 days2~3 days3 days
Overseas remittance3 days5 days5+ days

Bank Statement Arrival Times

Complete comparison of each bank's statement collection method, protocol, arrival time and collection service -> Bank Statement Collection - Summary Comparison Table


Rejection Reason Codes

CodeMeaningTypical Scenario
1Unclear informationProof/information is illegible
2Online banking information missingOnline banking transfer missing required information
3ATM information missingATM proof missing required information
4Bank account information missingMissing bank account information
5Securities account abnormalUser's account status has issues
6Transaction cancelledBank cancelled the transaction
7Application mergedMultiple applications processed together
8Duplicate applicationSystem detected duplicate deposit
9TimeoutFunds not received for extended period
10Other (HK region)Hong Kong region other reasons
11Other (Mainland)Mainland region other reasons
12Other (Overseas)Overseas region other reasons
14Account mismatchTransferor doesn't match applicant
15Insufficient transfer informationTransfer proof information incomplete

Deposit Method Codes

CodeKeyNameMode
1bstBST Bank-Securities TransferDirect
2atmATM/CounterPush
3fpsFPSPush
4bpBill PaymentPush
5ebankOnline Banking TransferPush
6checkChequePush
7subAccountOverseas RemittancePush
8eddaeDDA Hang SengPull
9eddaHSBCeDDA HSBCPull
10bstAsbAirstar BSTDirect

Deposit Type

CodeTypeDescription
1NORMALStandard flow — auto-credit after statement matching
2PRE_APPROVALPre-approval — used for online account opening scenarios
3ABNORMALAbnormal mode — manually created by operations in the statement system
4TRANS_AUTOAuto-approval — auto-approved after frontend precise matching
5HIGH_RISKHigh risk — hit risk control rules, requires manual review
11NORMAL_HOLDHold mode — freeze first then credit
21STOCK_HOLDStock DCA hold mode — eDDI deposit then freeze, reserved for stock DCA deduction
31FUND_PURCHASE_HOLDFund purchase hold mode — eDDI deposit then freeze, reserved for fund purchase

HOLD Type Note: Codes 11/21/31 are collectively called HOLD types (HOLD_LIST = [11, 21, 31]). Deposits of these types have funds frozen by the system after crediting, reserved for corresponding investment operations. Freeze release timing is controlled by the investment-side system, not under the deposit system's jurisdiction.

Configuration location: deposit/src/app/Common/EddiDepositType.php


Notification Types

CodeTypeTrigger Scenario
1Standard deposit notificationDeposit completed
2Online account opening card binding notificationOnline account opening first deposit card binding success
3Post-card-binding deposit notificationOnline account opening post-card-binding deposit completed
4Mainland pre-account-opening notificationMainland pre-account-opening deposit credited

Core Field Descriptions

Apply Key Fields

FieldBusiness Meaning
uidUser ID (moomoo number), determines which shard table the application is stored in
amountUser's applied deposit amount
real_amountActual credited amount, may be less than applied amount due to fees
currencyCurrency: HKD / USD / CNH
deposit_methodDeposit method code (see table above)
statusApplication status (0~5, see table above)
export_bank_idPaying bank ID (user side)
import_bank_idReceiving bank ID (company side)
bank_card_numberUser's bank account number, used by matching engine for card number comparison
areaPaying bank region: HK / CN / OS
notice_typeNotification type (1~4, see table above)
deal_typeProcessing method: bst (bank-securities) / eddi (eDDA/eDDI direct debit) / auto (script automatic) / manual (manual)
supplement_statusProof supplement status: 0=not required / 1=pending supplement / 2=supplemented
reject_reasonRejection reason (see rejection reason code table)
expected_timeExpected completion time
founderCreator ID, 0=user-initiated, >0=operations-created

Flow Key Fields

FieldBusiness Meaning
trans_typeBank/transaction type code, determines which shard table the statement is stored in
amountActual credited amount
currencyCurrency
en_nameRemitter English name, used by matching engine for name comparison
cn_nameRemitter Chinese name
customer_accountRemitter bank account number, used by matching engine for card number comparison
dateArrival date (YYYYMMDD), used by matching engine for date comparison
typeTransfer type (counter/online banking/FPS etc.)
statusStatement processing status (0~9, see table above)
uidMatched user ID, initially 0
apply_idMatched application ID, initially 0
abnormalAbnormal flag: 0=normal / 1=abnormal statement

Match Key Fields

FieldBusiness Meaning
flow_idAssociated statement ID
apply_idAssociated application ID
uidUser ID
statusMatch status: 0=pending confirmation / 1=confirmed / 2=ignored

The match table is a temporary table — after match confirmation or crediting completion, records are cleaned up to maintain table size.


Database Sharding Strategy

Core tables in the deposit system are sharded by the following rules:

TableSharding RuleShard KeyExample
applysuid % 100User IDapplys_42 = users whose uid ends in 42
flows{trans_type}_{YYYYMM}Bank type + monthflows_218_202604 = April 2026 HSBC statements
tasks(id / 1000) % 100Task IDtasks_05
setup_eddisNot shardedFull storage
hsbc_eddis / hs_eddisNot shardedFull storage
matchesNot sharded (temporary table)Periodically cleaned after matching completion
Configuration Location
  • Apply sharding logic: deposit/src/app/Business/Apply.phptable() method
  • Flow sharding logic: deposit/src/app/Business/Flow.php:80CREATE_WHEN_TABLE_NOT_FOUND configuration

Scheduled Task Quick Reference

All deposit-related Cron tasks summary:

Task NameFrequencyBankRelated Page
match:ccbasiaEvery 3 minutesCCB AsiaMatching Engine
match:ewbEvery 3 minutesEWBMatching Engine
match:bocEvery 3 minutesBOCHKMatching Engine
match:hangsengEvery 3 minutesHang SengMatching Engine
match:hsbcEvery 3 minutesHSBCMatching Engine
match:main icbc-newEvery 3 minutesICBCMatching Engine
match:main za-sub-accountEvery 3 minutesZAMatching Engine
Task NameFrequencyResponsibilityRelated Page
monitor:flow-monitorEvery 30 minutesStatement backlog alertDeposit Troubleshooting
abnormal-deposit:searchEvery 30 minutesOrphan statement scanningDeposit Troubleshooting
abnormal-deposit:update-statusEvery 3 minutesAbnormal deposit status updateDeposit Troubleshooting
Task NameFrequencyResponsibilityRelated Page
bank_reconciliation:generate16:15 dailyDaily reconciliation report
bank_reconciliation:generate --date=yesterday USD09:05 dailyPrevious day USD reconciliation
crmbos_reconciliation:generateHourlyCRM-BOS inter-system reconciliation
Configuration Location

All Cron definitions: deposit/doc/crontab.sh


Bank Channel Type Codes (TransType)

CodeBankType
101MSB BSTBST
102CMB BSTBST
201Hang Seng BankDirect
202ICBC AsiaDirect
204MSBDirect
205CMBDirect
203Bank of Communications BANKCOMMDirect
206CCB AsiaDirect
207VELO BankDirect
208DBSDirect
209ANZ BankDirect
217EWB Sub-accountDirect
218HSBC MT910Direct
219SCB Sub-accountDirect
220Singapore ICBC Sub-account SGICBC_SUBACCDirect
221ZA BankDirect
301BOCHK B2EDirect
302Hang Seng eDDA/eDDI (deposit direct debit)eDDA
303HSBC eDDA/eDDI (deposit direct debit)eDDA
304Airstar BSTBST
401DWOLLAUS stock Dwolla deposit
501US_IPOUS stock IPO fund return
502INC_FT_TRANSINC Futu fund inter-transfer

Note: eDDA (authorization) and eDDI (debit instruction) are both deposit protocols, not involving withdrawals. Hang Seng/HSBC withdrawal channels use corporate online banking transfers.


Refund & Reversal Reference Data

Data ObjectFieldReversal-Related ValueMeaning
Applystatus5Reversed — credited funds have been withdrawn
TaskstatusREVERSETask has been reversed
Flowresult3 (RESULT_REFUND)Statement marked as refund (does not affect securities account)

Reversal API Endpoints

APIMethodPurposePermission
/deposit/reversePOSTSingle deposit task reversalCASH_IN_TASK_REVERSE
/deposit/batch (action=reverse)POSTBatch deposit task reversalCASH_IN_TASK_REVERSE
/flow/refundPOSTSingle statement refund markingCASH_IN_FLOW_HANDLE
/flow/refund-batchPOSTBatch statement refund markingCASH_IN_FLOW_HANDLE
/flow/unlock (is_refund=1)POSTUnlock statement and mark refundCASH_IN_FLOW_HANDLE

Reversal Preconditions Quick Reference

OperationPrecondition StatusPermissionOther Requirements
Task reversalApply.status = 2 (completed)CASH_IN_TASK_REVERSESecurities account balance >= reversal amount
Flow refundFlow.status = 0 (pending)CASH_IN_FLOW_HANDLENone
Unlock refundFlow.status = 3 (locked)CASH_IN_FLOW_HANDLENone
Reversal-Related Code Locations
  • Task reversal entry: deposit/src/app/Business/Deposit.php:877-935reverse()
  • SBA reverse orchestration: deposit/src/app/Business/SOA/SBA/Deposit.php:309turnAround('CashDepositReverse')
  • Reversal middleware: deposit/src/app/Business/Tasks/Deposit.php:276-287reverseMiddleware()
  • Flow refund: deposit/src/app/Business/BankFlow.php:674-724refund()
  • Unlock refund: deposit/src/app/Business/BankFlow.php:1639-1695unlock()
  • Apply status constant: deposit/src/app/Business/Apply.phpSTATUS_REVERSE = 5
  • Task status constant: deposit/src/app/Classes/Task/Status.phpREVERSE = 5
  • Flow result constant: deposit/src/app/Business/BankFlow.phpRESULT_REFUND = 3

Complete refund mechanism description -> Refund & Reversal Operations procedure -> Reversal/Refund Guide


After Reading

I want to...Go to
Understand a rule's business meaningMatching & Auto-Credit
See eDDA authorization/debit error codeseDDA Direct Debit Deposit
Troubleshoot deposit issues by symptomDeposit Troubleshooting
Push deposit parameter changesDeposit Change Guide
Look up more terms and abbreviationsGlossary
Understand refund and reversal mechanismsRefund & Reversal
Was this page helpful?

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