# Currency rates

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

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

> **Get all exchange rates.** The exchange rates of every supported currency.

To get all currency rates.

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

## Response

`200`, schema `CurrencyRatesResponse`.

- `lastUpdate` (integer (int64)): Time stamp of data will be updated.
- `rates` (Currency[]): List of rates.
  - `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/rates' \
  -u 'YOUR_ACCOUNT:YOUR_API_KEY' \
  --fail-with-body
```

Response captured from production, long arrays and strings shortened:

```json
{
  "lastUpdate": 1790905053001,
  "rates": [
    {
      "updateDate": 1766073365786,
      "base": "EUR",
      "code": "FJD",
      "rate": 2.677556,
      "label": "Fijian Dollar"
    },
    {
      "updateDate": 1766073365786,
      "base": "EUR",
      "code": "STD",
      "rate": 24261.79,
      "label": "São Tomé and Príncipe Dobra"
    }
  ]
}
```

## Reference pages

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