pmwallets — Python SDK for PMWallets
Official Python client for PMWallets: the Polymarket smart-money leaderboard computed from the Polygon chain, and the real-time fills of the Polymarket wallets you follow — delivered in order, exactly once, with every gap replayed.
中文说明 · Node.js SDK: pmwallets-node · Ready-to-run copy-trading bot built on it: polymarket-copy-trading-bot-python
Install
pip install pmwallets # Python ≥ 3.10
Create an API key on pmwallets.com/keys.
Usage
import asyncio
from pmwallets import AsyncClient, Client, FillStream, FileStateStore
# synchronous REST
with Client(api_key="pmw_...") as pmw:
board = pmw.leaderboard(minWinLo=0.55, minEligible=30, style="taker", status="active", limit=50)
pmw.subscribe(board["rows"][0]["entityId"], channels=["ws"]) # billed per entity per hour
# every fill of every entity you follow
async def main():
async with AsyncClient(api_key="pmw_...") as pmw:
stream = FillStream(
client=pmw,
store=FileStateStore("stream.json"), # a restart resumes exactly where it stopped
on_fill=lambda fill, meta: print(meta.source, fill["side"], fill["price"], fill["tokenId"]),
)
await stream.run()
asyncio.run(main())
What is in it
Client / AsyncClient |
leaderboard, entities, address unlocks, subscriptions, fills replay (fills, fills_since), trade-history exports |
FillStream |
asyncio WebSocket with reconnect and keep-alive; detects missed frames by session/seq and replays them from the last fill delivered; de-duplicates by eventId; anchors behind the chain head on first start; persisted cursor |
verify_webhook(raw_body, signature, secret) |
checks x-pmw-signature (HMAC-SHA256 of the raw body) |
One stream per account. An API-key connection takes priority over the pmwallets.com feed page (the page never takes the stream from it); between two API connections the newest wins, so run one consumer per account. HTTPS_PROXY is honoured.
PMWallets' servers are in the United Kingdom: a consumer hosted in the UK or elsewhere in Europe receives fills soonest.
Resources
- Polymarket smart-money leaderboard — profitable Polymarket traders scored from the Polygon chain, with win-rate confidence intervals
- Polymarket copy trading guide — which wallets are worth following and how to get their fills in time
- How to learn from Polymarket smart money — reading a trader's record: confidence intervals, maker vs taker, market specialism
- PMWallets API documentation — WebSocket and webhook fill push, fills replay, trade-history exports
- Measured fill-push latency — block-to-push p50 / p95, published live
- Ways to follow Polymarket wallets, compared — official leaderboard, free trackers, SQL dashboards
- FAQ · 中文站
License
MIT
Release files for pmwallets 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pmwallets-0.1.2.tar.gz | 15.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pmwallets-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.5 kB
Release files / pmwallets-0.1.2.tar.gz
| Download URL | pmwallets-0.1.2.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba3da5ce141c200cc13bf269c17d91ebeb6c758e31ef1aa0c15710a8a793620c
|
|
BLAKE2b-256 checksum How to use checksums |
0f74d418ee1ecda301e6ea3a8c2b309999b0e0093f2bb2356d671a5f752666c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / pmwallets-0.1.2-py3-none-any.whl
| Download URL | pmwallets-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dfc674e89a57c993cdd1b3d875d546513a39a5e34646ad5a56f1e3b9da2942a
|
|
BLAKE2b-256 checksum How to use checksums |
96b4a7df4422126264de88acd2b9f82e265cde2673525cc76b00ac0812a7a142
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|