# Cancel order

`DELETE https://api.cryptohopper.com/v1/hopper/{id}/order/{order_id}/cancel`

Part of [Orders](https://www.cryptohopper.com/api-documentation/api-reference/orders.md) in the Cryptohopper API reference.

Sends a cancel request for one open order to the exchange.

OAuth scope: `read`, `manage`

The cancel request is queued, so the order can still be open for a short time after the response.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `order_id` | string | yes | Cryptohopper order ID (the id field of Get open orders), not the exchange order ID. |
| `id` | string | yes | Hopper ID. |

## Example request

```bash
curl -X DELETE "https://api.cryptohopper.com/v1/hopper/HOPPER_ID/order/ORDER_ID/cancel" \
  -H "access-token: YOUR_ACCESS_TOKEN"
```

## Response

Example response (illustrative values):

```json
{
    "data": "Canceled order 342000001"
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
