Account
Fills
Your executions as they happen, with the fee, and on Polymarket their settlement state.
WSSawait stream.watch_my_trades(market_ids=None)SDK stream · your process · venue credentials
Self-hosted. Opened from your own process straight to the venue. Nothing here runs on Synpath's servers.
Each event carries a Fill in the YES price. On Polymarket the same fill id arrives again as settlement moves from matched to confirmed or failed; act on confirmed.
Venues
| Venue | Support | Notes |
|---|---|---|
| Polymarket | Supported | Fills with settlement state. |
| Kalshi | Supported | |
| Polymarket US | Supported | Fills arrive as executions on the order subscription. |
| Opinion | Supported | Once the chain confirms the match; a failed one arrives failed. |
Parameters
| Name | Type | Description |
|---|---|---|
market_ids | list[str] | None | Only these markets. Omit for every market. |
FillEvent
One of your orders traded.
| Name | Type | Description |
|---|---|---|
venue | string | Which venue the event came from. |
received_at | integer | When this process received it, ms since epoch. |
fill | Fill | The fill, as in the REST API. settlement is matched, confirmed or failed. |
import asyncio
from synpath import PolymarketTrading, PolymarketUserStream, load_credentials, require
trading = PolymarketTrading(require("polymarket", load_credentials()))
stream = PolymarketUserStream(trading=trading) # derives the CLOB credentials
from synpath import FillEvent
async def main():
async with stream:
await stream.watch_my_trades()
async for event in stream:
if isinstance(event, FillEvent) and event.fill.settlement == "confirmed":
print(event.fill.market_id, event.fill.side, event.fill.price, event.fill.amount)
asyncio.run(main())FillEvent
{
"venue": "polymarket",
"received_at": 1790077592174,
"fill": {
"id": "TRADE_ID",
"order_id": "0xorder",
"market_id": "polymarket:2252244",
"side": "buy",
"price": "0.42",
"amount": "4",
"fee": null,
"liquidity": "taker",
"settlement": "matched",
"timestamp": 1789655011496,
"…": "the full Fill"
}
}
