Skip to main content
Official SDKs for integrating with the Polymarket US Retail API. Both libraries handle authentication, request signing, and provide typed interfaces for all endpoints.

Features

Both SDKs provide:
  • Automatic authentication - Ed25519 request signing handled internally
  • Type safety - Full typing for all requests and responses
  • WebSocket support - Real-time market data and order updates
  • Error handling - Typed exceptions for all error cases

Installation

pip install polymarket-us

Quick Example

from polymarket_us import PolymarketUS

client = PolymarketUS(
    key_id="your-key-id",
    secret_key="your-secret-key",
)

# Get markets and place an order
markets = client.markets.list({"limit": 10})
order = client.orders.create({
    "marketSlug": "btc-100k-2025",
    "intent": "ORDER_INTENT_BUY_LONG",
    "type": "ORDER_TYPE_LIMIT",
    "price": {"value": "0.55", "currency": "USD"},
    "quantity": 100,
})

API Coverage

ResourceMethods
Eventslist, retrieve, retrieveBySlug
Marketslist, retrieve, retrieveBySlug, book, bbo, settlement
Orderscreate, list, retrieve, cancel, modify, cancelAll, preview, closePosition
Portfoliopositions, activities
Accountbalances
Serieslist, retrieve
Sportslist, teams
Searchquery
WebSocketprivate, markets