# Congress returns

> An estimate of how a member of Congress's stock purchases in one year have done since: each purchase priced on its trade date at the midpoint of its disclosed amount range, then marked to today's price, across their ten most-traded stocks.

Source: https://wiseview.ai/docs/api/congress-returns

`GET https://api.wiseview.ai/v1/congress/returns`

An estimate of how a member of Congress's stock purchases in one year have done since: each purchase priced on its trade date at the midpoint of its disclosed amount range, then marked to today's price, across their ten most-traded stocks. An estimate from disclosed ranges, not their actual account.

Each call counts against your allowance.

## Parameters

| Name | In | Type | What it does |
| --- | --- | --- | --- |
| `name` (required) | query | text | Part of a member of Congress's name. |
| `year` | query | whole number, 2012–2100 | The year of the purchases. Leave it out for this year. |

## Answer

`data`, abridged — real answers carry more fields:

```json
{
  "politician": "Jane Example",
  "chamber": "House",
  "party": "D",
  "year": 2026,
  "percentageGain": 12.4,
  "totalGainLoss": 18600,
  "totalInvestedAmount": 150000,
  "tradesAnalyzed": 9,
  "totalTrades": 11,
  "symbolsAnalyzed": 6,
  "note": "Based on 9 of 11 purchase trades. Estimated using midpoint of reported ranges."
}
```

## Samples

```bash
curl "https://api.wiseview.ai/v1/congress/returns?name=Pelosi" \
  -H "Authorization: Bearer $WISEVIEW_API_KEY"
```

```python
import os
import requests

response = requests.get(
    "https://api.wiseview.ai/v1/congress/returns?name=Pelosi",
    headers={"Authorization": f"Bearer {os.environ['WISEVIEW_API_KEY']}"},
)
response.raise_for_status()
print(response.json())
```

```javascript
const response = await fetch("https://api.wiseview.ai/v1/congress/returns?name=Pelosi", {
  headers: { "Authorization": `Bearer ${process.env.WISEVIEW_API_KEY}` },
});
if (!response.ok) throw new Error(`WiseView answered ${response.status}`);
console.log(await response.json());
```
