FX List exchange rates
List exchange rates
Returns indicative rates for display, sorted by pair. You cannot trade at these rates; call `POST /v1/fx/quote` for a firm price. Filters are not case-sensitive. When rates are not loaded yet, the error is `fx cache is not ready`; retry the call.
Api-Key
Query parameters
NameDescription
currency_typePossible values:
fiat, cryptofrom_currencyto_currencydirectionsComma-separated
FROM_TO values, such as USD_NGN,USD_EURcurrency_pairsComma-separated four-part pair keys, such as
USD_US_EUR_FRResponse
Returns 200 OK. The rates, in one list with no paging
NameDescription
dataShow 9 child attributesobject[]
rateUnits of the TO currency for 1 unit of the FROM currency
directionFROM_TOcurrency_pairPair key
FROM_CC_TO_CC. One direction can have several rows, one for each country pair.pair_typePossible values:
fiat, cryptofrom_currencyfrom_currency_nameto_currencyto_currency_nametimestampWhen the rate was last updated. Check it, as a row can be old.
errorErrors
| Status | Meaning |
|---|---|
| 200 | The rates, in one list with no paging |
| 400 | The request failed. Every FX error is a 400, including not-found and outages. Read error. |
Was this page helpful? Yes No
Previous
Next
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request GET \
--url 'https://api.gravv.xyz/v1/fx/rates?from_currency=USD&to_currency=NGN' \
--header 'Api-Key: <api-key>'
const response = await fetch('https://api.gravv.xyz/v1/fx/rates?from_currency=USD&to_currency=NGN', {
method: 'GET',
headers: {
'Api-Key': '<api-key>',
},
});
const data = await response.json();
console.log(response.status, data);
import requests
url = "https://api.gravv.xyz/v1/fx/rates?from_currency=USD&to_currency=NGN"
headers = {
"Api-Key": "<api-key>",
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.gravv.xyz/v1/fx/rates?from_currency=USD&to_currency=NGN", nil)
if err != nil {
panic(err)
}
req.Header.Set("Api-Key", "<api-key>")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(body))
}
require "net/http"
require "uri"
uri = URI("https://api.gravv.xyz/v1/fx/rates?from_currency=USD&to_currency=NGN")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Get.new(uri)
request["Api-Key"] = "<api-key>"
response = http.request(request)
puts response.code
puts response.body
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.gravv.xyz/v1/fx/rates?from_currency=USD&to_currency=NGN',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Api-Key: <api-key>',
],
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.gravv.xyz/v1/fx/rates?from_currency=USD&to_currency=NGN"))
.header("Api-Key", "<api-key>")
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.gravv.xyz/v1/fx/rates?from_currency=USD&to_currency=NGN");
request.Headers.TryAddWithoutValidation("Api-Key", "<api-key>");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Responseapplication/json
200400OK
{
"data": [
{
"currency_pair": "USD_US_NGN_NG",
"direction": "USD_NGN",
"from_currency": "USD",
"from_currency_name": "US Dollar",
"pair_type": "fiat",
"rate": "1368.27",
"timestamp": "2026-10-13T22:20:08.941956Z",
"to_currency": "NGN",
"to_currency_name": "NGN"
}
],
"error": null
}
{
"data": null,
"error": "order not found"
}