docs: sync Polymarket docs - 2026-04-14

This commit is contained in:
Etherdrake
2026-04-14 21:53:47 +02:00
parent 814cdc00c9
commit d8e396519a
263 changed files with 1118 additions and 21257 deletions
+5 -3
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Deposit
> Bridge assets from any supported chain to fund your Polymarket account
@@ -15,7 +19,7 @@ Polymarket uses **USDC.e** (Bridged USDC) on Polygon as collateral for all tradi
Generate unique deposit addresses linked to your Polymarket wallet. See the [Bridge API Reference](/api-reference/introduction) for full request and response schemas.
```bash theme={null}
```bash theme={null}
curl -X POST https://bridge.polymarket.com/deposit \
-H "Content-Type: application/json" \
-d '{"address": "0x56687bf447db6ffa42ffe2204a05edaa20f55839"}'
@@ -99,5 +103,3 @@ If you deposited the wrong token on Ethereum or Polygon, use these tools to reco
Track your deposit progress through completion.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+1 -1
View File
@@ -1 +1 @@
null
null
+5 -3
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Quote
> Preview fees and estimated output for deposits and withdrawals
@@ -6,7 +10,7 @@ Get an estimated quote before executing a deposit or withdrawal. Quotes include
## Get a Quote
```bash theme={null}
```bash theme={null}
curl -X POST https://bridge.polymarket.com/quote \
-H "Content-Type: application/json" \
-d '{
@@ -111,5 +115,3 @@ The `estFeeBreakdown` object contains:
Withdraw from Polymarket to another chain.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+14 -5
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Deposit Status
> Track the progress of your bridge deposits
@@ -8,7 +12,7 @@ After sending assets to your deposit address, use the status endpoint to track p
Query the status of all deposits to a specific deposit address.
```bash theme={null}
```bash theme={null}
curl https://bridge.polymarket.com/status/0x23566f8b2E82aDfCf01846E54899d110e97AC053
```
@@ -30,11 +34,18 @@ Each deposit progresses through these statuses:
| `COMPLETED` | Yes | Funds arrived — transaction successful |
| `FAILED` | Yes | Transaction encountered an error |
<Note>
If a bridge transaction fails, remains stuck, or funds are held due to a
compliance check, direct users to
[our Bridge API provider's support](https://intercom.help/funxyz/en/articles/10732578-contact-us)
to resolve the issue.
</Note>
## Response
A response with active deposits:
```json theme={null}
```json theme={null}
{
"transactions": [
{
@@ -66,7 +77,7 @@ A response with active deposits:
An empty `transactions` array means no deposits have been detected at this address yet:
```json theme={null}
```json theme={null}
{
"transactions": []
}
@@ -89,5 +100,3 @@ An empty `transactions` array means no deposits have been detected at this addre
Check supported chains and minimum amounts.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+5 -3
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Supported Assets
> Chains and tokens supported for deposits to Polymarket
@@ -8,7 +12,7 @@ The Bridge API supports deposits from multiple chains and tokens. All deposits a
Retrieve the full list of supported chains and tokens with their minimum deposit amounts.
```bash theme={null}
```bash theme={null}
curl https://bridge.polymarket.com/supported-assets
```
@@ -56,5 +60,3 @@ Most L2 chains (Polygon, Arbitrum, Base, Optimism) have low minimums of $2, whil
Track your deposit progress.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+5 -3
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Withdraw
> Bridge USDC.e from Polymarket to any supported chain
@@ -38,7 +42,7 @@ Withdraw USDC.e from your Polymarket wallet to any supported chain and token. Fu
Generate deposit addresses configured for your withdrawal destination. See the [Bridge API Reference](/api-reference/introduction) for full request and response schemas.
```bash theme={null}
```bash theme={null}
curl -X POST https://bridge.polymarket.com/withdraw \
-H "Content-Type: application/json" \
-d '{
@@ -96,5 +100,3 @@ Withdrawals are **instant** and **free** — Polymarket does not charge withdraw
Track your withdrawal progress.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Builder Methods
> Methods for querying orders and trades using builder API credentials.
@@ -364,5 +368,3 @@ async revokeBuilderApiKey(): Promise<any>
Execute onchain operations without paying gas.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+8 -6
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# L1 Methods
> These methods require a wallet signer (private key) but do not require user API credentials. Use these for initial setup.
@@ -8,7 +12,7 @@ L1 methods require the client to initialize with a signer.
<Tabs>
<Tab title="TypeScript">
```typescript theme={null}
```typescript theme={null}
import { ClobClient } from "@polymarket/clob-client";
import { Wallet } from "ethers";
@@ -26,7 +30,7 @@ L1 methods require the client to initialize with a signer.
</Tab>
<Tab title="Python">
```python theme={null}
```python theme={null}
from py_clob_client.client import ClobClient
import os
@@ -361,7 +365,7 @@ async createMarketOrder(
</Accordion>
<Accordion title="Lost API credentials but have nonce">
```typescript theme={null}
```typescript theme={null}
// Use deriveApiKey with the original nonce
const recovered = await client.deriveApiKey(originalNonce);
```
@@ -370,7 +374,7 @@ async createMarketOrder(
<Accordion title="Lost both credentials and nonce">
There's no way to recover lost credentials without the nonce. Create new ones:
```typescript theme={null}
```typescript theme={null}
// Create fresh credentials with a new nonce
const newCreds = await client.createApiKey();
// Save the nonce this time!
@@ -399,5 +403,3 @@ async createMarketOrder(
Place and manage orders with API credentials.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+6 -4
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# L2 Methods
> These methods require user API credentials (L2 headers). Use these for placing trades and managing your positions.
@@ -8,7 +12,7 @@ L2 methods require the client to initialize with a signer, signature type, API c
<Tabs>
<Tab title="TypeScript">
```typescript theme={null}
```typescript theme={null}
import { ClobClient } from "@polymarket/clob-client";
import { Wallet } from "ethers";
@@ -35,7 +39,7 @@ L2 methods require the client to initialize with a signer, signature type, API c
</Tab>
<Tab title="Python">
```python theme={null}
```python theme={null}
from py_clob_client.client import ClobClient
from py_clob_client.clob_types import ApiCreds
import os
@@ -766,5 +770,3 @@ async dropNotifications(params?: DropNotificationParams): Promise<void>
Real-time market data streaming.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+6 -4
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Public Methods
> These methods can be called without a signer or user credentials. Use these for reading market data, prices, and order books.
@@ -8,7 +12,7 @@ Public methods require the client to initialize with the host URL and Polygon ch
<Tabs>
<Tab title="TypeScript">
```typescript theme={null}
```typescript theme={null}
import { ClobClient } from "@polymarket/clob-client";
const client = new ClobClient(
@@ -22,7 +26,7 @@ Public methods require the client to initialize with the host URL and Polygon ch
</Tab>
<Tab title="Python">
```python theme={null}
```python theme={null}
from py_clob_client.client import ClobClient
client = ClobClient(
@@ -657,5 +661,3 @@ async getServerTime(): Promise<number>
Real-time market data streaming.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Merge Tokens
> Convert outcome token pairs back to USDC.e
@@ -57,5 +61,3 @@ The operation is atomic — if you don't have enough of both tokens, the transac
Learn more about the Conditional Token Framework
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Conditional Token Framework
> Onchain token mechanics powering Polymarket positions
@@ -134,5 +138,3 @@ See [Contract Addresses](/resources/contract-addresses) for all Polymarket smart
Collect winnings after resolution
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Redeem Tokens
> Exchange winning tokens for USDC.e after market resolution
@@ -88,5 +92,3 @@ When you call `redeemPositions()`:
Understand how markets are resolved
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Split Tokens
> Convert USDC.e into outcome token pairs
@@ -63,5 +67,3 @@ The operation is atomic — if any step fails, the entire transaction reverts.
Place orders using your newly split tokens
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+8 -6
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Fees
> Understanding trading fees on Polymarket
@@ -16,7 +20,7 @@ Polymarket charges a small taker fee on certain markets. These fees fund the [Ma
Fees are calculated using the following formula:
```text theme={null}
```text theme={null}
fee = C × feeRate × p × (1 - p)
```
@@ -172,7 +176,7 @@ Fees are rounded to 5 decimal places. The smallest fee charged is **0.00001 USDC
Markets with fees have `feesEnabled` set to `true` on the market object. You can also query the fee-rate endpoint to check any specific market. See the [API Reference](/api-reference/introduction) for full endpoint documentation.
```bash theme={null}
```bash theme={null}
GET https://clob.polymarket.com/fee-rate?token_id={token_id}
```
@@ -212,7 +216,7 @@ If you're calling the REST API directly or building your own order signing, you
**Step 1:** Fetch the fee rate for the token ID before creating your order:
```bash theme={null}
```bash theme={null}
GET https://clob.polymarket.com/fee-rate?token_id={token_id}
```
@@ -220,7 +224,7 @@ See the [fee-rate API Reference](/api-reference/introduction) for full response
**Step 2:** Add the `feeRateBps` field to your order object. This value is part of the signed payload — the CLOB validates your signature against it.
```json theme={null}
```json theme={null}
{
"salt": "12345",
"maker": "0x...",
@@ -262,5 +266,3 @@ See the [fee-rate API Reference](/api-reference/introduction) for full response
Start placing orders on Polymarket.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+5 -3
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Gasless Transactions
> Execute onchain operations without paying gas fees
@@ -333,7 +337,7 @@ Choose a wallet type when initializing the client:
Use the `execute` method to send transactions through the relayer:
```typescript theme={null}
```typescript theme={null}
interface Transaction {
to: string; // Target contract address
data: string; // Encoded function call
@@ -571,5 +575,3 @@ See [Contract Addresses](/resources/contract-addresses) for all Polymarket smart
Understand token operations like split, merge, and redeem.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Matching Engine Restarts
> Restart schedule, maintenance windows, and how to handle downtime
@@ -160,5 +164,3 @@ Check the HTTP status code on responses to the CLOB API and retry on `425`:
* **Handle 425 gracefully** — treat it as a temporary condition, not an error; your retry logic should resume automatically
* **Avoid aggressive retries** — the engine needs time to reload orderbooks; rapid-fire retries won't speed things up and may hit rate limits once the engine is back
* **Log restart events** — track when your client encounters 425s to correlate with announced maintenance windows
Built with [Mintlify](https://mintlify.com).
+7 -5
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Orderbook
> Reading the orderbook, prices, spreads, and midpoints
@@ -71,7 +75,7 @@ Fetch the full orderbook for a token, including all resting bid and ask levels:
### Response
```json theme={null}
```json theme={null}
{
"market": "0xbd31dc8a...",
"asset_id": "52114319501245...",
@@ -437,7 +441,7 @@ For live orderbook data, use the WebSocket API instead of polling. The `market`
### Connecting
```typescript theme={null}
```typescript theme={null}
const ws = new WebSocket(
"wss://ws-subscriptions-clob.polymarket.com/ws/market",
);
@@ -470,7 +474,7 @@ ws.onmessage = (event) => {
After connecting, you can change your subscriptions without reconnecting:
```typescript theme={null}
```typescript theme={null}
// Subscribe to additional tokens
ws.send(
JSON.stringify({
@@ -524,5 +528,3 @@ ws.send(
Find token IDs for markets you want to trade
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Order Attribution
> Attribute orders to your builder key for volume credit
@@ -385,5 +389,3 @@ After revoking, generate new credentials from your [Builder Profile](https://pol
Build, sign, and submit orders
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Cancel Order
> Cancel single, multiple, or all open orders
@@ -395,5 +399,3 @@ Check if your resting orders are eligible for [maker rebates](/market-makers/mak
Understand fee structures and maker rebates
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+6 -4
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Create Order
> Build, sign, and submit orders
@@ -585,7 +589,7 @@ These optional fields can be passed in the `UserOrder` object for fine-grained c
Sports markets have additional behaviors:
* Outstanding limit orders are **automatically cancelled** once the game begins, clearing the entire order book at the official start time
* Marketable orders have a **3-second placement delay** before matching
* Marketable orders have a **1-second placement delay** before matching
* Game start times can shift — monitor your orders closely, as they may not be cleared if the start time changes unexpectedly
***
@@ -594,7 +598,7 @@ Sports markets have additional behaviors:
A successful order placement returns:
```json theme={null}
```json theme={null}
{
"success": true,
"errorMsg": "",
@@ -688,5 +692,3 @@ The heartbeat endpoint maintains session liveness. If a valid heartbeat is not r
Attribute orders to your builder account for volume credit
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+5 -3
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Overview
> Order types, tick sizes, and querying orders
@@ -31,7 +35,7 @@ The underlying order primitive is structured, hashed, and signed using the [EIP-
<Note>
**GTD expiration**: There is a security threshold of one minute. If you need
the order to expire in 90 seconds, the correct expiration value is `now + 1
minute + 30 seconds`.
minute + 30 seconds`.
</Note>
### Post-Only Orders
@@ -536,5 +540,3 @@ The operator's privileges are limited to order matching and ensuring correct ord
Cancel single, multiple, or all orders
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Overview
> Trading on the Polymarket CLOB
@@ -225,5 +229,3 @@ If you're using the REST API directly (without the SDK), you need to attach auth
Deposit and withdraw funds across chains
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+4 -2
View File
@@ -1,3 +1,7 @@
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Quickstart
> Place your first order on Polymarket
@@ -279,5 +283,3 @@ This guide walks you through placing an order on Polymarket end-to-end.
Attribute orders to your builder account for volume credit
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).