Read-only JSON API powering this dashboard, plus Tasks CRUD.
Base URL https://silvereye.co.za. Interactive explorer:
/api/docs ·
OpenAPI schema: /api/openapi.json
Log in to receive an httpOnly, Secure session cookie
(sv_session, valid 12h). All /api/* data endpoints require it.
The cookie's signing key is derived from the password hash, so rotating the password
invalidates existing sessions.
POST /api/login { "username": "...", "password": "..." } → 200 {"ok":true} (sets cookie)
POST /api/logout → clears the cookie
GET /api/me → {"authed":bool,"configured":bool}
| Endpoint | Returns |
|---|---|
| /api/summary?ccy=USD|ZAR | NAV, NAV/unit, units, returns (24h/7d/30d/ITD), volatility, Sharpe, max drawdown, vs-BTC, currency exposure. |
| /api/series?ccy=USD|ZAR | Rebased-100 Portfolio / BTC / Blend + drawdown, downsampled to ~2000 points. |
| /api/positions | Itemised latest snapshot: crypto (by venue/asset), bank balances, loans — native + USD, with totals. |
| /api/exposure | Net currency exposure (USD) + crypto balances by venue. |
| /api/attribution | ITD return attribution by factor: weight × factor-return = contribution (asset vs currency). |
| /api/allocation?group=currency|asset|asset_type|counterparty | Grouped allocation (value, %, count) + 30-day stacked history. |
| /api/fx | Latest FX marks (USD/EUR/GBP-ZAR, BTC/USD, BTC/ZAR) with their source feeds. |
| /api/market | Every exchange's latest quote per pair: bid/ask/last/spread(bps)/24h. |
| /api/history?limit=500 | NAV history rows (time, NAV USD/ZAR, NAV/unit, units). |
| /api/health | Liveness — {"ok":true} (no auth). |
GET /api/tasks
POST /api/tasks { title, description?, priority?, due_date?, assigned_to? }
PATCH /api/tasks/{id} { any of: title, description, priority, status, due_date, assigned_to }
DELETE /api/tasks/{id}
curl -c jar -X POST https://silvereye.co.za/api/login \
-H 'Content-Type: application/json' -d '{"username":"…","password":"…"}'
curl -b jar 'https://silvereye.co.za/api/summary?ccy=USD'
Data is read-only against the fund database (it can never mutate NAV data);
Tasks are the only writable resource. NAV is Decimal-reconciled to production to the cent. FX is sourced
from api.theyield.co.za (primary) with 1Forge / TradingView / crypto-implied fallbacks; BTC/ZAR is the
mean of Luno & VALR. This dashboard's API is separate from api.silvereye.co.za.