> ## Documentation Index
> Fetch the complete documentation index at: https://docs.marketdataset.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /macro/rates

> Central bank interest rates for G10 countries

## Endpoint

```
GET https://api.marketdataset.ai/macro/rates
```

Interest rate differentials are a primary driver of forex prices. This endpoint provides historical policy rates for all major central banks.

## Parameters

| Name         | Type    | Required | Description                                                              |
| ------------ | ------- | -------- | ------------------------------------------------------------------------ |
| `country`    | string  | No       | Country code: `US`, `EU`, `GB`, `JP`, `CH`, `AU`, `NZ`, `CA`, `NO`, `SE` |
| `start_date` | string  | No       | ISO 8601 date                                                            |
| `end_date`   | string  | No       | ISO 8601 date                                                            |
| `limit`      | integer | No       | Records to return (default: `100`, max: `500`)                           |
| `cursor`     | string  | No       | Pagination cursor                                                        |

## Covered central banks

| Country | Central Bank                | Currency |
| ------- | --------------------------- | -------- |
| US      | Federal Reserve             | USD      |
| EU      | European Central Bank       | EUR      |
| GB      | Bank of England             | GBP      |
| JP      | Bank of Japan               | JPY      |
| CH      | Swiss National Bank         | CHF      |
| AU      | Reserve Bank of Australia   | AUD      |
| NZ      | Reserve Bank of New Zealand | NZD      |
| CA      | Bank of Canada              | CAD      |
| NO      | Norges Bank                 | NOK      |
| SE      | Riksbank                    | SEK      |

## Credit cost

**\$0.010** per request

## Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.marketdataset.ai/macro/rates?country=US&limit=12" \
    -H "X-API-KEY: sk_your_key"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.marketdataset.ai/macro/rates",
      params={"country": "US", "limit": 12},
      headers={"X-API-KEY": "sk_your_key"},
  )
  print(response.json())
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "rates": [
    {
      "country": "US",
      "bank_name": "Federal Reserve",
      "rate": 5.33,
      "effective_date": "2024-09-01",
      "change": -0.25
    },
    {
      "country": "US",
      "bank_name": "Federal Reserve",
      "rate": 5.58,
      "effective_date": "2024-08-01",
      "change": 0.0
    }
  ],
  "next_page_url": null,
  "meta": {
    "request_id": "req_abc123",
    "credits_used": 0.01,
    "credits_remaining": 49.99
  }
}
```

## Fields

| Field            | Description                                       |
| ---------------- | ------------------------------------------------- |
| `rate`           | Policy rate in percent (e.g. `5.33` = 5.33%)      |
| `effective_date` | Date the rate took effect (monthly resolution)    |
| `change`         | Change from previous month (in percentage points) |
