Recommended Architecture
Best Practice: Use gRPC streaming to build and maintain a local database:-
gRPC Streaming (Primary):
- Subscribe to market data for continuous order book updates
- Subscribe to order stream for execution reports and fills
- Subscribe to position stream for real-time position updates
- Maintain local database with all updates
-
REST API (Commands Only):
- Authentication (registration, login, token refresh)
- Place orders (INSERT, CANCEL)
- Administrative actions
-
REST Lookups (Backup Only):
- Use only for recovery scenarios (e.g., reconnection after downtime)
- Do not poll these endpoints regularly
- Maintain your own history from streaming data
Available Endpoints
Authentication
Registration, login, and token management:- One-time registration with JWT from account manager
- Login with username and password
- Token refresh and rotation
- Optional MFA enrollment
/auth/v1beta1
View Authentication Endpoints →
Trading
Place and cancel orders:- Insert new orders (market, limit, stop)
- Cancel orders (single or bulk)
/api/v1beta1
View Trading Endpoints →
Backup Lookups
Use only for recovery scenarios, not regular polling:- Account balances
- Open orders
- Current positions
- Reference data
Do not poll these endpoints: Maintain your own local database from streaming data. These endpoints are for backup/recovery only.
Server Endpoints
API endpoints are accessed via AWS PrivateLink VPC connections.Recommended: CNAME Alias
We recommend setting up CNAME aliases via Route53 Private Hosted Zone. This eliminates the need for Host headers and simplifies client configuration.| Environment | Endpoint |
|---|---|
| Preprod | https://rest.preprod.polymarketexchange.com |
| Prod | https://rest.prod.polymarketexchange.com |
Alternative: Host Header
If you don’t use CNAME aliases, send requests to the PrivateLink URL with aHost header:
| Environment | PrivateLink URL | Host Header |
|---|---|---|
| Preprod | https://traderapi.us-east-1.privatelink.preprod.polymarketexchange.com | rest.preprod.polymarketexchange.com |
| Prod | https://traderapi.us-east-1.privatelink.prod.polymarketexchange.com | rest.prod.polymarketexchange.com |
All endpoints require VPC connectivity. See VPC Connection for setup instructions.
Authentication
All API requests require authentication using access tokens. The authentication flow involves a one-time registration step followed by login.One-Time Registration
- Request Registration JWT: Contact your account manager to receive a registration JWT
- Register: Call
/auth/v1beta1/registerwith the JWT and a password you choose
Registration is a one-time operation. After registering, use the login endpoint for all future authentication.
Login
After registration, authenticate using your username and password:Using the Access Token
Include the access token in theAuthorization header for all API requests:
Refreshing Tokens
When your access token expires, use the refresh token to obtain a new one:Request Format
All POST requests use JSON payloads:Response Format
Successful responses return JSON with HTTP status code 200:Quick Start
Ready to get started? Follow our Getting Started Guide to:- Request Trading Gateway access
- Receive your registration JWT
- Register and set your password
- Set up gRPC streaming connections
- Authenticate and place your first order

