Trades a quote. With an API key there is no approval step. The order starts as `pending` and Gravv debits the source at once. Then get the order until it is `completed` or `cancelled`. FX orders send no webhooks.
POSThttps://api.gravv.xyz/v1/fx/ordersTry it
Api-Key
Trades a quote. With an API key there is no approval step. The order starts as pending and Gravv debits the source at once. Then get the order until it is completed or cancelled. FX orders send no webhooks.
If the error is order source could not be charged, an order may still exist; list your orders before you retry with a new quote.
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
quote_id:stringRequired
A quote from POST /v1/fx/quote that has not expired or been used
source:object
Your account or crypto wallet that pays the sold amount. It must hold at least from_amount in the FROM currency. It cannot be external_account.
Show 2 child attributesobject
type:stringRequired
internal_account or internal_crypto_wallet. For a destination, external_account means a settlement instruction, not a customer's external account.
Possible values: internal_account, internal_crypto_wallet, external_account
id:stringRequired
ID of your account, crypto wallet or settlement instruction
destination:object
Where the bought amount goes. It is your account or crypto wallet, or an active settlement instruction (external_account) in the TO currency.
Show 2 child attributesobject
type:stringRequired
internal_account or internal_crypto_wallet. For a destination, external_account means a settlement instruction, not a customer's external account.
Possible values: internal_account, internal_crypto_wallet, external_account
id:stringRequired
ID of your account, crypto wallet or settlement instruction
transaction_id:string
Optional ID to give the order. It becomes order_id.
client_reference:string
Your reference. It does not have to be unique.
metadata:object
Your data, returned on the order
Response
Returns 200 OK. The order is created
NameDescription
data:object
Show 3 child attributesobject
order_id:string
quote_id:string
status:string
An order made with an API key starts as pending, and Gravv debits its source at once. It then becomes completed, or cancelled if the debit fails. waiting_approval is for orders made in the Dashboard.
Possible values: waiting_approval, pending, completed, rejected, cancelled
error:null
Errors
Status
Meaning
200
The order is created
400
The quote is expired or used, a leg is invalid, the source balance is too low, or the debit failed
403
The key lacks fx:order_create, or your business does not have access to the OTC trade desk