Overview
Connect to Polymarket Exchange’s Trading API using AWS PrivateLink for secure, private network connectivity. This guide walks you through setting up a VPC Endpoint connection for both pre-production and production environments.Your AWS account must be whitelisted before you can establish a VPC connection. Contact Polymarket support to whitelist your account.
Prerequisites
- An AWS account whitelisted by Polymarket
- Appropriate permissions to create VPC Endpoints in AWS
- Subnets in the required Availability Zones (see below)
1. Account and Environment Setup
We recommend using separate AWS accounts for pre-production and production environments to maintain clear isolation.- By default, your whitelisted AWS account has access to Preprod only
- When ready for production, provide Polymarket with your production AWS Account ID for whitelisting
2. Create VPC Endpoint
Navigate to the AWS Console and create a new VPC Endpoint using the appropriate VPC Service Name:| Environment | VPC Service Name |
|---|---|
| Preprod | com.amazonaws.vpce.us-east-1.vpce-svc-0ab4dc57271d74d3e |
| Prod | com.amazonaws.vpce.us-east-1.vpce-svc-0cb1220f882b3879e |
Availability Zone Requirements
Ensure at least one of your subnets is located in the following Availability Zone IDs: Production:use1-az1use1-az2use1-az6
use1-az1use1-az2use1-az4
Connection Approval
After creating the VPC Endpoint, a connection request is sent to Polymarket’s DevOps team. They will review and accept the request, then notify you once approved.You cannot proceed with DNS configuration or API connection until Polymarket accepts the connection request.
3. PrivateLink DNS Configuration
After the connection is accepted, we recommend enabling Private DNS for the endpoint (optional but encouraged). When Private DNS is enabled, the following DNS names resolve to private IP addresses assigned to your VPC Endpoint, routing all traffic over the private AWS network:| Environment | Private DNS Name |
|---|---|
| Preprod | traderapi.us-east-1.privatelink.preprod.polymarketexchange.com |
| Prod | traderapi.us-east-1.privatelink.prod.polymarketexchange.com |
4. Making API Calls
Recommended: CNAME Aliases
We recommend creating CNAME aliases via a Route53 Private Hosted Zone. This eliminates the need for custom headers and simplifies client configuration for both REST and gRPC. Required CNAME records:| Environment | CNAME Alias | Target (Your VPC Endpoint) |
|---|---|---|
| Preprod | rest.preprod.polymarketexchange.com | Your VPC Endpoint DNS |
| Preprod | traderapi.preprod.polymarketexchange.com | Your VPC Endpoint DNS |
| Prod | rest.prod.polymarketexchange.com | Your VPC Endpoint DNS |
| Prod | traderapi.prod.polymarketexchange.com | Your VPC Endpoint DNS |
You need two CNAME records per environment:
rest.* for the REST API and traderapi.* for gRPC.Alternative: Manual Header Overrides
If you don’t use CNAME aliases, you must set the appropriate header on every request.REST API: Host Header
| Environment | PrivateLink URL | Host Header |
|---|---|---|
| Preprod | traderapi.us-east-1.privatelink.preprod.polymarketexchange.com | rest.preprod.polymarketexchange.com |
| Prod | traderapi.us-east-1.privatelink.prod.polymarketexchange.com | rest.prod.polymarketexchange.com |
gRPC API: Authority Header
| Environment | PrivateLink URL | Authority Header |
|---|---|---|
| Preprod | traderapi.us-east-1.privatelink.preprod.polymarketexchange.com | traderapi.preprod.polymarketexchange.com |
| Prod | traderapi.us-east-1.privatelink.prod.polymarketexchange.com | traderapi.prod.polymarketexchange.com |
Troubleshooting
Connection request not accepted
Connection request not accepted
If your connection request hasn’t been accepted after 24 hours, contact Polymarket support with your VPC Endpoint ID.
DNS resolution fails
DNS resolution fails
Verify that Private DNS is enabled for your VPC Endpoint and that your subnets are in the correct Availability Zones.
API calls timing out
API calls timing out
Ensure your security groups and network ACLs allow outbound HTTPS (443) traffic to the VPC Endpoint.

