---
title: "Cancel Order"
method: POST
path: "/defi/v1/dex/cancelorder"
tags: ["dex"]
---

# Cancel Order

`POST /defi/v1/dex/cancelorder`

## Request

- Base URL: `https://svc.blockdaemon.com`
- URL: `https://svc.blockdaemon.com/defi/v1/dex/cancelorder`
- Auth: API key in header `X-API-Key`

Generates an unsigned limit-order cancellation message, which must be signed using the Blockdaemon SDK for final on-chain execution. This endpoint provides EIP-712 domain data, type definitions, and a structured message (chain ID, maker address, and order IDs) to securely cancel pending orders on the decentralized exchange.

> 💡 
**Compute Unit Value:** `15` (Fixed)

## Request body

- DexCancelorderRequest: The request body for a /defi/v1/dex/cancelorder
  - `dexId` '2200' | '2201' | '2202' | '2203' | '2204' | '2205' | '2206': The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-dexs-protocols).
  - `orderId` string[], required: An array containing the Order ID(s) of the limit orders to be canceled.
  - `from` string, required: The public address of the user requesting the cancellation.
  - `enableFee` boolean: Flag to include a basis points fee transaction alongside the main transaction when set to true.

## Response `200`

Successful response

- object
  - `status` integer
  - `msg` string
  - `data` object

---

[API](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api.md) - [All operations](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/revisions/ec053b7c8041?raw)
