Gravv docs
Docs Agent Sign in Get API keys

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/quote

Headers

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.

Request Body

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.

The same FROM_TO form as currency_pair. It is not BUY or SELL.

Amount you sell, in major units of the FROM currency, as a string. The API rejects a JSON number.

Request Examples

{
"currency_pair": "USD_XAF",
"amount": "10000"
}

Responses

Status Description
200 The quote
400 The pair is not enabled for you, or the amount is invalid

200 response

Use it once, with POST /v1/fx/orders, before expires_at

The amount you sell

The amount you buy, which is from_amount times rate, not rounded

Units of the TO currency for 1 unit of the FROM currency

When the quote expires, 5 minutes after it is made

{
"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
}

400 response

What went wrong. FX errors carry no code.

{
"data": null,
"error": "quote currency pair is not supported"
}
{
"data": null,
"error": "quote amount must be a positive number"
}

Authorization

  • ApiKeyAuth
Was this page helpful?
ESC