# Treasury yields

> US Treasury yields across the curve, one-month to 30-year, one row a day, newest first.

Source: https://wiseview.ai/docs/api/market-treasury-yields

`GET https://api.wiseview.ai/v1/market/treasury-yields`

US Treasury yields across the curve, one-month to 30-year, one row a day, newest first. Without dates, the most recent days; give from and to for a window, about three months at a time.

Each call counts against your allowance.

## Parameters

| Name | In | Type | What it does |
| --- | --- | --- | --- |
| `from` | query | date, YYYY-MM-DD | First day, like 2025-01-02. |
| `to` | query | date, YYYY-MM-DD | Last day, like 2025-12-31. |

## Answer

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

```json
[
  {
    "date": "2026-10-20",
    "month1": 3.92,
    "month3": 3.85,
    "year2": 3.51,
    "year5": 3.62,
    "year10": 4.05,
    "year30": 4.61
  }
]
```

## Samples

```bash
curl "https://api.wiseview.ai/v1/market/treasury-yields" \
  -H "Authorization: Bearer $WISEVIEW_API_KEY"
```

```python
import os
import requests

response = requests.get(
    "https://api.wiseview.ai/v1/market/treasury-yields",
    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/market/treasury-yields", {
  headers: { "Authorization": `Bearer ${process.env.WISEVIEW_API_KEY}` },
});
if (!response.ok) throw new Error(`WiseView answered ${response.status}`);
console.log(await response.json());
```
