Transfer Get a transfer quote
Get a transfer quote
Prices a payout before you send it. Send the returned `quote_id` in `POST /v1/transfer` before `expires_at`, with the same currencies and amount, and the transfer settles at the quoted rate. With a `destination` payee, the quote also prices the fees and returns `net_to_amount`, what the recipient is credited. A route that is not open for the payee is refused here, before any money moves. Nothing is debited by a quote.
Api-Key
Headers
NameDescription
Idempotency-Key1 to 255 printable ASCII characters. A retry with the same key within 24 hours returns the first response, including a 400. After you correct a request, send a new key.
Body parameters
NameDescription
from_currencyThe currency the transfer is sent in.
USD for a USD account and for a USDC or USDT wallet.to_currencyThe currency the recipient receives. It must differ from
from_currency.amountThe amount you will send in
POST /v1/transfer, in from_currency. Positive. The transfer must send exactly this amount.from_country_iso_codeOptional ISO 3166-1 alpha-2 code of the sender's country.
to_country_iso_codeOptional ISO 3166-1 alpha-2 code of the payee's country. Send it for a currency paid in several countries, such as XOF, XAF or EUR: the quote is priced for that country, and a transfer to a payee in another country is refused.
sender_typeOptional.
individual or business.recipient_typeOptional.
individual or business.source_networkOptional. The network of the wallet the transfer is sent from.
source_assetOptional. The stablecoin the transfer is sent from,
USDC or USDT.destinationShow 3 child attributesobject
destination_typePossible values:
external_accountidAn
active external accountrailPayout rail. ach, wire and rtp are US domestic rails; wire is not an international wire. Leave it out, or send globalbank, for local bank and mobile money payouts.
Possible values: ach, wire, rtp, sepa, swift, fps, globalbank
Response
Returns 200 OK. The quote
NameDescription
dataShow 14 child attributesobject
quote_idSend it as
quote_id in POST /v1/transfer before expires_at.from_currencyto_currencyfrom_amountto_amountfrom_amount at the quoted rate.rateexpires_atThe quote cannot be used after this time. Quotes last about a minute.
pair_codeThe corridor priced, such as
USD_US_NGN_NG.source_amount_incl_feesSet only on routes that price their own payouts. Send it back as
expected_source_amount in POST /v1/transfer.fees_includedtrue when you sent a destination and the quote priced the fees.net_to_amountWith a
destination only. What the recipient is credited: to_amount less the payout fee taken from the amount.feeWith a
destination only. Your plan's fee, charged on top of the amount.fee_currencyfee_unavailabletrue when the fee could not be priced now. It is still charged when you send the transfer.errorErrors
| Status | Meaning |
|---|---|
| 200 | The quote |
| 400 | The quote was refused. Read error. |
Was this page helpful? Yes No
Previous
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request POST \
--url 'https://api.gravv.xyz/v1/transfer/quote' \
--header 'Api-Key: <api-key>' \
--header 'Idempotency-Key: payout-inv-114-1' \
--header 'Content-Type: application/json' \
--data '{
"from_currency": "USD",
"to_currency": "NGN",
"amount": "250.00",
"to_country_iso_code": "NG",
"destination": {
"destination_type": "external_account",
"id": "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b"
}
}'
const response = await fetch('https://api.gravv.xyz/v1/transfer/quote', {
method: 'POST',
headers: {
'Api-Key': '<api-key>',
'Idempotency-Key': 'payout-inv-114-1',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"from_currency": "USD",
"to_currency": "NGN",
"amount": "250.00",
"to_country_iso_code": "NG",
"destination": {
"destination_type": "external_account",
"id": "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b"
}
}),
});
const data = await response.json();
console.log(response.status, data);
import requests
url = "https://api.gravv.xyz/v1/transfer/quote"
headers = {
"Api-Key": "<api-key>",
"Idempotency-Key": "payout-inv-114-1",
}
payload = {
"from_currency": "USD",
"to_currency": "NGN",
"amount": "250.00",
"to_country_iso_code": "NG",
"destination": {
"destination_type": "external_account",
"id": "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b",
},
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.json())
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{
"from_currency": "USD",
"to_currency": "NGN",
"amount": "250.00",
"to_country_iso_code": "NG",
"destination": {
"destination_type": "external_account",
"id": "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b"
}
}`)
req, err := http.NewRequest("POST", "https://api.gravv.xyz/v1/transfer/quote", bytes.NewReader(payload))
if err != nil {
panic(err)
}
req.Header.Set("Api-Key", "<api-key>")
req.Header.Set("Idempotency-Key", "payout-inv-114-1")
req.Header.Set("Content-Type", "application/json")
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 "json"
require "net/http"
require "uri"
uri = URI("https://api.gravv.xyz/v1/transfer/quote")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Post.new(uri)
request["Api-Key"] = "<api-key>"
request["Idempotency-Key"] = "payout-inv-114-1"
request["Content-Type"] = "application/json"
request.body = JSON.generate({
"from_currency" => "USD",
"to_currency" => "NGN",
"amount" => "250.00",
"to_country_iso_code" => "NG",
"destination" => {
"destination_type" => "external_account",
"id" => "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b",
},
})
response = http.request(request)
puts response.code
puts response.body
<?php
$payload = [
'from_currency' => 'USD',
'to_currency' => 'NGN',
'amount' => '250.00',
'to_country_iso_code' => 'NG',
'destination' => [
'destination_type' => 'external_account',
'id' => '6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b',
],
];
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.gravv.xyz/v1/transfer/quote',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Api-Key: <api-key>',
'Idempotency-Key: payout-inv-114-1',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$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 {
String payload = """
{
"from_currency": "USD",
"to_currency": "NGN",
"amount": "250.00",
"to_country_iso_code": "NG",
"destination": {
"destination_type": "external_account",
"id": "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b"
}
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.gravv.xyz/v1/transfer/quote"))
.header("Api-Key", "<api-key>")
.header("Idempotency-Key", "payout-inv-114-1")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.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.Post, "https://api.gravv.xyz/v1/transfer/quote");
request.Headers.TryAddWithoutValidation("Api-Key", "<api-key>");
request.Headers.TryAddWithoutValidation("Idempotency-Key", "payout-inv-114-1");
request.Content = new StringContent(
"""
{
"from_currency": "USD",
"to_currency": "NGN",
"amount": "250.00",
"to_country_iso_code": "NG",
"destination": {
"destination_type": "external_account",
"id": "6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b"
}
}
""",
Encoding.UTF8,
"application/json");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Responseapplication/json
200400OK
{
"data": {
"quote_id": "GRVTRF_8C2E41A97B3D5F06",
"from_currency": "USD",
"to_currency": "NGN",
"from_amount": "250",
"to_amount": "382500",
"rate": "1530",
"expires_at": "2026-11-10T14:01:00Z",
"pair_code": "USD_US_NGN_NG",
"fees_included": true,
"net_to_amount": "382000",
"fee": "1.5",
"fee_currency": "USD"
},
"error": null
}
{
"data": null,
"error": "quote currency pair is not supported"
}