---
title: "private/cancel_by_label"
method: POST
path: "/private/cancel_by_label"
tags: ["Orderbook"]
---

# private/cancel_by_label

`POST /private/cancel_by_label`

## Request

- Base URL: `https://api.derive.xyz/v3`
- URL: `https://api.derive.xyz/v3/private/cancel_by_label`
- Auth: API key in header `X-DeriveWallet` and API key in header `X-DeriveTimestamp` and API key in header `X-DeriveSignature`

Cancels a subaccount's open orders that carry the given client label, optionally scoped to a single instrument_name. When an instrument is supplied the call is acknowledged with the number of orders cancelled; without one it runs as a bulk fire-and-forget cancel and returns a -1 sentinel count. Requires any trade scope.

## Request body

- CancelByLabelRequest
  - `instrument_name` string, nullable
  - `label` string, required
  - `subaccount_id` integer, required

## Response `200`

Success

- CancelByLabelResponse
  - `cancelled_orders` integer, required

## Other responses

- `default`: JSON-RPC error (see Error Codes)

## Changes

- **2026-10-20** `0c500202be49`: 2 info
  - the endpoint scheme security `DeriveWallet AND DeriveTimestamp AND DeriveSignature` was added to the API
  - added the media type `application/json` for the response with the status `default`

[Operation history](https://skmtc.dev/lyra/apis/derive-v3-api/changes/private/cancel_by_label/post.md)

---

[API](https://skmtc.dev/lyra/apis/derive-v3-api.md) - [All operations](https://skmtc.dev/lyra/apis/derive-v3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lyra/apis/derive-v3-api/revisions/415f8a73b10c?raw)
