---
title: "Get account balance"
method: GET
path: "/api/v1/users/{userId}/balance"
tags: ["Trading Account"]
---

# Get account balance

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

## Request

- Base URL: `https://rwa-api.anchored.finance/rwa/trading`
- URL: `https://rwa-api.anchored.finance/rwa/trading/api/v1/users/{userId}/balance`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in header `x-api-nonce`
  - API key in header `x-api-ts`
  - API key in header `x-api-sign`
  - API key in header `x-api-chain-id`
  - API key in header `x-api-p`
- TypeScript: <https://skmtc.dev/synfutures/apis/anchored-trading-partner-api/docs/api/v1/users/:userId/balance/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `userId` string, required

## Query parameters

- `spenderAddress` string

## Response `200`

OK

- BaseResponseAccountPortfolioRespDto: Base Response
  - `code` integer: if not 200, it means error
  - `errMsg` string: if code not 200,this is error message
  - `data` AccountPortfolioRespDto
    - `chainId` 1 | 143 | 8453 | 42161 | 4663 | 56 | 11155111 | 10143 | 84532 | 421614 | 46630: chain id of the account
    - `productType` 'FUND' | 'Common' | 'MondayTrade' | 'Anchored' | 'Synfutures': product type of the account
    - `address` string: address of the account
    - `tokenBalances` TokenBalance[]: token balances of the account, which includes wallet balance, wallet allowance and exchange balance
      - `address` string: token address
      - `name` string: token name
      - `symbol` string: token symbol
      - `stockSymbol` string: stock symbol, which is only applicable for stock tokens
      - `isStock` boolean: whether the token is a stock token
      - `decimals` integer: token decimals
      - `price` number: token price in USD, which is only applicable for stock tokens
      - `walletBalance` string: wallet balance of the token
      - `walletAllowance` string: wallet allowance of the token, which is the amount that the account has approved to the exchange
      - `exchangeBalance` string: exchange balance of the token, which is the amount that the account has deposited to the exchange
      - `logoUrl` string: logo url of the token
    - `musdBalance` string
  - `uuid` string: every request has a uuid
  - `t` integer: server time

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/synfutures/apis/anchored-trading-partner-api.md) - [All operations](https://skmtc.dev/synfutures/apis/anchored-trading-partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/synfutures/apis/anchored-trading-partner-api/revisions/8df20ab57300?raw)
