Gravv docs
Docs Agent Sign in Get API keys

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}/cancel

Headers

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.

Path Parameters

The order_id returned when the order was created

Responses

Status Description
200 The order is cancelled
400 The order is not found, already final, or its debit is in progress

200 response

Possible values: cancelled

{
"data": {
"id": "2d4f6a8c-1b3d-4e5f-8a7b-9c0d1e2f3a4b",
"status": "cancelled"
},
"error": null
}

400 response

What went wrong. FX errors carry no code.

{
"data": null,
"error": "order cannot be cancelled in status: completed"
}

Authorization

  • ApiKeyAuth
Was this page helpful?
ESC