curl --request POST \
--url https://github.com/openpx-trade/openpx/v1/orders/cancel_order \
--header 'Content-Type: application/json' \
--data '
{
"order_id": "<string>"
}
'import requests
url = "https://github.com/openpx-trade/openpx/v1/orders/cancel_order"
payload = { "order_id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({order_id: '<string>'})
};
fetch('https://github.com/openpx-trade/openpx/v1/orders/cancel_order', 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://github.com/openpx-trade/openpx/v1/orders/cancel_order",
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([
'order_id' => '<string>'
]),
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://github.com/openpx-trade/openpx/v1/orders/cancel_order"
payload := strings.NewReader("{\n \"order_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://github.com/openpx-trade/openpx/v1/orders/cancel_order")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://github.com/openpx-trade/openpx/v1/orders/cancel_order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"filled": 123,
"id": "<string>",
"market_ticker": "<string>",
"outcome": "<string>",
"price": 123,
"side": "buy",
"size": 123,
"status": "pending",
"fee": null,
"updated_at": null
}{
"kind": "Authentication",
"message": "<string>"
}cancel_order
Cancel one open order by its globally-unique order_id.
curl --request POST \
--url https://github.com/openpx-trade/openpx/v1/orders/cancel_order \
--header 'Content-Type: application/json' \
--data '
{
"order_id": "<string>"
}
'import requests
url = "https://github.com/openpx-trade/openpx/v1/orders/cancel_order"
payload = { "order_id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({order_id: '<string>'})
};
fetch('https://github.com/openpx-trade/openpx/v1/orders/cancel_order', 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://github.com/openpx-trade/openpx/v1/orders/cancel_order",
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([
'order_id' => '<string>'
]),
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://github.com/openpx-trade/openpx/v1/orders/cancel_order"
payload := strings.NewReader("{\n \"order_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://github.com/openpx-trade/openpx/v1/orders/cancel_order")
.header("Content-Type", "application/json")
.body("{\n \"order_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://github.com/openpx-trade/openpx/v1/orders/cancel_order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"filled": 123,
"id": "<string>",
"market_ticker": "<string>",
"outcome": "<string>",
"price": 123,
"side": "buy",
"size": 123,
"status": "pending",
"fee": null,
"updated_at": null
}{
"kind": "Authentication",
"message": "<string>"
}order_id.Body
Response
Success.
An order on the unified surface.
Order creation time (UTC) (e.g. "2026-04-25T12:00:00Z").
Cumulative filled size in contracts (e.g. 25.0).
Globally-unique exchange order id (e.g. "a1b2c3d4-...").
Unified market ticker the order belongs to (e.g. "KXBTCD-25APR1517").
Outcome label as published by the exchange (e.g. "Yes", "No", or a categorical label).
Limit price as YES probability in (0, 1) (e.g. 0.62).
Order direction. Options: buy, sell.
buy, sell Order size in contracts (e.g. 100.0).
Order lifecycle state. Options: pending, open, filled, partially_filled, cancelled, rejected.
pending, open, filled, partially_filled, cancelled, rejected Volume-weighted per-contract fee in quote dollars; null on Polymarket and on unfilled orders.
Last update time (UTC); null if untouched since creation.

