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 endpoint to retrieve all currency pairs available on Gravv:

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:

{
  "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 endpoint to get a current exchange rate for a specific currency pair. Include your Api-Key and the trade direction in your request body:

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:

{
  "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
}
Was this page helpful?