# Bank of Canada API
> Live official central-bank data from the Bank of Canada's public Valet API — no key, nothing cached. The Bank of Canada is the only major central bank with a fully open data API, and this exposes the three things markets watch. The fx endpoint returns the official daily exchange rates for 24 currencies against the Canadian dollar — USD/CAD, EUR/CAD, GBP/CAD, JPY/CAD and more — each in both directions (Canadian dollars per unit and units per Canadian dollar) with the observation date; these are the Bank's official published reference rates, not a retail aggregator (USD/CAD resolves to about 1.39). The rates endpoint returns the Bank's policy interest rate — the overnight target that sets the price of money in Canada — plus CORRA, the Canadian Overnight Repo Rate Average benchmark, with recent history so you can see the last moves. The yields endpoint returns the Government of Canada benchmark bond-yield curve (2, 3, 5, 7, 10-year and long) with the 10y-2y spread. This is the official-rates layer for any forex, fixed-income, treasury, research or macro app that needs authoritative Canadian central-bank numbers. Live from the Bank of Canada, nothing stored. Distinct from ECB-based FX and US-Treasury yield APIs — this is the Bank of Canada's own data. 4 endpoints.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/bankofcanada-api/..."
```

## Pricing
- **Free** (Free) — 12,000 calls/Mo, 3 req/s
- **Starter** ($8/Mo) — 145,000 calls/Mo, 8 req/s
- **Pro** ($22/Mo) — 660,000 calls/Mo, 15 req/s
- **Scale** ($53/Mo) — 3,300,000 calls/Mo, 30 req/s

## Endpoints

### Rates

#### `GET /v1/fx` — Official daily FX rates vs CAD

**Parameters:**
- `symbols` (query, optional, string) — Currencies (e.g. USD,EUR), or all 24 Example: `USD,EUR,GBP,JPY`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bankofcanada-api/v1/fx?symbols=USD%2CEUR%2CGBP%2CJPY"
```

**Response:**
```json
{
    "data": {
        "base": "CAD",
        "date": "2026-06-08",
        "count": 4,
        "rates": [
            {
                "pair": "USDCAD",
                "currency": "USD",
                "cad_per_unit": 1.3947,
                "unit_per_cad": 0.717
            },
            {
                "pair": "EURCAD",
                "currency": "EUR",
                "cad_per_unit": 1.6094,
                "unit_per_cad": 0.62135
            },
            {
                "pair": "GBPCAD",
                "currency": "GBP",
                "cad_per_unit": 1.8615,
                "unit_per_cad": 0.537201
            },
            {
                "pair": "JPYCAD",
                "currency": "JPY",
                "cad_per_unit": 0.00871,
                "unit_per_cad": 114.810563
            }
        ],
        "source": "Bank of Canada official daily rates"
    },
    "meta": {
        "timestamp": "2026-06-09T11:39:48.744Z",
        "request_id": "bc6e2934-3ca6-4c30-989e-9367ff5f26b2"
    },
    "status": "ok",
    "message": "FX rates retrieved successfully",
    "success": true
}
```

#### `GET /v1/rates` — Policy rate + CORRA

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bankofcanada-api/v1/rates"
```

**Response:**
```json
{
    "data": {
        "corra": {
            "date": "2026-05-27",
            "name": "Canadian Overnight Repo Rate Average",
            "rate_pct": 2.25
        },
        "source": "Bank of Canada",
        "policy_rate": {
            "date": "2026-05-27",
            "name": "Target for the overnight rate",
            "rate_pct": 2.25
        },
        "policy_rate_history": [
            {
                "date": "2026-06-05",
                "rate": 2.25
            },
            {
                "date": "2026-06-04",
                "rate": 2.25
            },
            {
                "date": "2026-06-03",
                "rate": 2.25
            },
            {
                "date": "2026-06-02",
                "rate": 2.25
            },
            {
                "date": "2026-06-01",
                "rate": 2.25
            },
            {
                "date": "2026-05-29",
                "rate": 2.25
            },
            {
                "date": "2026-05-28",
                "rate": 2.25
            },
            {
                "date": "2026-05-27",
                "rate": 2.25
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-09T11:39:49.275Z",
        "request_id": "d831422c-4575-456a-93f0-cdf28d255f7d"
    },
    "status": "ok",
    "message": "Policy rates retrieved successfully",
    "success": true
}
```

#### `GET /v1/yields` — Government of Canada bond-yield curve

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bankofcanada-api/v1/yields"
```

**Response:**
```json
{
    "data": {
        "date": "2026-06-05",
        "count": 6,
        "curve": [
            {
                "term": "2Y",
                "yield_pct": 2.87
            },
            {
                "term": "3Y",
                "yield_pct": 2.96
            },
            {
                "term": "5Y",
                "yield_pct": 3.14
            },
            {
                "term": "7Y",
                "yield_pct": 3.28
            },
            {
                "term": "10Y",
                "yield_pct": 3.48
            },
            {
                "term": "LONG",
                "yield_pct": 3.83
            }
        ],
        "issuer": "Government of Canada",
        "source": "Bank of Canada benchmark bond yields",
        "country": "Canada",
        "spread_10y_2y_bps": 61
    },
    "meta": {
        "timestamp": "2026-06-09T11:39:49.570Z",
        "request_id": "2da50b2f-9f91-466c-a6b6-120819ddde03"
    },
    "status": "ok",
    "message": "Bond yields retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bankofcanada-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "Bank of Canada Valet API (live)",
        "service": "bankofcanada-api",
        "endpoints": {
            "GET /v1/fx": "Official daily FX rates vs CAD (symbols=USD,EUR,… or all 24).",
            "GET /v1/meta": "This document.",
            "GET /v1/rates": "Policy interest rate (overnight target) + CORRA, with recent history.",
            "GET /v1/yields": "Government of Canada benchmark bond-yield curve (2Y–long) + 10y-2y spread."
        },
        "description": "Live official Bank of Canada data from the public Valet API: official daily FX rates for 24 currencies against the Canadian dollar (both directions, with date); the policy interest rate (overnight target) plus CORRA with recent history; and the Government of Canada benchmark bond-yield curve (2/3/5/7/10-year and long) with the 10y-2y spread. Live, no key, nothing stored. Distinct from ECB-based FX and US-Treasury yield APIs — this is the Bank of Canada's own central-bank data.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-09T11:39:49.717Z",
        "request_id": "f4fe6071-d3a7-453b-9463-6b832c0ea82a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/bankofcanada-api
OpenAPI spec: https://www.oanor.com/api/bankofcanada-api/openapi.json
