# Account Metrics

> Returns latest metrics snapshot for the authenticated user's account (PnL, Equity, Balance, Margins)

Source: /trader/api/trading/get-account-metrics

## `GET /accounts/{account_id}/metrics`

**Account Metrics**

Returns latest metrics snapshot for the authenticated user's account (PnL, Equity, Balance, Margins)

Tags: `Trading`

#### Path parameters

- `account_id` (string) (required) — Account ID to fetch metrics for


### Responses

#### `200` — Successfully retrieved account metrics

**Content-Type:** `application/json`

- `account_id` (string) (required) — Account identifier
- `timestamp` (integer) (required) — Snapshot timestamp (Unix milliseconds)
- `pnl` (number) (required) — Unrealized profit/loss
- `equity` (number) (required) — Account equity (balance + unrealized PnL)
- `balance` (number) (required) — Account balance
- `used_margin` (number) (required) — Margin currently used by open positions
- `free_margin` (number) (required) — Margin available for new positions
- `margin_level` (number) (required) — Margin level percentage (equity/used_margin * 100)
- `position_pnl_by_id` (object) (required) — Map of position IDs to their individual PnL values

#### `400` — Bad request (missing or invalid account_id)

**Content-Type:** `application/json`

- `error` (object) (required)
  - `type` (string) (required) — Error type code
  - `message` (string) (required) — Human-readable error message
  - `field` (string) — Field name if error is field-specific

#### `401` — Unauthorized (invalid or missing JWT token)

**Content-Type:** `application/json`



#### `403` — Forbidden (account access denied)

**Content-Type:** `application/json`



#### `404` — Account metrics not available

**Content-Type:** `application/json`



#### `500` — Internal server error

**Content-Type:** `application/json`



