py-clob-client

Polymarket's own Python CLOB client - archived, and declared non-functional by its README.

by Polymarket

Last updated

US persons
Yes
Taker fee
None
Settlement
Crypto
Liquidity
CLOB

What it is

Do not start here. This package is archived and Polymarket says it does not work: the README opens with a warning that the repository is no longer maintained, that the client is no longer functional, and that it should not be used for new or existing integrations, followed by "Please migrate to our new unified SDK". The migration target is polymarket-client on PyPI, developed in Polymarket/py-sdk. Migrating is not optional - nothing here is going to be fixed.

What it was: a Python client for the Polymarket Central Limit Order Book, published by Polymarket itself - the repository sits in the Polymarket GitHub organisation and the PyPI package names Polymarket Engineering as its author. It was the reference way to place orders on Polymarket from Python, and it is what most third-party Polymarket bots were built on. The card stays in the catalogue because the package is still installable, still the answer most search results give, and still the thing a reader will find first - and because the PyPI page carries no warning at all, so pip install py-clob-client succeeds today with nothing to tell you.

What it did, while it worked - the method inventory is still readable in the archived source:

  • Order signing. EIP-712 typed-data signing of orders in py_clob_client/signing/eip712.py, with HMAC request signing for the authenticated Level 2 endpoints in signing/hmac.py. Three signature types were supported - a plain EOA, an email or Magic wallet, and a browser-wallet proxy - because on Polymarket the key that signs is often not the address that holds the funds.
  • API credentials. create_api_key, derive_api_key and create_or_derive_api_creds derived the Level 2 credential set from the wallet key, plus read-only key management.
  • Market data. Midpoints, prices, spreads, tick sizes, order books in bulk, last trade prices and the simplified market listing.
  • Orders. create_order and create_market_order with GTC, GTD, FOK and FAK order types, post_order and post_orders, cancel, cancel_orders, cancel_all and cancel_market_orders, plus a heartbeat endpoint.
  • Balance and allowance. get_balance_allowance and update_balance_allowance, which read and refresh the CLOB's own accounting of what your address has available.
  • RFQ. A separate request-for-quote client under py_clob_client/rfq/.

Availability

The package itself has no geography. It installs from PyPI anywhere pip works, needs Python 3.9.10 or newer, and its read-only calls require no account, no key and no KYC - ClobClient(host) with no credentials answers midpoint, price and order-book queries. The us_persons and kyc_required flags on this card describe the library, not the exchange behind it.

Who may actually hold a funded Polymarket position, and under what terms, is a question about Polymarket rather than about this package, and it is answered on the venue's own card. A library imposes no jurisdiction and grants none.

Pricing

Free, MIT-licensed, nothing to buy and nothing metered. The GitHub repository and the PyPI classifier agree on MIT.

The library charges nothing; what a fill costs is Polymarket's fee schedule, which the client merely read back through get_fee_rate_bps. Those numbers belong on the venue's card, not here.

Markets & resolution

A client resolves nothing. Orders placed through it reached Polymarket's CLOB and settled in USDC on Polygon like any other order on that book, and who decides the outcome is entirely the venue's question - this package neither read the resolution nor had an opinion about it. The subject row on this card is blank on purpose - the questions reachable through the client are whatever Polymarket lists, the library narrowed nothing, and we have not surveyed that list for this card.

Two details of the data model mattered in practice. Prices were dollars from 0.00 to 1.00 per share, so a "price" here is a probability. And the tradeable unit was a token ID, one per outcome, which had to come from Polymarket's Gamma markets API rather than from this client - the CLOB client took token IDs and did not discover them. See polymarket-gamma-api for the discovery half and polymarket-clob-api for the endpoints this package wrapped.

Integrations

Seven runtime dependencies - eth-account, eth-utils, poly_eip712_structs, py-order-utils, python-dotenv, py-builder-signing-sdk and httpx[http2]. That is a signing stack, which is the right way to read it - the package holds your wallet private key in process in order to sign orders locally, and posts signed payloads rather than credentials.

No WebSocket. No CLI. No MCP server. It is a library and nothing else, and every integration built on it is somebody's own code.

Limitations

It is archived and its own publisher says it does not work. That is the whole limitation and everything else is detail. The repository is read-only, the last commit on main is dated 2026-05-25, and the last release, v0.34.6, is dated 2026-02-19. A hundred issues are open and will stay open. Nothing will be fixed when Polymarket next changes its API, because nobody is holding the other end.

It never set on-chain allowances. Users signing with a plain EOA wallet had to approve USDC and the conditional-token contract for three separate exchange contracts before any order would fill, and the README handled this by naming the contract addresses and linking a gist. That was the most common first failure for new users, and it was outside the library.

It polled. No WebSocket support, despite Polymarket's CLOB running both a market channel and a user channel. Anything that needed live book updates had to be written separately.

It was not a discovery tool. No event or market search - you arrived with a token ID or you did not trade.

Alternatives

Polymarket's replacement is its unified SDK, developed in the Polymarket/py-sdk repository and installed from PyPI as polymarket-client. It is MIT-licensed, needs Python 3.11 or newer, ships synchronous and asynchronous clients, and was at version 0.10.0 on 2026-09-10 after 34 releases since May 2026. It is the migration target the archived README names, and it is carded here.

Watch the install name. polymarket and polymarket-sdk are both taken on PyPI by unrelated authors publishing unrelated things; neither is Polymarket's.

If the goal is several venues rather than this one, ccxt reaches Polymarket's CLOB through its prediction namespace, including the WebSocket channels this client never had. If the goal is only to read prices, polymarket-clob-api and polymarket-gamma-api are plain HTTP and need no client library at all.

Specs

Interfaces
API, Python
Export
JSON
Available in
Global
KYC required
No
Market subjects
Resolved by
Resolves nothing
Maker fee
None
Platforms
Library
AI features
None
Capabilities
Order book, Automation, Live trading
Pricing verified
Availability verified
Capabilities verified

Also from Polymarket

Background

How this part of the sector works, rather than which product to pick.

  • What running a bot does not solveA bot fixes speed and consistency. Rate limits, a missing rehearsal, a field that stops arriving, a partial fill and a paused market are not coding problems.
  • Where your key lives when software trades for youFour different credentials are all called a key, and they differ in what a copy permits. What the clients in this catalogue ask for, and what to ask them back.

Also worth comparing

  • CCXTOne client for seven prediction venues, inside a 104-exchange crypto library.
  • limitless-sdkLimitless Exchange's own async Python SDK - CLOB and NegRisk orders, WebSocket, MIT.
  • PMXTCCXT-shaped client for prediction markets, with a hosted API and a self-hosted mode.
  • Kalshi Python SDK (sync and async)Kalshi's current official Python client - weekly releases, Python 3.13 only, no source.
  • kalshi-pythonKalshi's own generated Python client - closed-source, and unreleased since September 2025.
  • pykalshiUnofficial Kalshi client with what the generated SDK leaves out - streams and retries.

FAQ

Is py-clob-client still usable?

No, according to Polymarket. The repository was archived and its README now opens with a warning that the client is no longer functional and should not be used for new or existing integrations. The last release was v0.34.6 on 2026-02-19 and the last commit on main was 2026-05-25.

What replaced py-clob-client?

Polymarket's unified Python SDK, published from the Polymarket/py-sdk repository and installed from PyPI as [polymarket-client](/tools/polymarket-client). It is MIT-licensed, requires Python 3.11 or newer, and ships both a synchronous and an asynchronous client. Version 0.10.0 was published on 2026-09-10.

Did py-clob-client set token allowances for you?

Not the on-chain ones. It could read and refresh the CLOB's own view of your balance and allowance, but the ERC-20 approvals that let the exchange contracts move your USDC and conditional tokens had to be sent separately - the README pointed at an external gist for that code.

Did py-clob-client support WebSocket streaming?

No. The package shipped no WebSocket module and the README documented none, so order books and prices had to be polled over REST even though Polymarket's CLOB exposes market and user WebSocket channels.