Portfolio & analytics

Portfolio snapshot, P&L history, and the full analytics endpoint: Sharpe, Sortino, attribution, slippage, streaks.

GET /api/v2/portfolio

Live account snapshot: cash balance, reserved_balance (cash held by resting buys), open positions marked to the latest observed prices, unrealized and realized P&L, total fees paid, and trade counts.

GET /api/v2/portfolio/analytics

One call returns the full analytics bundle, computed from your most recent 2,000 trades, ledger entries, and orders (the response sets truncated: true if any cap was hit):

SectionContents
summaryRealized/unrealized P&L, win rate, profit factor, expectancy, fees
ratiosAnnualized Sharpe and Sortino (see conventions below)
streaksMax win/loss streaks and the current streak
periodsToday / 7d / 30d / all-time breakdowns (UTC boundaries)
attributionP&L, fees, win rate grouped by market series, venue, and your strategy tags
slippageAverage and total slippage, bucketed by order size (1–10, 11–100, 101–1000, 1000+)
feesTotal fees, fees as % of gross P&L, per-venue and per-series breakdowns
riskMax drawdown, drawdown duration, largest single-trade win/loss

Statistical conventions (so numbers are reproducible)

  • The equity curve is built from the ledger: initial balance + cumulative realized P&L, daily at UTC boundaries, forward-filled on quiet days. Unrealized P&L is deliberately excluded so the curve is exactly reproducible from your exported ledger.
  • Sharpe: mean(daily returns) / sample stdev (n−1), annualized by √365, risk-free rate 0. Returns null below 5 daily observations — we will not fabricate a ratio from a weekend of data.
  • Sortino: same, with downside deviation (target 0, full-sample denominator); null when there are no negative return days.
  • Series attribution groups Kalshi tickers by their series prefix (KXHIGHNY-26JUN13-B85.5KXHIGHNY); Polymarket trades group by venue and strategy tag.

GET /api/pnl-history?days=90

Daily equity and P&L series for charting (days 1–365, default 90). Same ledger-derived convention as above.

GET /api/v2/portfolio/export?type=...

CSV exports for orders, fills, trades, and ledger — every number in the analytics is derivable from these four files. Import them into a spreadsheet, a journal, or your own research stack; nothing is locked in.