Skip to main content
Python and TypeScript SDKs for integrating with the Polymarket US Retail API. Both libraries handle authentication, request signing, and provide typed interfaces for all endpoints.
You must download the Polymarket US iOS app, create an account, and complete identity verification before you can generate API keys.

Generate API Keys

Visit the developer portal to generate your Ed25519 API keys. Your private key will be shown only once.

Choose Your SDK

Installation

pip install polymarket-us

Features

  • 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

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

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,
})