Foreign exchange
Choose the recipe for selling one currency for another with an OTC order: quote, order, settle to a wallet, an account or your own bank account.
Use these recipes to sell one currency for another with an OTC order. You get a quote for the amount you sell, then place the order with that quote before it expires.
Money example. Chidi has 1,600,000 NGN in his NGN account. You get a quote to sell 1,530,000 NGN for USDC at a rate of 0.00065, so he receives 994.5 USDC. He confirms, you place the order, and 1,530,000 NGN leaves his account at once. The order is completed when the 994.5 USDC reaches his USDC wallet.
Two words used everywhere
expires_at, about 5 minutes, and you can use it once.{"type": "external_account", "id": "<instruction id>"}.What can be traded
| Sell, then buy | Status | Recipe |
|---|---|---|
| NGN to USDC, between balances a customer holds on Gravv | Available once Gravv sets an OTC rate for your business | Convert naira to USDC |
| USDC to NGN, paid to your own bank account | Available once Gravv sets an OTC rate for your business | Sell USDC for naira into your bank account |
| USD to EUR, NGN to USD, GBP pairs and any other | Not yet available by default. Gravv sets up and prices a pair on request | Check whether a pair can be traded |
| From an account whose money is held at a bank, with no wallet | Not supported | None |
To a payee from /v1/external-accounts | Not supported. Proceeds go to a Gravv account or wallet, or to your own settlement instruction | None |
| "Buy exactly X", limit orders, target rates | Not supported. The quote amount is always the amount you sell | None |
After the order
| Situation | Recipe |
|---|---|
| The quote expired, or the order call failed and you do not know if money moved | Re-quote without selling twice |
| Add, switch or retire the bank accounts and wallets proceeds go to | Keep your settlement instructions up to date |
| Follow, list or cancel orders | Follow, list and cancel orders |
Two operations are not FX orders. Moving USDT to USDC between two wallets of the same customer is a conversion. Paying someone else in their currency is a payout, covered in Bank payouts.
Rules every recipe relies on
https://api.gravv.xyz, with the Api-Key header. A key that starts with grvSec_sandbox_ reaches sandbox; any other key is live.Idempotency-Key. A request with the same key and body replays the first response for 24 hours, 4xx responses included. Use a new key after any 4xx and for every new quote. After a timeout or a 5xx, retry with the same key."1530000"). A JSON number returns invalid request encoding.pending, and Gravv debits the source at once.error, even for "not found" and outages.quote currency pair is not supported until support sets a rate for your sandbox business.