> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.us/llms.txt
> Use this file to discover all available pages before exploring further.

# Environments

> API endpoints for preprod and production environments

The Polymarket Exchange API is available in two environments. Use the appropriate endpoints based on your integration stage.

## Endpoints

| Environment | Purpose | REST API | gRPC | Auth Domain |
| - | - | - | - | - |
| **Preprod** | Pre-production validation | `https://api.preprod.polymarketexchange.com` | `grpc-preprod.polymarketexchange.com:443` | `pmx-preprod.us.auth0.com` |
| **Prod** | Production trading | `https://api.prod.polymarketexchange.com` | `grpc-prod.polymarketexchange.com:443` | `pmx-prod.us.auth0.com` |

The Audience value for each environment matches its REST API base URL.

### API Path Patterns

| API Type | Path Pattern | Example |
| - | - | - |
| REST endpoints | `/v1/{service}/{operation}` | `/v1/trading/orders` |
| Health check | `/v1/health` | `GET /v1/health` |
| Auth token | `/oauth/token` | `POST https://pmx-preprod.us.auth0.com/oauth/token` |

### Authentication

| Environment | Token URL |
| - | - |
| Preprod | `https://pmx-preprod.us.auth0.com/oauth/token` |
| Prod | `https://pmx-prod.us.auth0.com/oauth/token` |

> [!WARNING]
>
> **Cache the access token and reuse it until close to expiry.** `expires_in` is 86400 seconds (24 hours) in every environment. Keep one cache per process, shared across threads. Do not request a new token per API call.

## Health Check

All environments expose the same health check endpoint:

```bash theme={null}
curl https://api.preprod.polymarketexchange.com/v1/health
```

```json theme={null}
{
  "status": "ok"
}
```

## AWS PrivateLink Connection

> [!WARNING]
>
> **VPC connections are required only for FIX API access.** REST and gRPC APIs use the public endpoints listed above and do not require VPC setup.

For secure, private connectivity from your AWS VPC for the FIX API, use AWS PrivateLink. This routes traffic over AWS's private network instead of the public internet.

VPC Service Names and PrivateLink endpoints are provisioned per-firm during FIX onboarding. Send your AWS Account ID to your Polymarket contact to get started.

## Environment Progression

We recommend the following integration progression:

1. **Preprod** - Integration testing and pre-launch validation
2. **Prod** - Live trading

> [!NOTE]
>
> Ask your Polymarket contact for access credentials for each environment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.