Execute trade
To execute a trade, use the Execute trade endpoint and include the quote_id from the Get FX Quote response in your request body:
curl --request POST \
--url https://api.gravv.xyz/v1/fx/trade \
--header 'Api-Key: <Api Key>' \
--header 'Idempotency-Key: 979879887678789_attempt_1' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"quote_id": "QT-M2hPM9qt"
}
'
Note
Your trade direction depends on the direction you set when you call the Get FX Quote endpoint.
The endpoint returns a confirmation showing your executed trade details:
{
"data": {
"trade_id": "TR-asdfasdf",
"status": "PENDING",
"from_currency": "USD",
"to_currency": "ZAR",
"executed_rate": 17.715,
"executed_amount": 177.15,
"direction": "BUY",
"timestamp": "2026-03-23T12:45:30.424260688+01:00"
},
"error": null
}