Migration Portal FAQ Developer Guide Activate Migration

Migrate to Polymarket V2

Everything you need to update your integration for the CTF Exchange V2 upgrade. New endpoints, updated client libraries, and migration examples.

Last updated: April 28, 2026 · API Version: v2.0 · Open Source →

Migration Checklist

Follow these steps to ensure your integration is ready for V2.

0% Complete

API Endpoint Changes

Key differences between V1 and V2 endpoints.

MethodV1 EndpointV2 EndpointStatus
GET /markets /markets Unchanged
GET /events /events Unchanged
GET /prices /v2/prices Changed
POST /order /v2/orders Changed
POST /cancel /v2/orders/cancel Changed
GET /orderbook /v2/orderbook Changed
GET /user/orders /v2/orders/user Changed
POST /approve /v2/approve Changed
GET /balance/v1 Deprecated

Code Example: Order Placement

Updated syntax for placing orders on CTF Exchange V2.

// Place a buy order on CTF Exchange V2
import { CTFExchangeV2 } from "@polymarket/ctf-v2";

const exchange = new CTFExchangeV2({
  providerUrl: "https://polygon-rpc.com",
  privateKey: process.env.PRIVATE_KEY,
  apiKey: process.env.POLYMARKET_API_KEY,
});

// Approve pUSD before placing orders (one-time)
await exchange.approveCollateral({
  amount: "1000000000", // 1000 pUSD (6 decimals)
});

const order = await exchange.placeOrder({
  tokenID: "123456789012345678901234567890",
  side: "BUY",
  price: 0.65,
  size: 100,
  feeRateBps: 100, // Fees calculated at match time
});

console.log("Order placed:", order.orderId);

WebSocket Changes

Updated WebSocket endpoints for real-time data.

V1 (Deprecated)

wss://ws-subscriptions-clob.polymarket.com/ws/v1
Deprecated

V2 (Active)

wss://ws-subscriptions-clob.polymarket.com/ws/v2
Active

Error Code Changes

New and updated error codes for V2.

ORDER_INVALID_COLLATERAL
Order placed with incorrect pUSD approval or insufficient balance.
FEE_CALCULATION_FAILED
Fee could not be calculated at match time. Order rejected.
NONCE_INVALIDATION_ERROR
Nonce invalidation issue resolved in V2. Legacy error code retained.
BALANCE_CHECK_RACE
Race condition during balance check. Retry recommended.

Developer Resources

Everything you need to complete your migration.

Documentation

Full API reference, authentication guides, and migration walkthroughs.

Read the Docs →

GitHub

Open source client libraries, contract ABIs, and example integrations.

View Repositories →

Support

Developer-specific support for migration questions and integration issues.

Contact Dev Support →