# US Treasury Average Interest Rates (`treasury.interest_rates`)

Average interest rates the US Treasury pays on its bills, notes, bonds, TIPS and other securities, by month.

- **Route:** `POST /v1/run/treasury.interest_rates`
- **Price:** $0.0005 per request ($0.50 per 1,000) · `cost_usd` on every response
- **Source:** US Treasury Fiscal Data (`treasury`) · failover: no
- **Measured latency:** p50 326 ms · p95 326 ms · p99 326 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `months` | integer | no | 1 | Most recent months to return |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `rates` | date, security_type, security and average_interest_rate_percent. |
| `months` | Month-end dates covered. |
| `count` | Rows returned. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/treasury.interest_rates \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"months":1}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('treasury.interest_rates', {'months': 1})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run treasury.interest_rates '{"months":1}'
```

Quote first (free, validates input): `POST /v1/quote/treasury.interest_rates` with the same body.
