Quick answer
Polymarket exposes several APIs: Gamma (market and event metadata), the CLOB (order books, prices, orders), a Data API (positions, activity) and WebSocket feeds. Market data needs no credentials. Trading first requires an EIP-712 wallet signature (L1) to derive API key, secret and passphrase, then HMAC-SHA256-signed L2 requests, and each order is also signed by the wallet.
Polymarket API at a glance
- Pricing
- Public data free; trading fees per market
- Availability
- Varies by jurisdiction; check current terms
- Paper trading
- No sandbox
- Integration type
- Asymmetric / wallet signing
- In AlgoGP
- Design and backtest in AlgoGP, connect the exported code
- Gamma API
https://gamma-api.polymarket.com(markets, events)- CLOB API
https://clob.polymarket.com(books, prices, orders)- Auth
- L1 EIP-712 wallet signature → L2 API key + HMAC-SHA256
- SDKs
- Official
py-clob-client(Python) and TypeScript - Data
- Public; no credentials needed
Reading markets without a key
GET gamma-api.polymarket.com/markets?active=true&closed=falselists open markets with their outcome token ids.GET clob.polymarket.com/book?token_id=…returns the order book for one outcome.GET clob.polymarket.com/prices-history?market=…&interval=1dreturns a price series for backtests.
Prices are probabilities between 0 and 1. AlgoGP strategies can already emit up/down forecasts scored as binary contracts, which maps directly onto a Polymarket outcome price.
Trading authentication in two levels
- 1
L1: wallet
Sign an EIP-712 message with the wallet’s private key to create or derive API credentials.
- 2
L2: API key
Send
POLY_API_KEY,POLY_PASSPHRASE,POLY_TIMESTAMPand an HMAC-SHA256POLY_SIGNATUREover timestamp + method + path + body. - 3
Orders
Each order is itself an EIP-712 signed message; the SDK builds and signs it.
Build a Polymarket strategy with AlgoGP
AlgoGP does not connect to Polymarket natively yet. Polymarket requires asymmetric or wallet signatures (JWT, RSA-PSS or EIP-712) that the standard-library Python AlgoGP exports cannot produce without an extra library.
- 1
Design and backtest in AlgoGP
Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.
- 2
Export the Python project
Every project exports
strategy.py,market_data.py,brokers.pyandlive.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format. - 3
Plug in Polymarket
Implement the four adapter methods (
account,positions,submit_market_orderand a candle fetcher) with Polymarket’s SDK, or keep a built-in platform for paper trading and add Polymarket when you go live.
Built-in data sources for the same markets: Alpaca, Binance, Coinbase Exchange, Yahoo Finance.
Polymarket API: frequently asked questions
Is the Polymarket API free?
Yes. Market data is free and keyless; trading pays per-market fees where they apply.
Do I need an API key to read Polymarket prices?
No. Gamma and the CLOB’s public endpoints need no credentials.
Can I use Polymarket from the US?
Availability depends on current terms and jurisdiction; check Polymarket’s rules before trading.
Why can’t I sign Polymarket orders with plain HMAC?
Orders also need an EIP-712 wallet signature, so you need a wallet library such as the official SDK.
Design and backtest your Polymarket strategy first
AlgoGP turns an idea into Python and tests it on years of history before you connect it to Polymarket. The exported code keeps the broker behind four small adapter methods.
- AI copilot writes and revises the rules
- Backtests with realistic costs
- Exported Python ready to wire to Polymarket
Free plan, no card required.
Polymarket alternatives
Independent guide. AlgoGP is not affiliated with Polymarket. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.