For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET /account/portfolio-history

Account portfolio time-series

Account portfolio time-series.

operationId: fetchPortfolioHistory

Not reachable through CCXT. Portfolio and equity time series. CCXT has no unified historical-equity method.

Authentication: hmacAuth.

Portfolio time-series for the authenticated account — equity, cumulative trading PnL, and cumulative traded volume — downsampled over the selected window (day, week, month, or all), oldest first. Extends /account/equity-history (equity only, ~1h window) with PnL and volume series across multiple windows; both endpoints derive equity from the same source, so the series never disagree.

Parameters

Name
In
Type
Required
Default
Description

window

query

PortfolioWindow

No

"day"

Time window to return. Also selects the server-side downsample cadence and point capacity: | window | cadence | max points | span | |--------|---------|-----------|------| | day | 5 min | 288 | 24 h | | week | 1 h | 168 | 7 d | | month | 6 h | 120 | 30 d | | all | 1 d | 366 | ~1 y | Omitted defaults to day. A value outside this set is rejected with 400 (invalid_window). If the parameter is repeated, the first value is used.

limit

query

integer

No

Maximum number of points to return. Capped server-side at the selected window's capacity (day 288, week 168, month 120, all 366); a larger value is clamped, not rejected. Omit to return the full window.

Responses

Status
Body
Meaning

200

PortfolioHistory

Portfolio time-series for the window, oldest first.

400

(no schema declared)

401

(no schema declared)

429

(no schema declared)

Example

curl -X GET 'https://exchange.nexus.xyz/api/exchange/account/portfolio-history' \
  -H 'X-API-Key: nx_7f3a1b...' \
  -H 'X-Timestamp: 1776033911836' \
  -H 'X-Signature: <hmac-sha256>'
import requests

headers = {
    "X-API-Key": "nx_7f3a1b...",
    "X-Timestamp": "1776033911836",
    "X-Signature": "<hmac-sha256>"
}

response = requests.get("https://exchange.nexus.xyz/api/exchange/account/portfolio-history", headers=headers)
response.raise_for_status()
print(response.json())
const response = await fetch("https://exchange.nexus.xyz/api/exchange/account/portfolio-history", {
  method: "GET",
  headers: {
    "X-API-Key": "nx_7f3a1b...",
    "X-Timestamp": "1776033911836",
    "X-Signature": "<hmac-sha256>"
  },
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());

X-Signature is a placeholder: it is derived from this specific request. See Authentication for the canonical string and the HMAC rule.


Generated from eng/apps/exchange/api/openapi.json (spec 0.9.36). Do not edit by hand — regenerate with python3 product/docs/tools/api-reference/generate.py. Hand-authored context lives in the Guides pages.

Last updated