docs: update Polymarket docs - 2026-04-15

This commit is contained in:
OpenClaw Bot
2025-04-15 22:29:00 +00:00
parent d8e396519a
commit 6f25b31060
2 changed files with 461 additions and 0 deletions
+170
View File
@@ -0,0 +1,170 @@
> ## 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.
# Polymarket Changelog
> Welcome to the Polymarket Changelog. Here you will find any important changes to Polymarket, including but not limited to CLOB, API, UI and Mobile Applications.
<Update label="Apr 13, 2026" description="Bridge API: added support link for bridging issues">
* **Support contact**: Added a link to [our Bridge API provider's support](https://intercom.help/funxyz/en/articles/10732578-contact-us) (Fun.xyz) for failed, stuck, or compliance-held bridge transactions. See [Deposit Status](/trading/bridge/status).
</Update>
<Update label="Apr 10, 2026" description="New keyset pagination endpoints for markets and events">
* **New endpoints**: Added `GET /markets/keyset` and `GET /events/keyset` for cursor-based pagination, replacing offset-based `GET /markets` and `GET /events`.
* **How it works**: These use an opaque `after_cursor`/`next_cursor` token instead of `offset`, providing stable and efficient paging through large result sets. Same filters, same response shape per item — the only differences are the wrapper response (`{ "markets": [...], "next_cursor": "..." }`) and the rejection of `offset`.
* **Migration**: The existing `GET /markets` and `GET /events` endpoints remain available but will be deprecated in a future release. New integrations should use the keyset variants.
</Update>
<Update label="Apr 9, 2026" description="GET /markets: closed defaults to false">
* **`closed` default change**: The `closed` query parameter on `GET /markets` now defaults to `false`. Closed markets are excluded from results unless you explicitly pass `closed=true`.
</Update>
<Update label="Mar 31, 2026" description="REST API Fee Fields Update">
* **Fee calculation source**: Fees should now be calculated using the `feeSchedule` object within a market.
</Update>
<Update label="Mar 30, 2026" description="Fee Structure V2">
* **New fee categories**: Fees now apply to Crypto, Sports, Finance, Politics, Economics, Culture, Weather, Tech, Mentions, and Other / General markets with updated rates per category. Geopolitical and world events markets remain fee-free.
* **Updated documentation**: [Fees](/trading/fees) and [Maker Rebates Program](/market-makers/maker-rebates).
</Update>
<Update label="Mar 17, 2026" description="March Madness: $2M+ in Liquidity Rewards">
* **March Madness Liquidity Rewards**: Adding \$2M+ in liquidity rewards to both live and pregame markets.
* **How it works**: Liquidity rewards are payments for placing competitive bids. Rewards are paid out based on the size of your orders, how close they are to the midpoint, and how consistently they are quoted relative to other liquidity providers. Orders must be active on the book for a minimum of **3.5 seconds** to be eligible.
**Daily reward rates for markets (subject to change):**
**48 hours before GameStartTime:**
* \$7.5k for full game ML market
* \$500 for 5 other markets (most recently created full game spread, most recently created full game total, 1st half ML, most recently created 1st half spread, most recently created 1st half total)
**From game live to game completion (note: rewards are expressed in daily rates):**
* \$60k for full game ML
* \$4k for most recently created full game spread and most recently created full game total
**From game live to halftime (note: rewards are expressed in daily rates):**
* \$8k for 1st half ML, most recently created 1st half spread, most recently created 1st half total
* **Markets**: [Browse March Madness markets](https://polymarket.com/sports/cbb/games)
* **More details**: [Liquidity Rewards documentation](/market-makers/liquidity-rewards#liquidity-rewards)
</Update>
<Update label="Mar 1, 2026" description="Taker Fees & Maker Rebates: All Crypto Markets">
* **Crypto market fees expansion**: Starting March 6, 2026, taker fees and maker rebates extend to all crypto markets including 1H, 4H, daily, and weekly. The same fee structure as existing crypto markets applies. Only new markets created after March 6 are affected.
* **Updated documentation**: [Fees](/trading/fees) and [Maker Rebates Program](/market-makers/maker-rebates) updated to reflect all crypto market coverage.
</Update>
<Update label="Feb 12, 2026" description="5-Minute Crypto Markets">
* **5-minute crypto markets**: Launched with taker fees enabled. Fees follow the same curve as 15-minute crypto markets, peaking at 1.56% at 50% probability.
* **Maker Rebates**: Liquidity providers earn daily USDC rebates funded by taker fees, same as 15-minute crypto markets.
</Update>
<Update label="Feb 11, 2026" description="Taker Fees & Maker Rebates: NCAAB and Serie A">
* **Sports market fees**: Taker fees to be enabled on NCAAB (college basketball) and Serie A markets on February 18, 2026.
* **Per-market rebate calculation**: Rebates are now calculated per market, makers only compete with other makers in the same market.
* **Updated documentation**: [Maker Rebates Program](/market-makers/maker-rebates) updated with sports fee tables and parameters.
</Update>
<Update label="Jan 28, 2026" description="Bridge API: Withdrawal Endpoint">
* **Withdrawal Endpoint**: New `/withdraw` endpoint to bridge USDC.e from Polymarket to any supported chain and token.
* **Multi-chain withdrawals**: Withdraw to EVM chains (Ethereum, Arbitrum, Base, etc.), Solana, and Bitcoin.
* **Updated documentation**: Bridge API docs updated to reflect deposit and withdrawal functionality.
</Update>
<Update label="Jan 16, 2026" description="Docs Update: RTDS documentation">
* RTDS docs updated to reflect RTDS supports **comments** and **crypto prices** only.
* Removed legacy CLOB references and `clob_auth` from RTDS docs.
</Update>
<Update label="Jan 16, 2026" description="Docs Update: Maker Rebates Program">
* **Maker Rebates Program**: Updated funding schedule with distribution method (volume-weighted vs fee-curve weighted).
* **Fee-curve weighted rebates**: Documented fee-equivalent formula and rebate calculation.
* **FAQ**: Clarified how rebates are calculated during fee-curve weighted periods.
</Update>
<Update label="Jan 6, 2026" description="New API Features">
* **Releases**: Daily Releases timing
* **HeartBeats API**: HeartBeats endpoint for monitoring connection status and canceling orders
* **Post Only Orders**: Orders that are rejected if they would immediately match against an existing order
</Update>
<Update label="Jan 5, 2026" description="Taker Fees & Maker Rebates">
* **Taker Fees**: Enabled on 15-minute crypto markets. Fees vary by price and peak at 1.56% at 50% probability.
* **Maker Rebates**: Daily USDC rebates paid to liquidity providers, funded by taker fees.
</Update>
<Update label="Sept 24, 2025" description="Polymarket Real-Time Data Socket (RTDS) official release">
* **Crypto Price Feeds**: Access real-time cryptocurrency prices from two sources (Binance & Chainlink)
* **Comment Streaming**: Real-time updates for comment events including new comments, replies, and reactions
* **Dynamic Subscriptions**: Add, remove, and modify subscriptions without reconnecting
* **TypeScript Client**: Official TypeScript client available at [real-time-data-client](https://github.com/Polymarket/real-time-data-client)
For complete documentation, see [Market Data](/market-data/overview).
</Update>
<Update label="September 15, 2025" description="WSS price_change event update">
* There has been a significant change to the structure of the price change message. This update will be applied at 11PM UTC September 15, 2025. We apologize for the short notice
* Please see the [Market Channel](/market-data/websocket/market-channel) for details.
</Update>
<Update label="August 26, 2025" description="Updated /trades and /activity endpoints">
* Reduced maximum values for query parameters on Data-API /trades and /activity:
* `limit`: 500
* `offset`: 1,000
</Update>
<Update label="August 21, 2025" description="Batch Orders Increase">
* The batch orders limit has been increased from 5 -> 15. Read more about the batch orders functionality [here](/trading/orders/create).
</Update>
<Update label="July 23, 2025" description="Get Book(s) update">
* Were adding new fields to the `get-book` and `get-books` CLOB endpoints to include key market metadata that previously required separate queries.
* `min_order_size`
* type: string
* description: Minimum price increment.
* `neg_risk`
* type: boolean
* description: Boolean indicating whether the market is neg\_risk.
* `tick_size`
* type: string
* description: Minimum price increment.
</Update>
<Update label="June 3, 2025" description="New Batch Orders Endpoint">
* Were excited to roll out a highly requested feature: **order batching**. With this new endpoint, users can now submit up to five trades in a single request. To help you get started, weve included sample code demonstrating how to use it. Please see [Create Orders](/trading/orders/create) for more details.
</Update>
<Update label="June 3, 2025" description="Change to /data/trades">
* We're adding a new `side` field to the `MakerOrder` portion of the trade object. This field will indicate whether the maker order is a `buy` or `sell`, helping to clarify trade events where the maker side was previously ambiguous. For more details, refer to the MakerOrder object on the [Orders](/trading/orders/cancel) page.
</Update>
<Update label="May 28, 2025" description="Websocket Changes">
* The 100 token subscription limit has been removed for the Markets channel. You can now subscribe to as many token IDs as needed for your use case.
* New Subscribe Field `initial_dump`
* Optional field to indicate whether you want to receive the initial order book state when subscribing to a token or list of tokens.
* `default: true`
</Update>
<Update label="May 28, 2025" description="New FAK Order Type">
Were excited to introduce a new order type soon to be available to all users: Fill and Kill (FAK). FAK orders behave similarly to the well-known Fill or Kill (FOK) orders, but with a key difference:
* FAK will fill as many shares as possible immediately at your specified price, and any remaining unfilled portion will be canceled.
* Unlike FOK, which requires the entire order to fill instantly or be canceled, FAK is more flexible and aims to capture partial fills if possible.
</Update>
<Update label="May 15, 2025" description="Increased API Rate Limits">
All API users will enjoy increased rate limits for the CLOB endpoints.
* CLOB - /books (website) (300req - 10s / Throttle requests over the maximum configured rate)
* CLOB - /books (50 req - 10s / Throttle requests over the maximum configured rate)
* CLOB - /price (100req - 10s / Throttle requests over the maximum configured rate)
* CLOB markets/0x (50req / 10s - Throttle requests over the maximum configured rate)
* CLOB POST /order - 500 every 10s (50/s) - (BURST) - Throttle requests over the maximum configured rate
* CLOB POST /order - 3000 every 10 minutes (5/s) - Throttle requests over the maximum configured rate
* CLOB DELETE /order - 500 every 10s (50/s) - (BURST) - Throttle requests over the maximum configured rate
* DELETE /order - 3000 every 10 minutes (5/s) - Throttle requests over the maximum configured rate
</Update>
+291
View File
@@ -0,0 +1,291 @@
> ## 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
> Fetch a market and place your first order
Get up and running with the Polymarket API in minutes — fetch market data and place your first order.
<Steps>
<Step title="Fetch a Market">
All data endpoints are public — no API key or authentication needed. Use the markets endpoint to find a market and get its token IDs:
<Tabs>
<Tab title="cURL">
```bash theme={null}
curl "https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=1"
```
</Tab>
<Tab title="TypeScript">
```typescript theme={null}
const response = await fetch(
"https://gamma-api.polymarket.com/markets?active=true&closed=false&limit=1"
);
const markets = await response.json();
const market = markets[0];
console.log(market.question);
console.log(market.clobTokenIds);
// ["123456...", "789012..."] — [Yes token ID, No token ID]
```
</Tab>
<Tab title="Python">
```python theme={null}
import requests
response = requests.get(
"https://gamma-api.polymarket.com/markets",
params={"active": "true", "closed": "false", "limit": 1}
)
markets = response.json()
market = markets[0]
print(market["question"])
print(market["clobTokenIds"])
# ["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.
</Step>
<Step title="Install the SDK">
<CodeGroup>
```bash TypeScript theme={null}
npm install @polymarket/clob-client ethers@5
```
```bash Python theme={null}
pip install py-clob-client
```
```bash Rust theme={null}
cargo add polymarket-client-sdk
```
</CodeGroup>
</Step>
<Step title="Set Up Your Client">
Derive API credentials and initialize the trading client:
<Tabs>
<Tab title="TypeScript">
```typescript theme={null}
import { ClobClient } from "@polymarket/clob-client";
import { Wallet } from "ethers"; // v5.8.0
const HOST = "https://clob.polymarket.com";
const CHAIN_ID = 137; // Polygon mainnet
const signer = new Wallet(process.env.PRIVATE_KEY);
// Derive API credentials (L1 → L2 auth)
const tempClient = new ClobClient(HOST, CHAIN_ID, signer);
const apiCreds = await tempClient.createOrDeriveApiKey();
// Initialize trading client
const client = new ClobClient(
HOST,
CHAIN_ID,
signer,
apiCreds,
0, // Signature type: 0 = EOA
signer.address, // Funder address
);
```
</Tab>
<Tab title="Python">
```python theme={null}
from py_clob_client.client import ClobClient
import os
host = "https://clob.polymarket.com"
chain_id = 137 # Polygon mainnet
private_key = os.getenv("PRIVATE_KEY")
# Derive API credentials (L1 → L2 auth)
temp_client = ClobClient(host, key=private_key, chain_id=chain_id)
api_creds = temp_client.create_or_derive_api_creds()
# Initialize trading client
client = ClobClient(
host,
key=private_key,
chain_id=chain_id,
creds=api_creds,
signature_type=0, # Signature type: 0 = EOA
funder="YOUR_WALLET_ADDRESS", # Funder address
)
```
</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>
This example uses an EOA wallet (signature type `0`) — your wallet pays its
own gas. Proxy wallet users (types `1` and `2`) can use Polymarket's gasless
relayer instead. See [Authentication](/api-reference/authentication) for
details on signature types.
</Note>
<Warning>
Before trading, your funder address needs **USDC.e** (for buying outcome
tokens) and **POL** (for gas, if using EOA type `0`).
</Warning>
</Step>
<Step title="Place an Order">
Use the `token_id` from Step 1 to place a limit order:
<Tabs>
<Tab title="TypeScript">
```typescript theme={null}
import { Side, OrderType } from "@polymarket/clob-client";
// Fetch market details to get tick size and neg risk
const market = await client.getMarket("YOUR_CONDITION_ID");
const tickSize = String(market.minimum_tick_size); // e.g., "0.01"
const negRisk = market.neg_risk; // e.g., false
const response = await client.createAndPostOrder(
{
tokenID: "YOUR_TOKEN_ID", // From Step 1
price: 0.50,
size: 10,
side: Side.BUY,
orderType: OrderType.GTC,
},
{
tickSize,
negRisk,
},
);
console.log("Order ID:", response.orderID);
console.log("Status:", response.status);
```
</Tab>
<Tab title="Python">
```python theme={null}
from py_clob_client.clob_types import OrderArgs, OrderType
from py_clob_client.order_builder.constants import BUY
# Fetch market details to get tick size and neg risk
market = client.get_market("YOUR_CONDITION_ID")
tick_size = str(market["minimum_tick_size"]) # e.g., "0.01"
neg_risk = market["neg_risk"] # e.g., False
response = client.create_and_post_order(
OrderArgs(
token_id="YOUR_TOKEN_ID", # From Step 1
price=0.50,
size=10,
side=BUY,
order_type=OrderType.GTC,
),
options={
"tick_size": tick_size,
"neg_risk": neg_risk,
},
)
print("Order ID:", response["orderID"])
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>
***
## Next Steps
<CardGroup cols={2}>
<Card title="Authentication" icon="lock" href="/api-reference/authentication">
Understand L1/L2 auth, signature types, and API credentials.
</Card>
<Card title="Trading Quickstart" icon="bolt" href="/trading/quickstart">
Detailed trading guide with order management and troubleshooting.
</Card>
<Card title="Fetching Markets" icon="magnifying-glass" href="/market-data/fetching-markets">
Strategies for discovering markets by slug, tag, or category.
</Card>
<Card title="Core Concepts" icon="book" href="/concepts/markets-events">
Understand markets, events, prices, and positions.
</Card>
</CardGroup>