# Rate change history (GET /history)

Source: DepositScout Data API docs — https://depositscout.com/developers/docs/history

Genuine rate changes for one product, newest first. Pass sourceKey, or provider and accountName.

---

- **Cost:** 2 DS Credits per request (each page)
- **Scope:** `history:read`
- **Same data as:** `/api/rate-history` on the DepositScout website

## Request

GET https://depositscout.com/api/developer/v1/history

| Parameter | In | Type | Example | Description |
| --- | --- | --- | --- | --- |
| sourceKey | query | string | — | Stable product id from /rates. |
| provider | query | string | — | Provider name, used with accountName when there is no sourceKey. |
| accountName | query | string | — | Account name, used with provider. |
| limit | query | integer | 25 | Page size. Larger values are clamped to the maximum and the applied value is returned in meta.limit. |
| cursor | query | string | — | Opaque cursor from the previous page's meta.nextCursor. |
| fields | query | string | provider,accountName,rate | Comma-separated list of fields to include in each item. |

## Example

**curl**

```bash
curl "https://depositscout.com/api/developer/v1/history" \
  -H "Authorization: Bearer $DS_API_KEY"
```

**Node**

```javascript
const res = await fetch("https://depositscout.com/api/developer/v1/history", {
  headers: { Authorization: `Bearer ${process.env.DS_API_KEY}` },
});
const { data, meta } = await res.json();
console.log(meta.creditsCharged, data);
```

**Python**

```python
import os, requests

res = requests.get(
    "https://depositscout.com/api/developer/v1/history",
    headers={"Authorization": f"Bearer {os.environ['DS_API_KEY']}"},
)
body = res.json()
print(body["meta"]["creditsCharged"], body["data"])
```

## Response

`data` is an array — one item per row, with paging in meta. Every 2xx also sets `X-DS-Request-Id`, `X-DS-Credits-Charged`, `X-DS-Credits-Balance`, the `X-RateLimit-*` trio and an `ETag`.

```json
{
  "data": [
    {
      "…": "one item per row"
    }
  ],
  "meta": {
    "requestId": "req_7f3a9c2d1b4e5a6f7c8d",
    "generatedAt": "2026-09-21T09:00:00.000Z",
    "creditsCharged": 2,
    "creditsBalance": 199,
    "limit": 10,
    "nextCursor": "MToyNQ",
    "total": 412,
    "attribution": "Rates powered by DepositScout — depositscout.com"
  }
}
```

**Provider logos:** `providerLogoUrl`. An absolute, public HTTPS URL for the provider's logo that you can load directly (usually SVG; PNG or JPG for a few providers), or null when the provider has no logo.

Errors follow the [shared error contract](https://depositscout.com/developers/docs#errors). Back to [all endpoints](https://depositscout.com/developers/docs#endpoints).
