Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
FX Get a quote

Get a quote

Returns a firm price to sell an amount of one currency for another. The quote lasts 5 minutes and can be used once, only by `POST /v1/fx/orders`. It does not set the rate of a transfer. A pair that is not enabled for you returns `quote currency pair is not supported`.

POSThttps://api.gravv.xyz/v1/fx/quoteTry it
Api-Key

Headers

NameDescription
Idempotency-Key:stringRequired
1 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
currency_pair:string
The currency you sell, then the currency you buy, in FROM_TO form, such as USD_XAF. The four-part form USD_US_XAF_CM is also accepted; its countries do not change the price. It takes precedence over direction.
direction:string
The same FROM_TO form as currency_pair. It is not BUY or SELL.
amount:stringRequired
Amount you sell, in major units of the FROM currency, as a string. The API rejects a JSON number.

Response

Returns 200 OK. The quote

NameDescription
data:object
Show 7 child attributesobject
error:null

Errors

StatusMeaning
200The quote
400The pair is not enabled for you, or the amount is invalid
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request POST \
--url 'https://api.gravv.xyz/v1/fx/quote' \
--header 'Api-Key: <api-key>' \
--header 'Idempotency-Key: usd-xaf-order-1042' \
--header 'Content-Type: application/json' \
--data '{
"currency_pair": "USD_XAF",
"amount": "10000"
}'
Responseapplication/json
200400OK
{
"data": {
"quote_id": "GRVOTC_3F9A1C",
"from_currency": "USD",
"to_currency": "XAF",
"to_amount": "6052500",
"from_amount": "10000",
"rate": "605.25",
"expires_at": "2026-10-12T09:25:00Z"
},
"error": null
}