# FX rates

`GET https://api.rarebl.com/open/market/fx`

Foreign-exchange reference rates, for example usd to ghs and ngn.

**Rate class:** read (5 requests per second, burst 20, per IP). **Available since:** Open API v2.

## Request

Send the parameters as query parameters (GET) or as a JSON object (POST with `Content-Type: application/json`). They are identical either way. No API key is needed: `X-API-KEY` is reserved and ignored.

Example: `curl "https://api.rarebl.com/open/market/fx?base=usd&quotes=ghs%2Cngn"`

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `base` | string | No | Base currency. Default usd. |
| `quotes` | string | Yes | Comma-separated quote currencies. |

## Responses

### API200 (HTTP 200): OK

Rates (a real reply).

```json
{
  "status": 1,
  "code": "API200",
  "message": "success",
  "data": {
    "rates": {
      "GHS": "11.747527",
      "NGN": "1352.072165"
    },
    "source": "er-api",
    "updatedAt": "2026-11-15T00:37:02.017Z"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

| Field | Type | Description |
| --- | --- | --- |
| `data.rates` | object | Quote currency to rate. |
| `data.source / updatedAt` | string | The feed behind it and when it was updated. |

### API400 (HTTP 400): Bad Request

A parameter is missing or malformed. `data.param` names it (here `quotes`).

```json
{
  "status": 0,
  "code": "API400",
  "message": "Missing parameter: quotes.",
  "data": {
    "param": "quotes"
  },
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

### API429 (HTTP 429): Too Many Requests

Rate limited (read class: 5 requests per second, burst 20, per IP). A `Retry-After` header says how long to wait, in seconds.

```json
{
  "status": 0,
  "code": "API429",
  "message": "Too many requests. Please retry shortly.",
  "data": null,
  "go": null,
  "meta": {
    "requestid": "0123456789abcdef",
    "notices": []
  }
}
```

## Notes

- Reference rates, not Rarebl trading rates.
