Buckets
Get bucket position
Your position across the members, netted in bucket terms.
GET/buckets/{bucket_id}/positionself-hosted · access token · view
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.
A flipped member's position is negated before it is added: short YES on a listing worded the other way round is long the bucket. members shows each listing's own position beside its bucket-terms contribution, so the net can be traced.
Path parameters
| Name | Type | Description |
|---|---|---|
bucket_id | string | The bucket's id, or its market id bucket:<id>. |
Query parameters
| Name | Type | Description |
|---|---|---|
book | string | Only this strategy book. Default: every book. |
Response
The netted position.
from synpath import Client
client = Client(server="http://127.0.0.1:8000") # your self-hosted server (synpath serve)
position = await client.fetch_bucket_position("<bucket_id>")
print(position.side, position.contracts, position.entry_price)200
{
"bucket_id": "3f2a9c1e5b7d4e0a8c6f1b2d9e4a7c30",
"name": "Fed cut in September",
"book": "alpha",
"contracts": "120",
"side": "long",
"entry_price": "0.4117",
"realized": "0",
"fees": "1.84",
"members": [
{
"market_id": "kalshi:KXFEDDECISION-26SEP-C25",
"venue": "kalshi",
"book": "alpha",
"account": "kalshi:main",
"flip": false,
"contracts": "70",
"bucket_contracts": "70",
"entry_price": "0.41",
"mark": null
},
{
"market_id": "polymarket:2252244",
"venue": "polymarket",
"book": "alpha",
"account": "polymarket:main",
"flip": true,
"contracts": "-50",
"bucket_contracts": "50",
"entry_price": "0.414",
"mark": null
}
]
}
