polymarket-client
Official Python client for Polymarket
What it is and what it does
polymarket-client is the official Python SDK for Polymarket, a prediction market platform. It provides both synchronous and asynchronous clients to interact with Polymarket's API, supporting workflows from simple market data queries to authenticated trading and wallet operations. The SDK abstracts away the complexity of HTTP requests, web3 signing, and session management, offering a coherent interface for developers building on Polymarket.
The package is built on standard web3 libraries (eth-abi, eth-account, eth-utils) for cryptographic operations and httpx/websockets for network I/O. It supports batch operations like merging multiple market or combo positions, and includes both public (unauthenticated) and authenticated client modes. The SDK is in beta (0.x versioning) and explicitly marks Perps APIs as experimental, meaning breaking changes are possible in minor releases, though the maintainers aim to provide deprecation paths.
Use it for:
- Fetch real-time market data and order books from Polymarket without authentication for public analysis or dashboards
- Build automated trading bots that place orders, manage positions, and monitor account state using authenticated client workflows
- Batch merge multiple market positions by condition ID, market ID, or position ID to consolidate holdings
- Stream live market updates and position changes using async client subscriptions for reactive applications
- Integrate Polymarket trading into larger Python applications that already use web3 libraries like eth-account
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Official Python SDK for Polymarket that provides a unified interface to query public market data, manage authenticated accounts, execute trades, and handle wallet workflows on the Polymarket prediction market platform.
Yes. The SDK is actively maintained (released 1 day ago), has no known vulnerabilities, and offers low installation friction. It is the official client for Polymarket, making it the natural choice for Python developers building on the platform. The main caveat is that 0.x versioning means breaking changes are possible in minor releases, and Perps APIs are explicitly experimental—suitable for production use of core trading workflows but warrant caution if relying on newer features.
Install
polymarket-client on PyPI
pip
pip install polymarket-clientuv
uv add polymarket-clientpoetry
poetry add polymarket-clientInstalling polymarket-client
Before you install
Low friction install with a pure-Python wheel distribution. Actively maintained with a release just 1 day old and 100 repository stars. Dependencies are standard web3 and HTTP libraries (eth-abi, eth-account, eth-utils, httpx, pydantic, websockets) with no compiled components.
License in practice
MIT license is permissive and imposes no significant restrictions on use, modification, or distribution. Suitable for commercial and private projects without copyleft obligations.
Quickstart
from polymarket import PublicClient, Market
with PublicClient() as client:
market: Market = client.get_market(
url="https://polymarket.com/event/example-market"
)
Requires Python 3.11 or later. Authenticated workflows require a Polymarket private key or builder API key.
Verify before relying
- Whether the SDK's experimental Perps APIs are stable enough for production use despite the breaking-change caveat on 0.x releases
- Real-world latency and throughput characteristics for batch position merges and streaming subscriptions
- Completeness of error handling and retry logic for network failures or rate limits
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — eth-abi, eth-account, eth-utils, httpx, msgpack, pydantic, websockets |
| Maintenance | actively maintained — 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,458/month — #14,520 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: polymarket_client-0.6.0-py3-none-any.whl
Keywords: client, polymarket, prediction-markets, trading, web3
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
py-builder-relayer-clientA Python client library for submitting…
permissive · top 15,000 on PyPI
py-clob-clientPython client library for trading on…
permissive · top 15,000 on PyPI
py-clob-client-v2Python client library for placing and managing…
permissive · top 15,000 on PyPI
snaptrade-python-sdkPython SDK client for SnapTrade's brokerage…
permissive · top 15,000 on PyPI
py-builder-signing-sdkGenerates cryptographically signed HTTP headers…
permissive · top 15,000 on PyPI
py-order-utilsGenerates and cryptographically signs orders…
permissive · top 5,000 on PyPI
hyperliquid-python-sdkPython SDK for trading on the Hyperliquid…
permissive · top 15,000 on PyPI
cdp-sdkPython client library for the Coinbase…
permissive · top 15,000 on PyPI
kiteconnectOfficial Python client for the Kite Connect…
permissive · top 15,000 on PyPI
python-binanceUnofficial Python wrapper for the Binance…
permissive · top 15,000 on PyPI