See my portfolio and performance
Goal: a dashboard showing each account’s value, cash, positions, returns and mix. Scope: read.
Calls: five reads per account; no writes.
- Your app to IDEALX API: GET /v1/accounts
- IDEALX API to Your app: accounts with portfolio ids
- Your app to IDEALX API: GET /v1/accounts/{id}/detail
- IDEALX API to Your app: balances, value, breakdown
- Your app to IDEALX API: GET /v1/accounts/{id}/positions
- IDEALX API to Your app: positions with value and gain
- Your app to IDEALX API: GET /v1/accounts/{id}/reports/performance
- Your app to IDEALX API: GET /v1/accounts/{id}/reports/allocation
- IDEALX API to Your app: returns, series, mix
1. List the accounts
Section titled “1. List the accounts”/v1/accountsAccounts you have a role on
curl "$IDEALX_API/v1/accounts" -H "Authorization: Bearer $IDEALX_API_KEY"Keep each account’s id, currency and its portfolios (ids and names). The full answer is shown in
Your first request.
2. Read balances and value
Section titled “2. Read balances and value”/v1/accounts/{id}/detailAn account with its portfolios and balances
curl "$IDEALX_API/v1/accounts/acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90/detail" \ -H "Authorization: Bearer $IDEALX_API_KEY"const detail = await get(`/v1/accounts/${accountId}/detail`);console.log(`${detail.name}: ${detail.value.amount} ${detail.value.currency}${detail.value.approximate ? " (approx.)" : ""}`);
// A tiny helper used in every journeyasync function get(path: string) { const res = await fetch(`${process.env.IDEALX_API}${path}`, { headers: { Authorization: `Bearer ${process.env.IDEALX_API_KEY}` }, }); if (!res.ok) throw new Error(`${res.status} ${(await res.json()).error.code}`); return res.json();}def get(path: str, **params): res = requests.get(f"{base}{path}", params=params, headers=headers, timeout=30) res.raise_for_status() return res.json()
detail = get(f"/v1/accounts/{account_id}/detail")print(detail["name"], detail["value"]["amount"], detail["value"]["currency"]){ "id": "acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90", "name": "Sam Taylor", "nickname": null, "accountTypeId": "individual", "accountTypeLabel": "Individual", "jurisdiction": "AU", "currency": "AUD", "status": "open", "myRoles": [{ "role": "owner", "label": "Owner" }], "portfolios": [ { "id": "ptf_01937c4e8a2b7d1f9e0c3b5a6d7e8fa1", "name": "Primary", "isPrimary": true, "status": "open", "balances": [{ "instrumentId": "AUD", "amount": "18250.40", "currency": "AUD" }], "value": { "amount": "43571.20", "currency": "AUD", "approximate": true, "complete": true }, "breakdown": [ { "bucket": "cash", "amount": "18250.40", "count": 1 }, { "bucket": "markets", "amount": "25320.80", "count": 2 } ], "actions": ["add_money", "trade", "transfer", "withdraw", "documents", "reports", "open_portfolio"] }, { "id": "ptf_01937c4e8a2b7d1f9e0c3b5a6d7e8fa2", "name": "Long term", "isPrimary": false, "status": "open", "balances": [{ "instrumentId": "AUD", "amount": "1500.00", "currency": "AUD" }], "value": { "amount": "12630.00", "currency": "AUD", "approximate": true, "complete": true }, "breakdown": [ { "bucket": "cash", "amount": "1500.00", "count": 1 }, { "bucket": "markets", "amount": "11130.00", "count": 1 } ], "actions": ["trade", "transfer", "documents", "reports"] } ], "totals": [{ "instrumentId": "AUD", "amount": "19750.40", "currency": "AUD" }], "value": { "amount": "56201.20", "currency": "AUD", "approximate": true, "complete": true }, "breakdown": [ { "bucket": "cash", "amount": "19750.40", "count": 1 }, { "bucket": "markets", "amount": "36450.80", "count": 3 } ], "actions": ["add_money", "trade", "transfer", "withdraw", "documents", "reports", "open_portfolio"], "openedAt": "2026-03-02T01:14:09.000Z"}totals is the cash of all portfolios together, per currency. approximate: true means at least one delayed price
or estimated rate went into the value; show it with a “≈”.
3. Read the positions
Section titled “3. Read the positions”/v1/accounts/{id}/positionsWhat each portfolio owns beyond cash, with cost base and value
curl "$IDEALX_API/v1/accounts/acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90/positions" \ -H "Authorization: Bearer $IDEALX_API_KEY"{ "positions": [ { "portfolioId": "ptf_01937c4e8a2b7d1f9e0c3b5a6d7e8fa1", "investment": { "id": "XASX:EXS", "symbol": "EXS", "name": "Example Australian Shares ETF", "assetClass": "etf", "market": "XASX", "currency": "AUD", "description": "Tracks a broad index of Australian shares.", "quantityDecimals": 0, "priceDecimals": 4, "securityType": "etf", "logo": "/v1/logos/XASX:EXS", "tradable": true, "accent": "#2f6fd6", "priceUsd": null, "quote": { "bid": "101.2500", "ask": "101.3100", "last": "101.2800", "previousClose": "100.9400", "asOf": "2026-11-25T04:12:00.000Z", "freshness": "delayed" }, "bond": null, "term": null }, "quantity": "200", "quantityInOrders": "0", "costBase": { "amount": "19120.00", "currency": "AUD" }, "value": { "amount": "20256.00", "currency": "AUD" }, "gain": { "amount": "1136.00", "currency": "AUD" }, "valueInAccountCurrency": { "amount": "20256.00", "currency": "AUD" }, "gainInAccountCurrency": { "amount": "1136.00", "currency": "AUD" } } ]}Group positions by portfolioId to show each portfolio. Use valueInAccountCurrency to add up positions in other
currencies; it is null when no rate is available, so skip those in totals and say so.
4. Read returns and value over time
Section titled “4. Read returns and value over time”/v1/accounts/{id}/reports/performanceValue over time and time-weighted returns, for the account or one portfolio
Add portfolioId for one portfolio.
curl "$IDEALX_API/v1/accounts/acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90/reports/performance" \ -H "Authorization: Bearer $IDEALX_API_KEY"{ "currency": "AUD", "since": "2026-03-02", "series": [ { "day": "2026-11-21", "value": "55710.35" }, { "day": "2026-11-24", "value": "55980.10" }, { "day": "2026-11-25", "value": "56201.20" } ], "returns": { "oneMonth": 1.8214, "threeMonths": 4.0377, "yearToDate": null, "oneYear": null, "sinceStart": 6.9102 }, "sinceOpening": { "value": "56201.20", "netMoneyIn": "52500.00", "gain": "3701.20" }, "approximate": true}returnsare time-weighted, in percent (1.8214is 1.82%), so deposits and withdrawals do not distort them. A period the account has not existed for isnull.sinceOpeningis the money view: value now, net money put in, and the difference.series[].dayis the account’s local day; one value per recorded day, oldest first.
5. Read the mix
Section titled “5. Read the mix”/v1/accounts/{id}/reports/allocationHow the account (or a portfolio) splits by kind of asset and by currency
{ "currency": "AUD", "total": "56201.20", "byClass": [ { "key": "etf", "value": "31376.00", "percent": 55.83 }, { "key": "cash", "value": "19750.40", "percent": 35.14 }, { "key": "equity", "value": "5074.80", "percent": 9.03 } ], "byCurrency": [{ "key": "AUD", "value": "56201.20", "percent": 100 }]}6. Add sparklines (optional)
Section titled “6. Add sparklines (optional)”GET /v1/investments/historyClosing prices for several investments at once (D126), for charts and sparklines takes up to 50 ids at once.
curl "$IDEALX_API/v1/investments/history?ids=XASX:EXS,XASX:EXW&range=3m" -H "Authorization: Bearer $IDEALX_API_KEY"{ "simulated": false, "series": [ { "id": "XASX:EXS", "points": [{ "day": "2026-08-25", "close": "96.1200" }, { "day": "2026-11-25", "close": "101.2800" }] }, { "id": "XASX:EXW", "points": [{ "day": "2026-08-25", "close": "131.4000" }, { "day": "2026-11-25", "close": "139.1500" }] } ]}Keeping it fresh
Section titled “Keeping it fresh”- Refresh balances and positions when a webhook says something changed:
deposit.credited,order.updated,withdrawal.settled,crypto.received(Events). - Refresh prices every few minutes at most; each quote says how fresh it is (
freshness,asOf). - Read performance once a day: daily values are recorded once per local day.