GET /api/v1/account/state
Consolidated account state
Consolidated account state.
operationId: fetchAccountStateV1
Declared server differs from the callable one. This path declares its own
serversbase ofhttps://exchange.nexus.xyz, without the/api/exchangemount the document default carries. Measured 2026-09-02, the override is not routed —https://exchange.nexus.xyz/api/v1/account/statereturns404while the gateway form in the sample below is routed. A client generated from this contract will aim at the override; pin the gateway base until the per-network hosts are live. See Networks.
Not reachable through CCXT. Nexus account aggregates.
fetchBalanceis the CCXT-shaped view; these are richer and unmapped by design.
Authentication: hmacAuth.
Full account state in a single call: the portfolio summary aggregates plus all open positions ({ summary, positions }). Saves clients from pairing /account/summary with /positions, matching Hyperliquid clearinghouseState ergonomics. Both parts are built from one coherent read, so summary.open_positions_count always matches the positions length, and the embedded summary is identical to the standalone /account/summary response. Fails closed with 502 when the engine-authoritative margin view is unavailable.
Responses
401
— (no schema declared)
—
429
— (no schema declared)
—
502
— (no schema declared)
—
Example
curl -X GET 'https://exchange.nexus.xyz/api/exchange/api/v1/account/state' \
-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/api/v1/account/state", headers=headers)
response.raise_for_status()
print(response.json())const response = await fetch("https://exchange.nexus.xyz/api/exchange/api/v1/account/state", {
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

