Get Politician P&L
get_politician_pnlEstimate realized and unrealized profit and loss for a politician's stock trades using disclosed transaction data. Provides totals and per-ticker breakdown.
Instructions
Get estimated realized + unrealized profit & loss for a politician. Methodology: each disclosed trade amount range is converted to an estimated share count using the stock's historical market price on the transaction date, then FIFO-matched on SHARES (realized = (sellPrice − buyPrice) × matched shares); open positions are marked to the current price for unrealized P&L. Works for Congress (sen-/rep-) AND executive branch (exec-) officials. Response includes a totals object (estimatedRealizedPnl, estimatedUnrealizedPnl, winRate, realizedTrades, tickersTraded) and a byTicker[] breakdown (estimatedShares, avgCostBasis, currentPrice, realizedPnl, unrealizedPnl, unrealizedPnlPercent) — byTicker open positions double as the estimated holdings. All figures are ESTIMATES (±25-40% from disclosure bracket width). Use get_politicians first to find the slug.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Politician URL slug — congressional ("sen-nancy-pelosi", "rep-...") or executive ("exec-trump-donald-j") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No |