# Cancelling an order

## Prerequisites

- **Authentication scopes** — `orders:admin`
For more information, refer to [Authentication scopes](/products/byol/concepts/api_concepts/authentication/authentication_oauth#list-of-authentication-scopes).
- **Webhook handler ready** — Set up a webhook endpoint to listen for cancellation confirmations.
  - Subscribe to [`ORDER_CANCELLATION.*`](/products/byol/guides/orders/orders_webhooks) events to receive automatic notifications.
For more information, refer to [Implementing webhooks](/products/byol/getting_started/implementing_webhooks).


In this chapter you will learn how to cancel orders.

Orders of all types (`MARKET`, `LIMIT`, and `STOP`) can be cancelled in status `NEW` and `PROCESSING`. For partially executed orders, only the unfilled quantities of existing orders will be cancelled.

To cancel an existing order, call the cancellation endpoint with the appropriate order ID, using

**DELETE** [`/orders/{order_id}`](/api/orders/cancel_order)

Attempt to cancel `LIMIT` or `STOP` orders in `FILLED` state will be rejected.
`ORDER_CANCELLATION.REJECTED` webhook will be sent in cases like that (see also [API Reference](/api/orders/order_cancellation_event)).