---
title: "Get portfolio chart data"
method: GET
path: "/api/v1/portfolio_chart"
tags: ["Analytics"]
---

# Get portfolio chart data

`GET /api/v1/portfolio_chart`

Returns time series data for PnL or account value over specified time range.
PnL = Cumulative Realized PnL from completed trades.
Account Value = Initial Deposits - Withdrawals + Realized PnL (excludes unrealized PnL).

## Query parameters

- `account` string, required
- `range` '24h' | '7d' | '30d' | '90d' | 'all', required
- `data_type` 'pnl' | 'account_value', required

## Response `200`

Portfolio chart data retrieved successfully

- PortfolioPointDto[]
  - `data_points` number, double, required
  - `timestamp` integer, required
  - `vault_equity` number, double, nullable — Vault equity: user's proportional share of vault NAV(s). None for users with no vault deposits, or for PnL data_type.

## Other responses

- `500` — Database error

---

[API](https://skmtc.net/decibel/apis/decibel-trading-api.md) · [All operations](https://skmtc.net/decibel/apis/decibel-trading-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/decibel/decibel-trading-api/revisions/37a02083ff59/schema)
