Create a bucket
Define one instrument from the same proposition listed on several venues.
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.
Send the member markets and, for each, flip: false when that listing's YES is the bucket's YES, true when its YES is the opposite outcome. The server assigns the id and returns the stored bucket. Place orders on it by naming bucket:<id> as the market_id; see Place an order on a bucket.
The caller needs trade on every member venue, and this server must hold credentials for each of them. Whether the members describe the same question is not checked: use Match market to find them, and review the list before trading it.
Request body
| Name | Type | Description |
|---|---|---|
book | string | The strategy book the bucket belongs to, as on orders. |
name | string | A label for people. Not unique. |
members | array | Two or more {market_id, flip} objects. Each market_id is a Synpath id on a venue this server trades, listed once. |
members[].flip | booleandefault false | true when this listing's YES is the opposite of the bucket's proposition. |
Response
The stored bucket. Status 201. A list with fewer than two members, a repeated market, or a venue this server does not trade answers 400.
from synpath import BucketMember, Client
client = Client(server="http://127.0.0.1:8000") # your self-hosted server (synpath serve)
bucket = await client.create_bucket(book="alpha", name="Fed cut in September", members=[
BucketMember(market_id="kalshi:KXFEDDECISION-26SEP-C25"),
BucketMember(market_id="polymarket:2252244", flip=True),
])
print(bucket.market_id) # bucket:3f2a9c1e...{
"id": "3f2a9c1e5b7d4e0a8c6f1b2d9e4a7c30",
"book": "alpha",
"name": "Fed cut in September",
"members": [
{
"market_id": "kalshi:KXFEDDECISION-26SEP-C25",
"flip": false
},
{
"market_id": "polymarket:2252244",
"flip": true
}
],
"status": "active",
"created_ms": 1790265600000,
"updated_ms": 1790265600000
}
