# Cancel an order

`DELETE /client_api/v2/orders/{id}`

Cancels an order that has not gone live yet. Otherwise the call answers 422.

## Parameters

- `id` (integer, required): The order's id. Get it from List orders (`GET /client_api/v2/orders`): send the `id` of the one you want. Ids differ between the sandbox and production.

## Returns

Returns the result.

- `success` (boolean, required): Always `false` on an error. A successful delete answers `true`.
- `error` (string, required): What went wrong, in one sentence. Empty on success.
- `errors` (array of values, required): Each reason the request was refused, one per entry. Often empty, in which case `error` says it all.

## Errors

- `401 Unauthorized`: The token is missing, expired or invalid. Sign in again.

## Example request (curl)

```bash
curl -X DELETE "https://sandbox-api.vatit-stream.com/client_api/v2/orders/23" \
  -H "Authorization: Bearer $API_TOKEN"
```

## Example response (200)

```json
{
  "success": true,
  "error": "",
  "errors": []
}
```
