---
title: "Get exchange rates"
---
You can check which currency pairs Gravv supports and retrieve current exchange rates before executing trades.

## Get all currency pair rates

Use the [Get all currency pair rates](/api-reference/fx/get-v1-fx-rates) endpoint to retrieve all currency pairs available on Gravv:

```bash title="Get all currency pair rates request"
curl --request GET \
     --url https://api.gravv.xyz/v1/fx/rates \
     --header 'Api-Key: <API_KEY>' \
     --header 'accept: application/json'
```

The response returns fiat currency pairs by default:

```json title="Get all currency pair rates response"
{
  "data": [
    {
      "rate": 13.7741,
      "direction": "buy",
      "currency_pair": "BWP/USD",
      "from_currency": "BWP",
      "from_currency_name": null,
      "timestamp": "2026-03-23T12:50:32.082350079+01:00",
      "to_currency": "USD",
      "to_currency_name": null
    },
    {
      "rate": 18.4025,
      "direction": "sell",
      "currency_pair": "USD/ZAR",
      "from_currency": "USD",
      "from_currency_name": null,
      "timestamp": "2026-03-23T12:50:32.450793659+01:00",
      "to_currency": "ZAR",
      "to_currency_name": null
    }
  ],
  "error": null
}
```

## Request an exchange rate

Use the [Get FX Quote](/api-reference/fx/post-v1-fx-quote) endpoint to get a current exchange rate for a specific currency pair. Include your `Api-Key` and the trade direction in your request body:

```bash title="request an exchange rate request"
curl --request POST \
     --url https://api.gravv.xyz/v1/fx/quote \
     --header 'Api-Key: <API_KEY>' \
     --header 'Idempotency-Key: 979879887678789_attempt_1' \
     --header 'content-type: application/json' \
     --data '
{
  "from_currency": "USD",
  "to_currency": "ZAR",
  "amount": 10,
  "direction": "BUY"
}
'
```

The response includes a `quote_id`, which expires in 15 seconds. Save the `quote_id` as you will use it later to execute the trade:

```json title="request an exchange rate response"
{
  "data": {
    "amount": 10,
    "direction": "BUY",
    "expires_at": "2026-03-23T12:45:28.424260688+01:00",
    "from_currency": "USD",
    "quote_id": "QT-M2hPM9qt",
    "rate": 17.715,
    "to_currency_amount": 177.15,
    "to_currency": "ZAR"
  },
  "error": null
}
```

