---
url: "https://predictiontoolkit.com/tools/polymarket-api-python/"
publisher: "PredictionToolkit"
dateModified: "2026-11-02"
---

[← SDKs & libraries](<https://predictiontoolkit.com/polymarket-sdks/>) 

SDK

# polymarket-api-python: Typed Python Market and Order-Book Client

polymarket-api-python is a compact typed Python package for Polymarket research, book analytics and streaming. Its public read surface needs no API key; trading is installed as an optional extra.

[**3.5**/ 5Editorial rating](<https://predictiontoolkit.com/tools/polymarket-api-python/#reviews>) [Editorial assessment](<https://predictiontoolkit.com/tools/polymarket-api-python/#reviews>) 

[Open the polymarket-api-python repository](<https://github.com/antflow-live/polymarket-api-python>) github.com

**Pricing:** MIT-licensed package. Public reads need no API key; venue and operating costs for trading are separate.

[Screenshots](<https://predictiontoolkit.com/tools/polymarket-api-python/#screenshots>) [Explore alternatives](<https://predictiontoolkit.com/tools/polymarket-api-python/#alternatives>) 

[SDKs & libraries](<https://predictiontoolkit.com/polymarket-sdks/>) 

## Screenshots and interface

Product preview1 / 2

Python toolkit introduction and public reads.

## What is polymarket-api-python?

GammaClient paginates market listings and decodes JSON-string outcomes and tokens. OrderBookSnapshot adds best bid/ask, midpoint, spread in basis points, depth within 5% and total resting liquidity to the raw book.

The WebSocket client handles reconnects, heartbeat and stale-feed monitoring. Optional signing and placement rely on the upstream client and current protocol compatibility. Deterministic client order IDs aid retries but do not replace reconciliation of actual order state.

### Who it is for

-   Python projects needing a focused research client.
-   Apps monitoring spread and depth.
-   Teams separating read dependencies from trading.

## Features and coverage

-   **Gamma reader**
    
    Paginate listings and decode outcome/token strings.
    
-   **Book metrics**
    
    Best bid/ask, midpoint, spread in basis points, depth within 5% and resting liquidity.
    
-   **Resilient streams**
    
    Reconnect, heartbeat and stale-feed monitoring.
    
-   **Client order IDs**
    
    Generate deterministic IDs for retry-aware workflows.
    
-   **Optional trading**
    
    Install signing and placement support only when required.
    
-   **Cookbook**
    
    Recipes cover reads, books, cancellation, authentication and resolution.
    

## Workflows with polymarket-api-python

### Monitor liquidity

Find a market with Gamma, read its YES or NO book and sample spread and depth consistently.

### Consume a stream

Subscribe to chosen token IDs, handle typed price events and use watchdog/reconnect behavior.

### Add order actions

Establish reads first, then install the trading extra and implement placement and cancellation.

## Pricing and total cost

MIT-licensed package. Public reads need no API key; venue and operating costs for trading are separate.

## Getting started

**Before you start:** Trading-wrapper compatibility depends on the upstream client.

1.  Install polymarket-api-python.
2.  Find a market with GammaClient.
3.  Read OrderBookSnapshot for the selected token.
4.  Use WebSocket for continuing updates.
5.  Install the trading extra only for order actions.

Trading depends on the upstream client's current protocol compatibility.

[Read the package documentation directory](<https://github.com/antflow-live/polymarket-api-python/tree/main/docs>) 

## Useful links

### What to check

-   Trading-wrapper compatibility depends on the upstream client.
-   Deterministic IDs do not replace order-state reconciliation.
-   Market IDs and outcome token IDs serve different purposes.

A closer look

## Ratings & reviews

Editorial rating

**3.5**/ 5

0 user reviews

PredictionToolkit editorial

### Our take on polymarket-api-python

Typed reads, a focused cookbook and optional trading suit small Python integrations. Execution compatibility still relies on the upstream client and current venue protocol.

Based on documented features, setup and access terms. [How we rate](<https://predictiontoolkit.com/methodology/>) 

### User reviews 0

The main score switches to user ratings after 5 published reviews.

**Be the first to share your experience**

A specific example helps the next person choose the right tool.

## Related tools

[Browse category](<https://predictiontoolkit.com/polymarket-sdks/>) 

![Marketlens Python installation and Strategy quickstart](<https://predictiontoolkit.com/assets/cover-marketlens-python-sdk-ffa316a7aa2608e2-400.webp>)

![Marketlens Python SDK logo](<https://predictiontoolkit.com/assets/icon-logo-tool-marketlens-55ffc19ca97b-32-44bd5560969403da.webp>)[Marketlens Python SDK](<https://predictiontoolkit.com/tools/marketlens-python-sdk/>) 

SDK**4.0**Editorial

Compare fast bar experiments with detailed L2 replay, reusing downloaded history between strategy changes.

-   Language Python

Compare historical replay and export workflows.

![Official Polymarket Python SDK installation and quickstart](<https://predictiontoolkit.com/assets/cover-polymarket-python-sdk-abdc8e68d81b53bc-400.webp>)

![Polymarket Python SDK logo](<https://predictiontoolkit.com/assets/logo-tool-polymarket-python-sdk-765ba4cc040b.webp>)[Polymarket Python SDK](<https://predictiontoolkit.com/tools/polymarket-python-sdk/>) 

SDK**4.0**Editorial

Typed sync and async clients for scripts, notebooks, account workflows and real-time subscriptions.

-   Language Python

Compare the official unified Python client.

![polyfill-rs provider console book demo and Rust quickstart](<https://predictiontoolkit.com/assets/cover-polyfill-rs-fd115d3d8acb9d18-400.webp>)

[polyfill-rs](<https://predictiontoolkit.com/tools/polyfill-rs/>) 

SDK**3.5**Editorial

Build a Rust Polymarket integration with typed requests, explicit V2 support and configurable book processing.

-   Language Rust
-   Access API

Compare a Rust-oriented integration.

## Frequently asked questions about polymarket-api-python

### Do book analytics need trading credentials?

No. Reads, streams and analytics are credential-free.

### What does a snapshot add?

Computed spread, midpoint, depth and resting-liquidity metrics.

### Is trading installed by default?

No. It is an optional extra.

In this profile
