# Every bank's latest official rate for one pair

**GET /api/v1/central-banks/rates**

Cross-bank comparison: each covered source's most recent official rate for the requested pair in a single call, with min/max/median and spread in basis points. Pairs a bank does not publish directly are cross-computed via that bank's own table only (never mixing banks) and flagged `derived`. Sources whose newest publication is older than 30 days are flagged `stale` and excluded from the spread stats. Banks that cannot produce the pair are skipped. Methodology: https://allratestoday.com/official-rates-methodology/. Available on all plans.


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


## Authentication methods
- Bearer auth
- Session cookie


## Parameters


### Query parameters

- **source** (string)
  Source currency, 3-letter code

- **target** (string)
  Target currency, 3-letter code

- **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.

- **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
Latest rate for the pair from every source that can produce it

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

- **target** (string)

- **as_of** (string(date))
  Newest rate_date among the returned banks; each bank also carries its own rate_date

- **count** (integer)

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

- **stats** (object | null)
  Computed over non-stale banks only; null when no fresh source covers the pair

- **methodology** (string)

- **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


### 404
No covered source publishes rates covering the requested pair

#### 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)
