> For the complete documentation index, see [llms.txt](https://docs.synfutures.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.synfutures.com/rwa-trading-apis/cash-operations/deposits.md).

# Deposits

Deposits turn wallet cash tokens into `mUSD` (`mUsdBalance`). See [getting-started/trader-questions.md](/rwa-trading-apis/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](/rwa-trading-apis/cash-operations/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

```
POST /api/v1/cash/deposits/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

```
POST /api/v1/cash/deposits/send
```

| 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

```
POST /api/v1/cash/deposits/tx
```

| Field    | Type   | Required | Description      |
| -------- | ------ | -------- | ---------------- |
| `txHash` | string | Yes      | Deposit tx hash. |

## Query deposits

```
GET /api/v1/cash/deposits?page=1&limit=10
GET /api/v1/cash/deposits/{operationId}
```

`operationId` is backfilled by the indexer after parsing chain events.

See [operation-status.md](/rwa-trading-apis/cash-operations/operation-status.md) for response fields.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.synfutures.com/rwa-trading-apis/cash-operations/deposits.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
