# Official rate time series

**GET /api/v1/central-bank/{bank}/history**

Daily series over a date range (defaults to the last year; capped at 5000 rows — narrow the range if `truncated` is true). Use `symbol` for every published pair involving one currency, or `source`+`target` for a single resolved pair per date (cross-computed via the home currency when needed, flagged `derived`). Archives reach back to 2000 and earlier for major sources. Paid plans only.


## Servers
- Production: https://allratestoday.com (Production)


## Authentication methods
- Bearer auth
- Session cookie


## Parameters

### Path parameters

- **bank** (string)
  Source code from /api/v1/central-banks (e.g. ecb, boc, cbsl, banxico, ustreasury)


### Query parameters

- **symbol** (string)
  3-letter currency code matching either side of the pair. Required unless source+target are given.

- **source** (string)
  Pair mode: source currency, 3-letter code (requires target)

- **target** (string)
  Pair mode: target currency, 3-letter code (requires source)

- **type** (string)
  Rate type to return when the pair is requested with source+target on a two-sided table (buy/sell banks such as TCMB, BCB, BI, CBN). Values are the bank's own type labels as shown in its full table, e.g. buy or sell. Without it the pair resolves reference, mid, import, buy, sell in that order and rate_type says which side was used. A type the bank does not publish returns 404 listing the available types.

- **from** (string(date))
  Range start (YYYY-MM-DD; default: one year before `to`)

- **to** (string(date))
  Range end (YYYY-MM-DD; default: today)

- **format** (string)
  Response format (default json). csv is UTF-8 with a BOM; xlsx is a real Excel workbook with typed dates and numbers; xml mirrors the JSON fields.



## Responses
### 200
Ascending daily series

#### Body: application/json (object)
- **bank** (string)

- **name** (string)

- **symbol** (string)

- **source** (string)
  Present in pair mode

- **target** (string)
  Present in pair mode

- **from** (string(date))

- **to** (string(date))

- **count** (integer)

- **truncated** (boolean)
  True when the 5000-row cap was hit

- **rates** (array[object])

- **disclaimer** (string)


### 400
Invalid or missing parameters

#### Body: application/json (object)
- **error** (string)
  Error message

- **hint** (string)
  Optional remediation hint


### 401
Authentication required — provide an API key via `Authorization: Bearer art_live_...` (free keys at https://allratestoday.com/register)

#### Body: application/json (object)
- **error** (string)
  Error message

- **hint** (string)
  Optional remediation hint


### 403
Historical central-bank data requires a paid plan; /latest is available on all plans

#### Body: application/json (object)
- **error** (string)

- **upgrade_url** (string)


### 404
Unknown bank or pair not covered in range

#### Body: application/json (object)
- **error** (string)
  Error message

- **hint** (string)
  Optional remediation hint


### 429
Monthly request limit exceeded (X-Monthly-Limit / X-Monthly-Used / X-Monthly-Resets headers included)

#### Body: application/json (object)
- **error** (string)

- **used** (integer)

- **limit** (integer)

- **plan** (string)

- **resets_at** (string(date-time))

- **upgrade_url** (string)



[Powered by Bump.sh](https://bump.sh)
