# Current exchange rate for one currency pair

**GET /api/rate**

Live mid-market rate between two currencies, refreshed roughly every 60 seconds. Requires an API key: pass it as `Authorization: Bearer art_live_...` or, for simple cross-origin GETs, as `?key=` (alias `?apiKey=`). CORS-enabled.


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


## Authentication methods
- Bearer auth
- Api key query


## Parameters


### Query parameters

- **source** (string)
  Source currency code (ISO 4217)

- **target** (string)
  Target currency code (ISO 4217)

- **key** (string)
  API key (alternative to the Authorization header; `apiKey` also accepted)

- **apiKey** (string)
  Alias for `key` — the same query-string fallback under its camelCase name.



## Responses
### 200
Current rate

#### Body: application/json (object)
- **rate** (number(double))

- **source** (string)
  Data source class


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


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


### 502
Upstream rate provider error

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

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



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