Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
FX Cancel an order

Cancel an order

Cancels a `waiting_approval` or `pending` order whose debit is not in progress. Cancelling does not return money that was already debited; contact support for that. The request has no body.

POSThttps://api.gravv.xyz/v1/fx/orders/{order_id}/cancelTry it
Api-Key

Path parameters

NameDescription
order_id:stringRequired
The order_id returned when the order was created

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.

Response

Returns 200 OK. The order is cancelled

NameDescription
data:object
Show 2 child attributesobject
error:null

Errors

StatusMeaning
200The order is cancelled
400The order is not found, already final, or its debit is in progress
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request POST \
--url 'https://api.gravv.xyz/v1/fx/orders/2d4f6a8c-1b3d-4e5f-8a7b-9c0d1e2f3a4b/cancel' \
--header 'Api-Key: <api-key>' \
--header 'Idempotency-Key: usd-xaf-order-1042'
Responseapplication/json
200400OK
{
"data": {
"id": "2d4f6a8c-1b3d-4e5f-8a7b-9c0d1e2f3a4b",
"status": "cancelled"
},
"error": null
}