Everything you need to update your integration for the CTF Exchange V2 upgrade. New endpoints, updated client libraries, and migration examples.
New endpoints & auth
Updated SDKs
Step-by-step guide
Breaking changes
Follow these steps to ensure your integration is ready for V2.
Key differences between V1 and V2 endpoints.
| Method | V1 Endpoint | V2 Endpoint | Status |
|---|---|---|---|
| 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 |
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);
Updated WebSocket endpoints for real-time data.
New and updated error codes for V2.
Everything you need to complete your migration.
Full API reference, authentication guides, and migration walkthroughs.
Read the Docs →Developer-specific support for migration questions and integration issues.
Contact Dev Support →