Account
Orders
Your orders as the venue reports each change: accepted, resting, filled, cancelled.
WSSawait stream.watch_orders(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 the full Order as the venue now sees it, on the YES leg, with native naming the venue's own event. Needs the venue's credentials.
No venue replays what you missed while disconnected. A reconnect on a stream with private subscriptions emits StreamStatusEvent(state="connected", reconcile_required=True): read your open orders over REST before trusting the stream again.
Venues
| Venue | Support | Notes |
|---|---|---|
| Polymarket | Supported | PolymarketUserStream, with CLOB credentials or a PolymarketTrading to derive them. |
| Kalshi | Supported | KalshiStream, the same connection as market data. |
| Polymarket US | Supported | PolymarketUSPrivateStream. Sends a snapshot of open orders first. |
| Opinion | Supported | OpinionUserStream, per market: the venue has no all-markets subscription. |
Parameters
| Name | Type | Description |
|---|---|---|
market_ids | list[str] | None | Only these markets. Omit for every market on the account. |
OrderEvent
One of your orders changed.
| Name | Type | Description |
|---|---|---|
venue | string | Which venue the event came from. |
received_at | integer | When this process received it, ms since epoch. |
order | Order | The order, as in the REST API. |
native | string | null | The venue's event name: PLACEMENT, UPDATE, CANCELLATION, … |
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 OrderEvent
async def main():
async with stream:
await stream.watch_orders()
async for event in stream:
if isinstance(event, OrderEvent):
o = event.order
print(o.id, o.status, o.filled, o.remaining)
asyncio.run(main())OrderEvent
{
"venue": "polymarket",
"received_at": 1790077592174,
"native": "UPDATE",
"order": {
"id": "0xorder",
"market_id": "polymarket:2252244",
"side": "buy",
"type": "limit",
"status": "open",
"price": "0.42",
"amount": "10",
"filled": "4",
"remaining": "6",
"…": "the full Order"
}
}
