Account
Balances
Cash balance changes on the account.
WSSawait stream.watch_balance()SDK stream · your process · venue credentials
Self-hosted. Opened from your own process straight to the venue. Nothing here runs on Synpath's servers.
Polymarket US only. Kalshi and Polymarket publish no balance channel; read balances over REST there.
Venues
| Venue | Support | Notes |
|---|---|---|
| Polymarket | Not offered | |
| Kalshi | Not offered | |
| Polymarket US | Supported | PolymarketUSPrivateStream. |
| Opinion | Not offered |
BalanceEvent
The balance changed.
| Name | Type | Description |
|---|---|---|
venue | string | Which venue the event came from. |
received_at | integer | When this process received it, ms since epoch. |
balance | Balance | The balance, as in the REST API. |
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 BalanceEvent
async def main():
async with stream:
await stream.watch_balance() # Polymarket US only
async for event in stream:
if isinstance(event, BalanceEvent):
print(event.balance.total, event.balance.available)
asyncio.run(main())BalanceEvent
{
"venue": "polymarket_us",
"received_at": 1790077592174,
"balance": {
"currency": "USD",
"total": "100.00",
"available": "99.80",
"locked": "0.20",
"…": "the full Balance"
}
}
