skillfed

polymarket-client

Official Python client for Polymarket

polymarket-client v0.6.0 77.5K downloads/30d#14,520 on PyPI100
Permissive license MIT Active released

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-client

uv

uv add polymarket-client

poetry

poetry add polymarket-client

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Typing :: Typed

Tags

polymarket python clientprediction market trading sdkweb3 market data apipolymarket account managementasync market trading librarypolymarket position mergingethereum prediction markets
prediction-marketsweb3-tradingasync-client

More WWW/HTTP packages