> 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/portfolio/overview.md).

# Holdings & Positions

Use these endpoints to monitor a user's `mUSD`, wallet token balances, and `exchangeBalance`.

`userId` is currently the user's wallet address (trimmed, lowercased).

For API-level interpretation of `mUsdBalance`, `walletBalance`, and `exchangeBalance`, read [getting-started/trader-questions.md](/rwa-trading-apis/getting-started/trader-questions.md).

## Endpoints

| Method | Path                               | Description             |
| ------ | ---------------------------------- | ----------------------- |
| `GET`  | `/api/v1/users/{userId}`           | User info               |
| `GET`  | `/api/v1/users/{userId}/balance`   | Cash and token balances |
| `GET`  | `/api/v1/users/{userId}/positions` | Stock positions         |

## Query user info

```
GET /api/v1/users/{userId}
```

Response `data`:

| Field         | Type   | Description               |
| ------------- | ------ | ------------------------- |
| `userId`      | string | User ID (wallet address). |
| `userAddress` | string | Wallet address.           |

## Query balances

```
GET /api/v1/users/{userId}/balance
```

| Parameter        | Type   | Required | Default       | Description                  |
| ---------------- | ------ | -------- | ------------- | ---------------------------- |
| `spenderAddress` | string | No       | `0x000...000` | Spender for allowance query. |

Response `data`:

| Field           | Type   | Description   |
| --------------- | ------ | ------------- |
| `chainId`       | number | Chain ID.     |
| `productType`   | string | Product type. |
| `address`       | string | User wallet.  |
| `mUsdBalance`   | string | `mUSD`.       |
| `tokenBalances` | array  | Token list.   |

### tokenBalances item

| Field             | Type          | Description                                            |
| ----------------- | ------------- | ------------------------------------------------------ |
| `address`         | string        | Token address.                                         |
| `name`            | string        | Token name.                                            |
| `symbol`          | string        | Token symbol.                                          |
| `stockSymbol`     | string / null | Stock symbol (stock tokens).                           |
| `isStock`         | boolean       | Stock token flag.                                      |
| `decimals`        | number        | Decimals.                                              |
| `price`           | number / null | Price (stock tokens).                                  |
| `walletBalance`   | string        | Wallet balance (human-readable).                       |
| `walletAllowance` | string        | Allowance to spender.                                  |
| `exchangeBalance` | string        | API view of `Stock.stockBalance`; used by plain sells. |
| `logoUrl`         | string        | Logo URL.                                              |

## Query positions

```
GET /api/v1/users/{userId}/positions
```

Same query parameters as `/balance`. Returns `data` as a `tokenBalances` array.

Use `spenderAddress` when checking deposit allowance — see [cash/deposits.md](/rwa-trading-apis/cash-operations/deposits.md).


---

# 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/portfolio/overview.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.
