Synpath
Buckets

Cancel an order on a bucket

Stop the order and pull every resting leg.

DELETE/orders/{order_id}self-hosted · access token · trade

Self-hosted. Served by synpath serve on your own machine or host, which must be running; the engine and its order types live there. Nothing on this page runs on Synpath's servers.

The same route as any order. Legs that already filled stay filled; the order finishes canceled with what it filled, and its report keeps the breakdown.

Path parameters

NameTypeDescription
order_idstringThe id the order was placed with.

Response

The order after the cancel.

from synpath import Client

client = Client(server="http://127.0.0.1:8000")     # your self-hosted server (synpath serve)
order = await client.cancel_order("<order_id>")
print(order.status, order.filled)
200
{
  "id": "5d0e9b2c4f7a4e1d9c3b8a6f2e1d0c9b",
  "client_order_id": "quickstart-1",
  "venue": "kalshi",
  "account": {
    "venue": "kalshi",
    "name": "desk-a",
    "subaccount": null
  },
  "market_id": "bucket:3f2a9c1e5b7d4e0a8c6f1b2d9e4a7c30",
  "side": "buy",
  "type": "market",
  "time_in_force": "gtc",
  "status": "canceled",
  "held_by": "engine",
  "price": "0.42",
  "stop_price": null,
  "amount": "200",
  "filled": "120",
  "remaining": "80",
  "average_price": "0.4117",
  "cost": null,
  "fee": null,
  "fee_currency": "USD",
  "last_fill_price": null,
  "last_fill_amount": null,
  "post_only": false,
  "reduce_only": false,
  "expires_at": null,
  "created_at": 1789655008000,
  "updated_at": 1789655008000,
  "parent_id": null,
  "queue_priority_preserved": null,
  "book": "alpha",
  "trader": "tester",
  "tags": {},
  "info": {}
}