Cancel all of a user's orders in a specific market
curl --request DELETE \
--url https://api.limitless.exchange/orders/all/{slug} \
--header 'lmts-api-key: <api-key>'import requests
url = "https://api.limitless.exchange/orders/all/{slug}"
headers = {"lmts-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'lmts-api-key': '<api-key>'}};
fetch('https://api.limitless.exchange/orders/all/{slug}', 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.limitless.exchange/orders/all/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"lmts-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.limitless.exchange/orders/all/{slug}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("lmts-api-key", "<api-key>")
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.limitless.exchange/orders/all/{slug}")
.header("lmts-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/orders/all/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["lmts-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Orders canceled successfully",
"canceled": [
"611badac-8dfc-48a0-b09e-59654adea1c5"
],
"failed": [
{
"orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",
"reason": "ORDER_NOT_FOUND",
"message": "Order not found or already canceled"
}
]
}{
"message": "Orders canceled successfully",
"canceled": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"failed": [
{
"orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",
"reason": "ORDER_NOT_FOUND",
"message": "Order not found or already canceled"
}
]
}{
"message": [
{
"field": "orderIds",
"message": "orderIds should not be empty"
}
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"code": "trading_disabled",
"message": "Trading is currently disabled.",
"mode": "disabled",
"resumeAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}Trading
Cancel All Orders
DELETE
/
orders
/
all
/
{slug}
Cancel all of a user's orders in a specific market
curl --request DELETE \
--url https://api.limitless.exchange/orders/all/{slug} \
--header 'lmts-api-key: <api-key>'import requests
url = "https://api.limitless.exchange/orders/all/{slug}"
headers = {"lmts-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'lmts-api-key': '<api-key>'}};
fetch('https://api.limitless.exchange/orders/all/{slug}', 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.limitless.exchange/orders/all/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"lmts-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.limitless.exchange/orders/all/{slug}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("lmts-api-key", "<api-key>")
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.limitless.exchange/orders/all/{slug}")
.header("lmts-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.limitless.exchange/orders/all/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["lmts-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Orders canceled successfully",
"canceled": [
"611badac-8dfc-48a0-b09e-59654adea1c5"
],
"failed": [
{
"orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",
"reason": "ORDER_NOT_FOUND",
"message": "Order not found or already canceled"
}
]
}{
"message": "Orders canceled successfully",
"canceled": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"failed": [
{
"orderId": "b53f0e4b-1529-45cc-ad39-e27f4c6eab5a",
"reason": "ORDER_NOT_FOUND",
"message": "Order not found or already canceled"
}
]
}{
"message": [
{
"field": "orderIds",
"message": "orderIds should not be empty"
}
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"message": "<string>"
}{
"message": "<string>",
"error": "<string>",
"statusCode": 123
}{
"code": "trading_disabled",
"message": "Trading is currently disabled.",
"mode": "disabled",
"resumeAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}Cancel every LIVE order owned by the authenticated profile for a market or market group.
The required
slug path parameter accepts either a market slug or a group slug. For a group, cancellation fans out across all child markets and combines their results.
Authentication and delegation
Use a scoped API token with HMAC signing and thetrading scope. To cancel for a partner sub-account, add ?onBehalfOf=<subProfileId>; the target must belong to the authenticated partner and the token must also have delegated_signing. Include the query string in the HMAC-signed path.
Results
The operation is idempotent. If there are no LIVE orders to cancel, it returns200 OK with { "message": "Orders canceled successfully" } and omits canceled.
200 OKmeans all matching orders were cancelled, or there were no matching LIVE orders.207 Multi-Statusreturns both cancelled IDs and normalized failures across the market or group.400 Bad RequestwithFailed to cancel any ordersmeans every attempted cancellation failed.404 No entity found by slugmeans the slug matches neither a market nor a group.
ORDER_NOT_FOUND with Order not found or already canceled, or UNKNOWN_ERROR with Failed to cancel order. Cancellation remains available in normal, post_only, and cancel_only; disabled returns 425 Too Early.Authorizations
Scoped API token with HMAC-SHA256 signing. Requires three headers: lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature (Base64-encoded HMAC). See Authentication docs for details.
Query Parameters
Partner sub-account profile ID. Requires delegated_signing in addition to trading.
Required range:
x >= 1Example:
326
Response
All orders successfully cancelled
Confirmation message for cancelling all orders
Example:
"Orders canceled successfully"
Array of successfully cancelled order IDs
Example:
["611badac-8dfc-48a0-b09e-59654adea1c5"]
Array of orders that failed to cancel with reasons
Show child attributes
Show child attributes