Registry / http-networking / py-clob-client-v2

py-clob-client-v2

JSON →
library1.0.0pypypi✓ verified 82d ago

Python client for interacting with the Polymarket CLOB (Central Limit Order Book) V2 API. Version 1.0.0 is the latest stable release, with a release candidate 1.0.1rc1 available. Requires Python >=3.9.10. Maintained actively on GitHub.

pip install py-clob-client-v2
INSTALL
IMPORT
SIG · PY-CLOB-CLIENT-V2
P
py-clob-client-v2
http-networkingpythonv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ClobClient
from py_clob_client_v2 import ClobClient
from py_clob_client.client import ClobClient

Initialize a ClobClient with private key from environment variable and test connectivity.

import os from py_clob_client.client import ClobClient from py_clob_client.clob_types import Credentials host = "https://clob.polymarket.com" key = os.environ.get('PRIVATE_KEY', '') creds = Credentials(private_key=key, chain_id=137) client = ClobClient(host=host, credentials=creds) print(client.get_heartbeat())
Debug
Known issues
gotchaThe library's release versions do not follow strict semver; 1.0.1rc1 is a pre-release and may contain breaking changes.
fix
Pin to 1.0.0 for production unless you need the features in 1.0.1rc1.
affects: >=1.0.0
gotchaPrivate key must be in hex format without 0x prefix. Incorrect formatting will cause silent failures.
fix
Ensure private key is a hex string (64 characters) without '0x'.
affects: >=0.0.1
deprecatedThe `getHeartbeat()` method (camelCase) is deprecated in v1.0.0; use `get_heartbeat()` instead.
fix
Replace `getHeartbeat()` with `get_heartbeat()`.
affects: >=1.0.0
breakingIn v1.0.0, the `Credentials` class was introduced and the constructor changed. Passing a raw private key string directly is no longer supported.
fix
Use from py_clob_client.clob_types import Credentials and pass Credentials object.
affects: <1.0.0 vs >=1.0.0
Upgrade
Version history
1.0.0latest on PyPI · released Apr 17, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
29 hits · last 30 days
node
28
Amazon
1
Resources
py-clob-client-v2 — pip install py-clob-client-v2 · libregistry