Update Polymarket documentation - March 30, 2026

Updated 229 documentation pages reflecting latest official docs changes:
- API Reference: authentication, rate-limits, clients-sdks, market-data endpoints
- Developers: CLOB, Gamma Markets, RTDS, Sports Websocket, Builders, CTF
- Trading: fees, bridge, orders, orderbook, clients
- Polymarket Learn: get-started guides, deposits, trading
- Builders: tiers, api-keys, profile, examples, order-attribution
- Quickstart: overview, first-order, websocket guides
- Concepts: markets-events, prices-orderbook, resolution
- Market Makers: getting-started, trading, liquidity-rewards
- Resources: error-codes, contract-addresses, blockchain-data
This commit is contained in:
Etherdrake
2026-03-30 12:53:20 +02:00
parent 240ece03cc
commit 50a13414c0
229 changed files with 7322 additions and 935 deletions
+3
View File
@@ -158,3 +158,6 @@ curl "https://gamma-api.polymarket.com/events?active=true&closed=false&limit=50&
Query onchain data directly from the Polymarket subgraph.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+66 -5
View File
@@ -18,6 +18,10 @@ This guide walks you through placing an order on Polymarket end-to-end.
```bash Python theme={null}
pip install py-clob-client
```
```bash Rust theme={null}
cargo add polymarket-client-sdk --features clob
```
</CodeGroup>
</Step>
@@ -70,6 +74,23 @@ This guide walks you through placing an order on Polymarket end-to-end.
funder="YOUR_WALLET_ADDRESS"
)
```
```rust Rust theme={null}
use std::str::FromStr;
use polymarket_client_sdk::POLYGON;
use polymarket_client_sdk::auth::{LocalSigner, Signer};
use polymarket_client_sdk::clob::{Client, Config};
let private_key = std::env::var("POLYMARKET_PRIVATE_KEY")?;
let signer = LocalSigner::from_str(&private_key)?
.with_chain_id(Some(POLYGON));
// Derive API credentials and initialize client (EOA by default)
let client = Client::new("https://clob.polymarket.com", Config::default())?
.authentication_builder(&signer)
.authenticate()
.await?;
```
</CodeGroup>
<Note>
@@ -131,6 +152,28 @@ This guide walks you through placing an order on Polymarket end-to-end.
print("Order ID:", response["orderID"])
print("Status:", response["status"])
```
```rust Rust theme={null}
use polymarket_client_sdk::clob::types::Side;
use polymarket_client_sdk::types::dec;
let token_id = "YOUR_TOKEN_ID".parse()?;
// Tick size and neg risk are auto-fetched by the order builder
let order = client
.limit_order()
.token_id(token_id)
.price(dec!(0.50))
.size(dec!(10))
.side(Side::Buy)
.build()
.await?;
let signed_order = client.sign(&signer, order).await?;
let response = client.post_order(signed_order).await?;
println!("Order ID: {}", response.order_id);
println!("Status: {:?}", response.status);
```
</CodeGroup>
<Tip>
@@ -167,6 +210,21 @@ This guide walks you through placing an order on Polymarket end-to-end.
# Cancel an order
client.cancel(order_id=response["orderID"])
```
```rust Rust theme={null}
use polymarket_client_sdk::clob::types::request::{OrdersRequest, TradesRequest};
// View all open orders
let open_orders = client.orders(&OrdersRequest::default(), None).await?;
println!("You have {} open orders", open_orders.data.len());
// View your trade history
let trades = client.trades(&TradesRequest::default(), None).await?;
println!("You've made {} trades", trades.data.len());
// Cancel an order
client.cancel_order(&response.order_id).await?;
```
</CodeGroup>
</Step>
</Steps>
@@ -176,7 +234,7 @@ This guide walks you through placing an order on Polymarket end-to-end.
## Troubleshooting
<AccordionGroup>
<Accordion title="L2_AUTH_NOT_AVAILABLE / Invalid Signature">
<Accordion title="L2 AUTH NOT AVAILABLE - Invalid Signature">
Wrong private key, signature type, or funder address for the derived API credentials.
* Check that `signatureType` matches your account type (`0`, `1`, or `2`)
@@ -184,7 +242,7 @@ This guide walks you through placing an order on Polymarket end-to-end.
* Re-derive credentials with `createOrDeriveApiKey()` if unsure
</Accordion>
<Accordion title="Order rejected: insufficient balance">
<Accordion title="Order rejected - insufficient balance">
Your funder address doesn't have enough tokens:
* **BUY orders**: need USDC.e in your funder address
@@ -192,13 +250,13 @@ This guide walks you through placing an order on Polymarket end-to-end.
* Ensure you have more USDC.e than what's committed in open orders
</Accordion>
<Accordion title="Order rejected: insufficient allowance">
<Accordion title="Order rejected - insufficient allowance">
You need to approve the Exchange contract to spend your tokens. This is
typically done through the Polymarket UI on your first trade, or using the CTF
contract's `setApprovalForAll()` method.
</Accordion>
<Accordion title="What's my funder address?">
<Accordion title="What is my funder address">
Your funder address is the wallet where your funds are held:
* **EOA (type 0)**: Your wallet address directly
@@ -207,7 +265,7 @@ This guide walks you through placing an order on Polymarket end-to-end.
If the proxy wallet doesn't exist, log into Polymarket.com first (it's deployed on first login).
</Accordion>
<Accordion title="Blocked by Cloudflare / Geoblock">
<Accordion title="Blocked by Cloudflare or Geoblock">
You're trying to place a trade from a restricted region. See [Geographic Restrictions](/api-reference/geoblock) for details.
</Accordion>
</AccordionGroup>
@@ -225,3 +283,6 @@ 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).
@@ -124,3 +124,6 @@ Trading endpoints have both **burst** limits (short spikes allowed) and **sustai
Official TypeScript, Python, and Rust libraries.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+73
View File
@@ -49,6 +49,26 @@ Get up and running with the Polymarket API in minutes — fetch market data and
# ["123456...", "789012..."] — [Yes token ID, No token ID]
```
</Tab>
<Tab title="Rust">
```rust theme={null}
use polymarket_client_sdk::gamma::Client;
use polymarket_client_sdk::gamma::types::request::MarketsRequest;
let client = Client::default();
let request = MarketsRequest::builder()
.closed(false)
.limit(1)
.build();
let markets = client.markets(&request).await?;
let market = &markets[0];
println!("{:?}", market.question);
println!("{:?}", market.clob_token_ids);
// Some(["123456...", "789012..."]) — [Yes token ID, No token ID]
```
</Tab>
</Tabs>
Save a token ID from `clobTokenIds` — you'll need it to place an order. The first ID is the Yes token, the second is the No token. See [Fetching Markets](/market-data/fetching-markets) for more strategies like fetching by slug, tag, or event.
@@ -63,6 +83,10 @@ Get up and running with the Polymarket API in minutes — fetch market data and
```bash Python theme={null}
pip install py-clob-client
```
```bash Rust theme={null}
cargo add polymarket-client-sdk
```
</CodeGroup>
</Step>
@@ -119,6 +143,26 @@ Get up and running with the Polymarket API in minutes — fetch market data and
)
```
</Tab>
<Tab title="Rust">
```rust theme={null}
use std::str::FromStr;
use polymarket_client_sdk::POLYGON;
use polymarket_client_sdk::auth::{LocalSigner, Signer};
use polymarket_client_sdk::clob::{Client, Config};
let private_key = std::env::var("POLYMARKET_PRIVATE_KEY")?;
let signer = LocalSigner::from_str(&private_key)?
.with_chain_id(Some(POLYGON));
// Derive API credentials and initialize trading client (L1 → L2 auth)
// Signature type defaults to EOA (0)
let client = Client::new("https://clob.polymarket.com", Config::default())?
.authentication_builder(&signer)
.authenticate()
.await?;
```
</Tab>
</Tabs>
<Note>
@@ -194,6 +238,32 @@ Get up and running with the Polymarket API in minutes — fetch market data and
print("Status:", response["status"])
```
</Tab>
<Tab title="Rust">
```rust theme={null}
use polymarket_client_sdk::clob::types::Side;
use polymarket_client_sdk::types::dec;
// token_id is a U256 — parse from the string returned in Step 1
let token_id = "YOUR_TOKEN_ID".parse()?;
// The Rust SDK auto-fetches tick size, neg risk, and fee rate
// No need to manually look them up — the order builder handles it
let order = client
.limit_order()
.token_id(token_id)
.price(dec!(0.50))
.size(dec!(10))
.side(Side::Buy)
.build()
.await?;
let signed_order = client.sign(&signer, order).await?;
let response = client.post_order(signed_order).await?;
println!("Order ID: {}", response.order_id);
println!("Status: {:?}", response.status);
```
</Tab>
</Tabs>
</Step>
</Steps>
@@ -219,3 +289,6 @@ Get up and running with the Polymarket API in minutes — fetch market data and
Understand markets, events, prices, and positions.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+3
View File
@@ -57,3 +57,6 @@ The CLOB API has both public endpoints (orderbook, prices) and authenticated end
Official TypeScript, Python, and Rust libraries.
</Card>
</CardGroup>
Built with [Mintlify](https://mintlify.com).
+6 -3
View File
@@ -137,7 +137,7 @@ For the user channel, use `markets` instead of `assets_ids`:
## Heartbeats
### Market & User Channels
### Market and User Channels
Send `PING` every 10 seconds. The server responds with `PONG`.
@@ -165,7 +165,7 @@ pong
close connections that don't subscribe within a timeout period.
</Accordion>
<Accordion title="Connection drops after ~10 seconds">
<Accordion title="Connection drops after about 10 seconds">
You're not sending heartbeats. Send `PING` every 10 seconds for market/user
channels, or respond to server `ping` with `pong` for the sports channel.
</Accordion>
@@ -176,6 +176,9 @@ pong
expecting `best_bid_ask`, `new_market`, or `market_resolved` events
</Accordion>
<Accordion title="Authentication failed (user channel)">
<Accordion title="Authentication failed - user channel">
Verify your API credentials are correct and haven't expired.
</Accordion>
Built with [Mintlify](https://mintlify.com).