Synpath
Orders

Amend an order

Change price, size, time in force or expiry in place.

PATCH/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.

Fields left out are left alone. queue_priority_preserved on the answer says whether the venue kept the order's place in the queue: Kalshi keeps it on a size decrease and loses it on a price change; Polymarket always loses it, because an edit there is a cancel and a new order.

Path parameters

NameTypeDescription
order_idstring

Request body

NameTypeDescription
pricedecimalNew YES price.
amountdecimalNew total size, contracts.
time_in_forcestring
expires_atintegerMilliseconds since epoch.
client_order_idstringIdempotency key for the edit itself, so a retried edit is not applied twice.

Response

The order after the edit.

from synpath import EditRequest

order = await client.edit_order(
    EditRequest(order_id=order.id, price="0.11", amount=3), venue="polymarket",
)
print(order.queue_priority_preserved)
200
{
  "id": "01a0afc0-46e8-7596-b183-1ff448331615",
  "client_order_id": "quickstart-1",
  "venue": "kalshi",
  "account": {
    "venue": "kalshi",
    "name": "desk-a",
    "subaccount": null
  },
  "market_id": "kalshi:KXELONMARS-99",
  "side": "buy",
  "type": "limit",
  "time_in_force": "gtc",
  "status": "open",
  "held_by": "venue",
  "price": "0.10",
  "stop_price": null,
  "amount": "5",
  "filled": "0",
  "remaining": "5",
  "average_price": null,
  "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": {}
}