docs: sync Polymarket documentation (2026-05-03)

Updated 55 files with latest documentation changes
This commit is contained in:
Etherdrake
2026-05-03 14:55:37 +02:00
parent 3695c0249e
commit a54a713360
58 changed files with 799 additions and 637 deletions
+6 -6
View File
@@ -182,20 +182,20 @@ Before you can start market making, you need to complete these one-time setup st
```
```python Python theme={null}
from py_clob_client.client import ClobClient
from py_clob_client_v2 import ClobClient
import os
private_key = os.getenv("PRIVATE_KEY")
temp_client = ClobClient("https://clob.polymarket.com", key=private_key, chain=137)
credentials = temp_client.create_or_derive_api_creds()
temp_client = ClobClient("https://clob.polymarket.com", key=private_key, chain_id=137)
credentials = temp_client.create_or_derive_api_key()
```
```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};
use polymarket_client_sdk_v2::POLYGON;
use polymarket_client_sdk_v2::auth::{LocalSigner, Signer};
use polymarket_client_sdk_v2::clob::{Client, Config};
let private_key = std::env::var("POLYMARKET_PRIVATE_KEY")?;
let signer = LocalSigner::from_str(&private_key)?
+5 -5
View File
@@ -97,9 +97,9 @@ Split converts pUSD into equal amounts of YES and NO tokens — creating the inv
```
```rust Rust theme={null}
use polymarket_client_sdk::ctf::Client as CtfClient;
use polymarket_client_sdk::ctf::types::SplitPositionRequest;
use polymarket_client_sdk::types::{U256, address};
use polymarket_client_sdk_v2::ctf::Client as CtfClient;
use polymarket_client_sdk_v2::ctf::types::SplitPositionRequest;
use polymarket_client_sdk_v2::types::{U256, address};
let ctf_client = CtfClient::new(provider, 137)?;
@@ -181,7 +181,7 @@ Merge converts equal amounts of YES and NO tokens back into pUSD — useful for
```
```rust Rust theme={null}
use polymarket_client_sdk::ctf::types::MergePositionsRequest;
use polymarket_client_sdk_v2::ctf::types::MergePositionsRequest;
// Merge 500 YES + 500 NO back to 500 pUSD
let request = MergePositionsRequest::builder()
@@ -282,7 +282,7 @@ Once a market resolves, redeem winning tokens for pUSD. Each winning token is wo
```
```rust Rust theme={null}
use polymarket_client_sdk::ctf::types::RedeemPositionsRequest;
use polymarket_client_sdk_v2::ctf::types::RedeemPositionsRequest;
let request = RedeemPositionsRequest::builder()
.collateral_token(address!("0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB"))
+2 -6
View File
@@ -2,13 +2,9 @@
> Fetch the complete documentation index at: https://docs.polymarket.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Maker rebates
# Maker Rebates Program
***
title: "Maker Rebates Program"
description: "Earn daily USDC rebates by providing liquidity on Polymarket"
---------------------------------------------------------------------------
> Earn daily USDC rebates by providing liquidity on Polymarket
Polymarket charges taker fees across multiple market categories. Fees are determined by the protocol at match time and fund a **Maker Rebates** program that pays daily USDC rebates to liquidity providers.
+31 -28
View File
@@ -39,7 +39,6 @@ The core market making workflow is posting a bid and ask around your fair value.
side: Side.BUY,
price: 0.48,
size: 1000,
orderType: OrderType.GTC,
});
// Ask at 0.52
@@ -48,13 +47,12 @@ The core market making workflow is posting a bid and ask around your fair value.
side: Side.SELL,
price: 0.52,
size: 1000,
orderType: OrderType.GTC,
});
```
```python Python theme={null}
from py_clob_client.clob_types import OrderArgs, OrderType
from py_clob_client.order_builder.constants import BUY, SELL
from py_clob_client_v2 import OrderArgs, OrderType
from py_clob_client_v2.order_builder.constants import BUY, SELL
token_id = "3409705850427531082723332342151729..."
@@ -72,8 +70,8 @@ The core market making workflow is posting a bid and ask around your fair value.
```
```rust Rust theme={null}
use polymarket_client_sdk::clob::types::Side;
use polymarket_client_sdk::types::dec;
use polymarket_client_sdk_v2::clob::types::Side;
use polymarket_client_sdk_v2::types::dec;
let token_id = "3409705850427531082723332342151729...".parse()?;
@@ -112,33 +110,33 @@ For tighter spreads across multiple levels, use `postOrders` to submit up to 15
```
```python Python theme={null}
from py_clob_client.clob_types import OrderArgs, OrderType, PostOrdersArgs
from py_clob_client.order_builder.constants import BUY, SELL
from py_clob_client_v2 import OrderArgs, OrderType, PostOrdersV2Args
from py_clob_client_v2.order_builder.constants import BUY, SELL
response = client.post_orders([
PostOrdersArgs(
PostOrdersV2Args(
order=client.create_order(OrderArgs(
price=0.48, size=500, side=BUY, token_id=token_id,
)),
order_type=OrderType.GTC,
orderType=OrderType.GTC,
),
PostOrdersArgs(
PostOrdersV2Args(
order=client.create_order(OrderArgs(
price=0.47, size=500, side=BUY, token_id=token_id,
)),
order_type=OrderType.GTC,
orderType=OrderType.GTC,
),
PostOrdersArgs(
PostOrdersV2Args(
order=client.create_order(OrderArgs(
price=0.52, size=500, side=SELL, token_id=token_id,
)),
order_type=OrderType.GTC,
orderType=OrderType.GTC,
),
PostOrdersArgs(
PostOrdersV2Args(
order=client.create_order(OrderArgs(
price=0.53, size=500, side=SELL, token_id=token_id,
)),
order_type=OrderType.GTC,
orderType=OrderType.GTC,
),
])
```
@@ -184,21 +182,26 @@ Auto-expire quotes before known events like market close or resolution:
<CodeGroup>
```typescript TypeScript theme={null}
// Expire in 1 hour
const expiringOrder = await client.createOrder({
tokenID,
side: Side.BUY,
price: 0.5,
size: 1000,
orderType: OrderType.GTD,
expiration: Math.floor(Date.now() / 1000) + 3600,
});
const expiringOrder = await client.createAndPostOrder(
{
tokenID,
side: Side.BUY,
price: 0.5,
size: 1000,
expiration: Math.floor(Date.now() / 1000) + 3600,
},
undefined,
OrderType.GTD,
);
```
```python Python theme={null}
import time
from py_clob_client_v2 import OrderArgs, OrderType
from py_clob_client_v2.order_builder.constants import BUY
# Expire in 1 hour
expiring_order = client.create_order(
expiring_order = client.create_and_post_order(
OrderArgs(
token_id=token_id,
side=BUY,
@@ -212,7 +215,7 @@ Auto-expire quotes before known events like market close or resolution:
```rust Rust theme={null}
use chrono::{TimeDelta, Utc};
use polymarket_client_sdk::clob::types::OrderType;
use polymarket_client_sdk_v2::clob::types::OrderType;
// Expire in 1 hour
let order = client.limit_order()
@@ -272,7 +275,7 @@ See [Cancel Orders](/trading/orders/cancel) for full details.
```
```python Python theme={null}
from py_clob_client.clob_types import OpenOrderParams
from py_clob_client_v2 import OpenOrderParams
order = client.get_order(order_id)
@@ -282,7 +285,7 @@ See [Cancel Orders](/trading/orders/cancel) for full details.
```
```rust Rust theme={null}
use polymarket_client_sdk::clob::types::request::OrdersRequest;
use polymarket_client_sdk_v2::clob::types::request::OrdersRequest;
let order = client.order(order_id).await?;