Predictefy Docs
Browse documentation

Python SDK

The official synchronous Python client and CLI for the normalized Predictefy API.

The predictefy package is the official synchronous Python 3.10+ REST client. It uses one runtime dependency (httpx) and covers normalized venue data, history, the complete client.router REST surface, discrepancy qualification, and Trader Intelligence. Catalog and order-book reads cover all 17 venues, including PredictStreet; Trader Intelligence is served on a narrower native-venue set. pascal, xo, and pred are not data-only venues — each has an execution lane, in its own state — and each one does carry Trader Intelligence: all three serve wallet-attributed trades and appear in the scored-trade/smart-money feed, while holders, leaderboards, and wallet profiles stay unsupported. Actual verbs remain capability-qualified by venue.

Quickstart

pip install predictefy
from predictefy import Predictefy

client = Predictefy(api_key="pk_...")

markets = client.polymarket.fetch_markets({"limit": 5, "query": "fed"})
clusters = client.fetch_clusters({"limit": 20})
smart_money = client.fetch_smart_money({"venue": "hyperliquid", "limit": 20})

Change the venue client without changing the normalized method shape:

client.kalshi.fetch_order_book("KXFED-26MAR-T4.00")
client.exchange("hyperliquid").fetch_trades("BTC-100K")
client.router.fetch_markets({"query": "election", "status": "active"})
client.polymarket.fetch_ohlcv(
    {"outcomeId": "123", "resolution": "1h", "limit": 500}
)

List methods return a PageList: an ordinary list with .page, .meta, and .next_cursor. iterate_markets follows snapshot-safe cursors for you.

Trader Intelligence

Trader support is capability-qualified by venue:

trades = client.polymarket.fetch_trader_trades("market-id", {"limit": 50})
holders = client.polymarket.fetch_holders("market-id", {"limit": 50})
leaders = client.hyperliquid.fetch_leaderboard({"by": "score", "limit": 50})
profile = client.hyperliquid.fetch_wallet_profile("0x...")

An unsupported upstream capability returns NOT_SUPPORTED; the client does not fabricate trader identity or venue data.

CLI

The PyPI package installs a predictefy console script:

export PREDICTEFY_API_KEY=pk_...

predictefy markets polymarket --limit 10 --q fed
predictefy discrepancies --limit 20 --live
predictefy clusters --limit 20

Add --json for raw JSON. The full verb list is markets <venue>, market <venue> <id>, discrepancies, clusters, and account <resource> <venue> [account-id].

Public execution and client-side signing support is capability-qualified separately; do not infer execution support from data coverage.