Deposits
Deposits turn wallet cash tokens into mUSD (mUsdBalance). See getting-started/trader-questions.md for the API flow and the distinction between wallet balance and mUSD.
Deposits may complete instantly if the Cashier creditBuffer can cover the mUSD credit and the token withdrawal buffer has room. Otherwise they are queued for final cash settlement. See buffer-mechanism.md.
Pre-authorization
Deposits transfer cash tokens from the user wallet to Cashier through StockRouter. The user must approve StockRouter as the spender before deposit:
ERC20(tokenAddress).approve(stockRouter, rawTokenAmount)rawTokenAmount = tokenAmount × 10^tokenDecimals
Mainnet cash token and approval spender addresses
x-api-chain-id
Chain
Cash token
Approval spender (StockRouter)
8453
Base Mainnet
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
0x4f090d817fd83753988a7b0c1d76f170f8461be8
143
Monad Mainnet
0x754704Bc059F8C67012fEd69BC8A327a5aafb603
0x4f090d817fd83753988a7b0c1d76f170f8461be8
1
Ethereum Mainnet
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
0x4f090d817fd83753988a7b0c1d76f170f8461be8
Check allowance:
GET /api/v1/users/{userId}/balance?spenderAddress={spender}Use tokenBalances[].walletAllowance.
Insufficient allowance:
/cash/deposits/calldatastill returns calldata, but the on-chain tx will fail.
Approval owner:
/cash/deposits/send(One Click): API key bounduserAddress/cash/deposits/calldata(self-submit): transaction sender wallet
Build deposit calldata
userAddress
string
Yes
User wallet.
tokenAddress
string
Yes
Cash token address.
tokenAmount
string / number
Yes
Amount (human-readable).
Returns method: deposit, value: "0".
One Click deposit
tokenAddress
string
Yes
Cash token address.
tokenAmount
string / number
Yes
Deposit amount.
gasLimit
number
No
Optional gas limit.
Uses API key bound userAddress — not a request body field.
Record deposit tx
txHash
string
Yes
Deposit tx hash.
Query deposits
operationId is backfilled by the indexer after parsing chain events.
See operation-status.md for response fields.
Last updated

