For the complete documentation index, see llms.txt. This page is also available as Markdown.

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/calldata still returns calldata, but the on-chain tx will fail.

Approval owner:

  • /cash/deposits/send (One Click): API key bound userAddress

  • /cash/deposits/calldata (self-submit): transaction sender wallet

Build deposit calldata

Field
Type
Required
Description

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

Field
Type
Required
Description

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

Field
Type
Required
Description

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