Files
GLaDOS a1d6a46f74 docs: refresh all documentation - fill 98 empty files and update changelog
Date: 2026-06-19

Changes:
- Fixed 98 empty .md files that had failed to scrape
- Updated changelog with latest entries (Jun 15, 2026: CLOB DELETE /orders limit reduced to 1000)
- Refreshed FAQ, Polymarket Learn, Developers, and other sections

Notable updates:
- Jun 15, 2026: CLOB DELETE /orders maximum batch size reduced to 1000
- Jun 1, 2026: Increased CLOB order rate limits
- May 18, 2026: builderCode added to builders endpoints
- May 14, 2026: GET /markets/keyset limit reduced to 100
2026-06-19 14:09:52 +02:00

7.7 KiB

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 attributed to your builder code.

Overview

Builder attribution in V2 is handled natively through the order struct — you attach your builder code (a bytes32 identifier from your Builder Profile) to every order you submit. No separate client configuration is required.

```typescript TypeScript theme={null} import { ClobClient } from "@polymarket/clob-client-v2";

const client = new ClobClient({ host: "https://clob.polymarket.com", chain: 137, signer, creds: apiCreds, signatureType, funderAddress, });

// Attach your builder code on every order const response = await client.createAndPostOrder( { tokenID: "0x...", price: 0.55, size: 100, side: Side.BUY, builderCode: process.env.POLY_BUILDER_CODE!, }, { tickSize: "0.01", negRisk: false }, );


```python Python theme={null}
from py_clob_client_v2 import ClobClient
from py_clob_client_v2 import OrderArgs, PartialCreateOrderOptions
from py_clob_client_v2.order_builder.constants import BUY
import os

client = ClobClient(
    host="https://clob.polymarket.com",
    chain_id=137,
    key=os.getenv("PRIVATE_KEY"),
    creds=creds,
    signature_type=signature_type,
    funder=funder,
)

# Attach your builder code on every order
response = client.create_and_post_order(
    OrderArgs(
        token_id="0x...",
        price=0.55,
        size=100,
        side=BUY,
        builder_code=os.environ["POLY_BUILDER_CODE"],
    ),
    options=PartialCreateOrderOptions(tick_size="0.01", neg_risk=False),
)
See [Order Attribution](/trading/orders/attribution) for the full attribution flow.

Methods


getOrder

Get details for a specific order by ID.

async getOrder(orderID: string): Promise<OpenOrder>
```typescript TypeScript theme={null} const order = await client.getOrder("0xb816482a..."); console.log(order); ```
order = client.get_order("0xb816482a...")
print(order)

getOpenOrders

Get all open orders attributed to your builder code.

async getOpenOrders(
  params?: OpenOrderParams,
  only_first_page?: boolean,
): Promise<OpenOrder[]>

Params

Optional. Filter by order ID. Optional. Filter by market condition ID. Optional. Filter by token ID.
// All open orders for this builder
const orders = await client.getOpenOrders();

// Filtered by market
const marketOrders = await client.getOpenOrders({
  market: "0xbd31dc8a...",
});

getBuilderTrades

Retrieves all trades attributed to your builder code. Use this to track which trades were routed through your platform.

async getBuilderTrades(
  params?: TradeParams,
): Promise<BuilderTradesPaginatedResponse>

Params (TradeParams)

Optional. Filter trades by trade ID. Optional. Filter trades by maker address. Optional. Filter trades by market condition ID. Optional. Filter trades by asset (token) ID. Optional. Return trades created before this cursor value. Optional. Return trades created after this cursor value.

Response (BuilderTradesPaginatedResponse)

Array of trades attributed to the builder account. Cursor string for fetching the next page of results. Maximum number of trades returned per page. Total number of trades returned in this response.

BuilderTrade fields

Unique identifier for the trade. Type of the trade. Hash of the taker order associated with this trade. Builder code attributed to this trade. Condition ID of the market this trade belongs to. Token ID of the asset traded. Side of the trade (e.g. BUY or SELL). Size of the trade in shares. Size of the trade denominated in USDC. Price at which the trade was executed. Current status of the trade. Outcome label associated with the traded asset. Index of the outcome within the market. Address of the order owner (taker). Address of the maker in the trade. On-chain transaction hash for the trade. Timestamp when the trade was matched. Bucket index used for trade grouping. Fee charged for the trade in shares. Fee charged for the trade denominated in USDC. Optional. Error message if the trade encountered an issue, otherwise null. Timestamp when the trade record was created, or null if unavailable. Timestamp when the trade record was last updated, or null if unavailable.

See Also

Learn about the Builders Program and its benefits. Attach your builder code to orders for volume credit. Place and manage orders with API credentials. Execute onchain operations without paying gas.