Skip to main content

pmwallets — Python SDK for PMWallets

PyPI License: MIT

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.

Resources

License

MIT

Release files for pmwallets 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pmwallets 0.1.1
File Size Uploaded
pmwallets-0.1.1.tar.gz 15.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pmwallets 0.1.1
File Interpreter ABI Platform
pmwallets-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.3 kB

Release files / pmwallets-0.1.1.tar.gz

Download URL pmwallets-0.1.1.tar.gz
Size 15.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d9ad83769ab46b79048026fc9f1ef66886a8fa678f7b8772b16510c2d0b6c5fd
BLAKE2b-256 checksum
How to use checksums
0041db458e1417d4aa99aa1f9a3aab5e16c8bd1ae65ad0855d140bad8faee0a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release files / pmwallets-0.1.1-py3-none-any.whl

Download URL pmwallets-0.1.1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1a86663606c009f02ca7365bc55956ebd314ec965ed9dbbe68a9f6dcc817f92
BLAKE2b-256 checksum
How to use checksums
239b512782e6f8cc093bf8999c717b5a8abb965f71d48656bb8ce1fc90475dfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page