Check whether a pair can be traded
Find out with one test quote whether Gravv can convert a pair such as USD to EUR for your business, and what to do if not.
This recipe uses one test quote to find out whether Gravv can convert a pair, such as USD to EUR, for your business. It also says what to do if Gravv cannot.
Who it is for. A UK freelancer platform that holds USD and EUR accounts for its customers and wants to let them switch USD into EUR.
Status. NGN to USDC and USDC to NGN are Available once Gravv sets a rate for your business. Every other pair is Not yet available until Gravv sets it up for you.
Money example
Amelia has 2,000 USD in her USD account and a EUR account.
quote currency pair is not supported, because the pair is not set up for your business.Before you start
You need an API key. A scoped key needs fx:read.
Find out what is required
The two lists below are display data, and neither proves that you can trade a pair. Only the test quote tells you.
Steps
1. See which pairs Gravv knows
Every key is FROM_FROMCOUNTRY_TO_TOCOUNTRY (XX for crypto), and one currency can appear under several countries. The *_name values are not clean display names, so show your own labels. The NGN and USDC pair is not in this list. The call takes no filters.
2. Read a display rate
One direction can return several rows, one per country pair. A row can be weeks old, so read timestamp and do not show a stale rate.
3. Send a test quote
quote_id means the pair is enabled. The test quote expires on its own, and Gravv charges nothing.quote currency pair is not supported means the pair is not enabled for you. Contact support with the pair and the volume you expect.4. Once enabled, check both accounts
Gravv does not check that the source is in the currency you sell or that the destination is in the currency you buy. Read both with GET /v2/accounts/{id} before every order.
What can go wrong
| Response | Why | Fix |
|---|---|---|
400 quote currency pair is not supported | The pair is not set up or priced for you | Contact support |
400 invalid currency_type on rates | You sent a value other than fiat or crypto | Send fiat or crypto |
400 fx cache is not ready | The rate cache is empty or unreadable | Retry later |
A rate of exactly "1" between two different currencies | The rate feed has a fault | Do not show the rate, and report it. Gravv prices quotes separately |
| You need EUR paid to someone else's bank | That is a payout, not an FX order | Pay a euro account by SEPA |
Webhooks you will receive
Gravv sends no webhooks for FX.
Testing in sandbox
The same calls work with a sandbox key. A "not supported" response in sandbox says nothing about live, and a live response says nothing about sandbox.