#!/bin/sh
# cancelOrderByClientId: Cancel an order by your id. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS -X DELETE "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/orders?client_order_id=s1-0001" \
-H "Authorization: Bearer $TRENDLINE_API_KEY""""cancelOrderByClientId: Cancel an order by your id. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.delete(f"{BASE}/public/v1/orders", params={"client_order_id": "s1-0001"},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
print(r.status_code, r.json())
// cancelOrderByClientId: Cancel an order by your id. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/orders?client_order_id=s1-0001`, { method: "DELETE", headers: { Authorization: `Bearer ${KEY}` } });
console.log(r.status, await r.json());
{
"avg_price": null,
"cancelled_size": "10",
"client_order_id": "s1-0001",
"created_at": "2026-10-06T05:59:59+00:00",
"filled_size": "0",
"id": "ord_6702291f8e1c2a0012ab34cd",
"notional_reserved": "4.20",
"outcome": "yes",
"price": "0.42",
"remaining_size": "0",
"side": "buy",
"size": 10,
"status": "cancelled",
"time_in_force": "gtc",
"type": "limit",
"universal_id": "mk-btc-100k-2026",
"updated_at": "2026-10-06T06:00:00+00:00",
"venue": "polymarket",
"venue_market_id": "bitcoin-above-100k-on-december-31",
"venue_market_title": "Bitcoin above $100,000 on December 31?",
"venue_order_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Cancel an order by your id
#!/bin/sh
# cancelOrderByClientId: Cancel an order by your id. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS -X DELETE "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/orders?client_order_id=s1-0001" \
-H "Authorization: Bearer $TRENDLINE_API_KEY""""cancelOrderByClientId: Cancel an order by your id. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.delete(f"{BASE}/public/v1/orders", params={"client_order_id": "s1-0001"},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
print(r.status_code, r.json())
// cancelOrderByClientId: Cancel an order by your id. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/orders?client_order_id=s1-0001`, { method: "DELETE", headers: { Authorization: `Bearer ${KEY}` } });
console.log(r.status, await r.json());
{
"avg_price": null,
"cancelled_size": "10",
"client_order_id": "s1-0001",
"created_at": "2026-10-06T05:59:59+00:00",
"filled_size": "0",
"id": "ord_6702291f8e1c2a0012ab34cd",
"notional_reserved": "4.20",
"outcome": "yes",
"price": "0.42",
"remaining_size": "0",
"side": "buy",
"size": 10,
"status": "cancelled",
"time_in_force": "gtc",
"type": "limit",
"universal_id": "mk-btc-100k-2026",
"updated_at": "2026-10-06T06:00:00+00:00",
"venue": "polymarket",
"venue_market_id": "bitcoin-above-100k-on-december-31",
"venue_market_title": "Bitcoin above $100,000 on December 31?",
"venue_order_id": "0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Authorization: Bearer tl_live_…
Query Parameters
your id for the order, as sent when placing it
^[A-Za-z0-9_-]{1,64}$Response
Successful Response
your id for this order
when we accepted the order, ISO 8601
our id for the order, ord_ and 24 hex digits; it exists from the moment we accept the request, so an order whose status is unknown has one too
^ord_[0-9a-f]{24}$the order's maximum loss counted against your limits, USD as a decimal string
the venue's own outcome label
the limit price of outcome, a decimal string
buy or sell, the action on outcome at price
buy, sell whole contracts ordered
unknown: the venue's answer was not received; retry with the same client_order_id or read GET /public/v1/orders/{id}, never send a new id. On a venue that cannot prove an order's absence it may stay unknown: check the venue before trading the same intent again
open, filled, partially_filled, cancelled, unknown, not_placed as requested
gtc, ioc the order type; only limit
"limit"the market universal id holding the leg; null when no market lists it
when we last recorded a change to the order, ISO 8601
the venue the order was sent to
kalshi, polymarket, limitless, predictfun the venue's own market id the order went to
the average fill price of outcome, 0..1 as a decimal string, when the venue reported one
contracts this request removed from the book, a decimal string (0 when the order was already final); null when the venue's answer did not say
contracts filled, an exact decimal string; null while the status is unknown
contracts still resting, an exact decimal string; null while the status is unknown
the leg's title on the venue, when our mirror holds it
the venue's order id; null while the status is unknown and for an order that was never placed