curl --request POST \
--url https://api.agg.market/execution/orders/{orderId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"cancelSignature": {
"signature": "<string>",
"timestamp": 1
}
}
'import requests
url = "https://api.agg.market/execution/orders/{orderId}/cancel"
payload = { "cancelSignature": {
"signature": "<string>",
"timestamp": 1
} }
headers = {
"x-app-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({cancelSignature: {signature: '<string>', timestamp: 1}})
};
fetch('https://api.agg.market/execution/orders/{orderId}/cancel', 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.agg.market/execution/orders/{orderId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cancelSignature' => [
'signature' => '<string>',
'timestamp' => 1
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-app-id: <api-key>"
],
]);
$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.agg.market/execution/orders/{orderId}/cancel"
payload := strings.NewReader("{\n \"cancelSignature\": {\n \"signature\": \"<string>\",\n \"timestamp\": 1\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.agg.market/execution/orders/{orderId}/cancel")
.header("x-app-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cancelSignature\": {\n \"signature\": \"<string>\",\n \"timestamp\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/execution/orders/{orderId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cancelSignature\": {\n \"signature\": \"<string>\",\n \"timestamp\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "<string>",
"orderIds": [
"<string>"
],
"status": "cancelled"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Cancel an order
For Hyperliquid self-custody, cancelSignature carries venue, the single-order cancel action, a fresh millisecond nonce and its r/s/v signature from the EOA or approved client-held agg agent. For Polymarket, it carries a ClobAuth signature and timestamp. Cancels a queued managed order or an active open limit order. Terminal orders cannot be cancelled. A self-custody limit order that has already been submitted to the venue needs cancelSignature from its signing wallet; without it the call returns 409 and the order is unchanged. One whose submission has not started yet can be cancelled without a signature. A 200 response carrying status: "cancel_pending" for a self-custody order is not final: continue polling while AGG reconciles venue state. An order whose submission is already in progress also returns 409 — retry once it is open.
curl --request POST \
--url https://api.agg.market/execution/orders/{orderId}/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"cancelSignature": {
"signature": "<string>",
"timestamp": 1
}
}
'import requests
url = "https://api.agg.market/execution/orders/{orderId}/cancel"
payload = { "cancelSignature": {
"signature": "<string>",
"timestamp": 1
} }
headers = {
"x-app-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({cancelSignature: {signature: '<string>', timestamp: 1}})
};
fetch('https://api.agg.market/execution/orders/{orderId}/cancel', 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.agg.market/execution/orders/{orderId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cancelSignature' => [
'signature' => '<string>',
'timestamp' => 1
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-app-id: <api-key>"
],
]);
$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.agg.market/execution/orders/{orderId}/cancel"
payload := strings.NewReader("{\n \"cancelSignature\": {\n \"signature\": \"<string>\",\n \"timestamp\": 1\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.agg.market/execution/orders/{orderId}/cancel")
.header("x-app-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cancelSignature\": {\n \"signature\": \"<string>\",\n \"timestamp\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/execution/orders/{orderId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cancelSignature\": {\n \"signature\": \"<string>\",\n \"timestamp\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"quoteId": "<string>",
"orderIds": [
"<string>"
],
"status": "cancelled"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Your application ID. Required for all app-tier and user-tier routes.
JWT access token returned by POST /auth/verify. Required for user-tier routes.
Path Parameters
Body
Self-custody Polymarket limit orders only; omit it for managed orders. An EIP-712 signature by the order's signing wallet (the signingAddress the order was placed with) over Polymarket's CLOB L1 auth message: domain { name: "ClobAuthDomain", version: "1", chainId: 137 }, primary type ClobAuth with fields address (address), timestamp (string), nonce (uint256), message (string), where address is the signing wallet, timestamp is the timestamp below encoded as a decimal string, nonce is 0, and message is "This message attests that I control the given wallet". Ask the user to sign when they cancel. The signature is never persisted or logged. The CLOB credentials derived from it are used only for this request and are not stored.
- Option 1
- Option 2
Show child attributes
Show child attributes