Analytics API
Auto-generated from
openapi-snapshot.json. Do not edit by hand — changes are overwritten byscripts/docs/generate_api_reference.py.
9 endpoints in this group.
GET /api/analytics/aum
Get Aum
AUM history with capital breakdown: net_capital = contributed capital from capital_accounts unrealized = sum of unrealized_pnl from latest snapshot realized_ytd = sum of gain_loss from realized_trades YTD total_aum = net_capital + unrealized + realized_ytd
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional | |
account_id | query | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/analytics/cumulative-pnl
Cumulative Pnl
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional | |
account_id | query | — | optional | |
year | query | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/analytics/date-range
Get Date Range
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional | |
account_id | query | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/analytics/drawdown
Compute Drawdown
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional | |
account_id | query | — | optional | |
year | query | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/analytics/investor-allocation
Get Investor Allocation
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional | |
account_id | query | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/analytics/pnl
Aggregate Pnl
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional | |
account_id | query | — | optional | |
period | query | string | optional | daily |
year | query | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /api/analytics/xirr
Compute Xirr
Compute XIRR (irregular cash flow IRR) using Newton-Raphson. Returns annualized rate of return. None if no convergence.
Request body: application/json
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
GET /api/analytics/yoy
Yoy Summary
Year-over-year P&L summary with growth rates and return %. Includes pnl_growth_pct vs prior year and aum_growth_pct.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant_id | query | integer | optional | |
account_id | query | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /api/market/refresh
Refresh Market Data
Fetch latest prices from yfinance and update daily_position_snapshots.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
symbols | query | string | optional | Comma-separated symbols to refresh |
tenant_id | query | integer | optional | |
account_id | query | — | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |