# Currency single rate

`GET https://bemap.benomad.com/bgis/service/currency/1.0/rate`

Part of [Currency](https://benomad.com/dev/doc/bemap-api/more-services/currency.md).

> **Get one exchange rate.** The exchange rate of one currency.

To get single currency rate for a currency code.

Requires the Currency option (Allow to get currency information); without it BeMap answers `400 Access Denied`.

## Query parameters

- `code` (string, required, in query)

## Response

`200`, schema `CurrencyRateResponse`.

- `lastUpdate` (integer (int64)): Time stamp of data will be updated.
- `rate` (Currency): Rate of currency.
  - `updateDate` (integer (int64)): Update date, time stamp in milliseconds.
  - `base` (string): Base of rate. Currency ISO 4217 Code.
  - `code` (string): Currency ISO 4217 Code.
  - `rate` (number (float)): Rate of currency.
  - `label` (string): Label / name of currency.

## Errors

- `400`: Bad Request
- `302`: no credentials were sent. Do not follow the redirect.
- `401`: the account or the API key is wrong.

How to read each one: [Errors](https://benomad.com/dev/doc/bemap-api/getting-started/errors.md).

## Example

```bash
curl -X GET 'https://bemap.benomad.com/bgis/service/currency/1.0/rate?code=USD' \
  -u 'YOUR_ACCOUNT:YOUR_API_KEY' \
  --fail-with-body
```

Response captured from production:

```json
{
  "lastUpdate": 1790905053001,
  "rate": {
    "updateDate": 1766073365786,
    "base": "EUR",
    "code": "USD",
    "rate": 1.172181,
    "label": "United States Dollar"
  }
}
```

## Reference pages

- [Currency single rate](https://benomad.com/dev/doc/bemap-api/guides/services/currency-rate.md)
