Synpath
Buckets

Place an order on a bucket

One market order, routed across the members at the best prices net of fees.

POST/ordersself-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, with market_id set to bucket:<id> and type set to market. price is the worst price you accept. side and price are in bucket terms: buy at 0.42 buys the bucket's YES paying no more than 0.42, which on a flipped member is its NO at no more than 0.58.

An order on a bucket is a market order: it takes what the members offer, at or better than price, and does not sit on the book at that price waiting for sellers. The engine splits the order into one leg per venue, re-plans as legs fill, books move or legs are pulled, and never lets the legs add up to more than amount. See Buckets for how the split is decided.

The order comes back with held_by: "engine" and one id for the whole order. Follow it with Get an order on a bucket, which breaks the fills down by venue.

Request body

NameTypeDescription
market_idstringbucket:<id>.
sidestringbuy (the bucket's YES) or sell (its NO).
amountdecimalContracts, across every venue.
typestringmarket. A limit order on a bucket is refused.
pricedecimalThe worst price you accept, in bucket terms. No part is sent at a worse price net of fees.
bookstringThe strategy book; the position rolls up under it.
client_order_id, account, trader, tags, notesAs on a plain order.

Routing parameters

Optional, under params.

NameTypeDescription
params.min_stay_snumber
default 0
Seconds a leg rests before it may be moved to another price or venue.
params.max_roundsintegerRe-allocations that moved a leg, after which the order stops.
params.max_age_snumberSeconds from acceptance, after which the order stops.
params.precisionobjectPer market: tick, min_amount, amount_step, whole_contracts, overriding the venue's published rules.

Response

The order, held by the engine. Status 201. The caller needs trade on every member venue; an unknown bucket answers 404; an archived one, a limit order or a missing price answers 400.

from synpath import Client, OrderRequest

client = Client(server="http://127.0.0.1:8000")
order = await client.create_order(OrderRequest(
    market_id="bucket:<bucket_id>", side="buy", amount=200, type="market", price="0.42",  # worst price
    book="alpha", params={"min_stay_s": 5, "max_rounds": 20},
))
print(order.id, order.status)
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": "open",
  "held_by": "engine",
  "price": "0.42",
  "stop_price": null,
  "amount": "200",
  "filled": "0",
  "remaining": "200",
  "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": {}
}