probalytics Python client is a convenience layer over the ClickHouse database. It handles the connection, builds queries for you, and returns results as Polars or pandas dataframes — or as typed Python models.
The client connects to ClickHouse using the same credentials as the SQL Guide. Create ClickHouse credentials in app.probalytics.io → ClickHouse Credentials.
Installation
Connecting
- From credentials
- From environment
- Context manager
Markets
Query market metadata as typed models or as a dataframe.Fills
Fetch trade fills. Scope them to a market object, a market ID, or a platform-native ID:fills_models:
Orderbook snapshots
Full bid/ask depth per outcome, captured when the book changes. Requires an Orderbook or Custom ClickHouse tier.indexed_at, hash, state, continuity, and path_index.
- Order rows within one outcome by
timestamp,path_index, thenindexed_at. - Keep
INTERMEDIATErows to see every retained book state; filter toVERIFIEDfor orderbooks reconstructed without gaps. - A
RESETrow is a fresh starting point. Do not calculate changes from the preceding row or forward-fill across it. - Do not deduplicate different states by timestamp alone.
Choosing Polars or pandas
Methods return Polars by default. Set the backend globally when connecting, or override per call:"polars" and "pandas".
Custom SQL
Run arbitrary parameterized queries and get a dataframe back:Supported filters
Every filter accepts a single value or a list of values.
Resources
Source & README
Package source and usage guide (Apache-2.0)
SQL Guide
Table schemas and query examples