Cancel an order by marking it invalid with a timestamp.
deprecated
The successful deletion might not prevent solvers from settling the order.
Authentication must be provided by providing an
EIP-712 signature of an
OrderCancellation(bytes orderUid) message.
DELETE
/
api
/
v1
/
orders
/
{UID}
Cancel an order by marking it invalid with a timestamp.
curl --request DELETE \
--url https://api.cow.fi/mainnet/api/v1/orders/{UID} \
--header 'Content-Type: application/json' \
--data '
{
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
'import requests
url = "https://api.cow.fi/mainnet/api/v1/orders/{UID}"
payload = { "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
signature: '0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
})
};
fetch('https://api.cow.fi/mainnet/api/v1/orders/{UID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cow.fi/mainnet/api/v1/orders/{UID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'signature' => '0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cow.fi/mainnet/api/v1/orders/{UID}"
payload := strings.NewReader("{\n \"signature\": \"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.cow.fi/mainnet/api/v1/orders/{UID}")
.header("Content-Type", "application/json")
.body("{\n \"signature\": \"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cow.fi/mainnet/api/v1/orders/{UID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"signature\": \"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}"
response = http.request(request)
puts response.read_body{
"errorType": "InvalidSignature",
"description": "<string>"
}Path Parameters
Unique identifier for the order: 56 bytes encoded as hex with 0x
prefix.
Bytes 0..32 are the order digest, bytes 30..52 the owner address and
bytes 52..56 the expiry (validTo) as a uint32 unix epoch timestamp.
Example:
"0xff2e2e54d178997f173266817c1e9ed6fee1a1aae4b43971c53b543cffcc2969845c6f5599fbb25dbdd1b9b013daf85c03f3c63763e4bc4a"
Body
application/json
Signed OrderCancellation
EIP-712 signature of struct
OrderCancellation(bytes orderUid) from the order's owner.
Response
Order cancelled.
Last modified on March 17, 2026
Was this page helpful?
Cancel an order by marking it invalid with a timestamp.
curl --request DELETE \
--url https://api.cow.fi/mainnet/api/v1/orders/{UID} \
--header 'Content-Type: application/json' \
--data '
{
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
'import requests
url = "https://api.cow.fi/mainnet/api/v1/orders/{UID}"
payload = { "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
signature: '0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
})
};
fetch('https://api.cow.fi/mainnet/api/v1/orders/{UID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cow.fi/mainnet/api/v1/orders/{UID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'signature' => '0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cow.fi/mainnet/api/v1/orders/{UID}"
payload := strings.NewReader("{\n \"signature\": \"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.cow.fi/mainnet/api/v1/orders/{UID}")
.header("Content-Type", "application/json")
.body("{\n \"signature\": \"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cow.fi/mainnet/api/v1/orders/{UID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"signature\": \"0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n}"
response = http.request(request)
puts response.read_body{
"errorType": "InvalidSignature",
"description": "<string>"
}