Update Polymarket documentation (2026-02-19)

- Added new documentation URLs from llms.txt index
- Updated TARGET.md with 244 total documentation pages
- Scraped new pages for trading, concepts, and API reference sections
- Updated changelog and new index pages
This commit is contained in:
AI Agent
2026-02-19 14:31:02 +01:00
parent 81f77eff3c
commit b2a29fe51f
250 changed files with 33306 additions and 9659 deletions
+157 -65
View File
@@ -8,9 +8,7 @@
## Client Initialization
Builder methods require the client to initialize with a separate authentication setup using
builder configs acquired from [Polymarket.com](https://polymarket.com/settings?tab=builder)
and the `@polymarket/builder-signing-sdk` package.
Builder methods require the client to initialize with a separate builder config using credentials acquired from [Polymarket.com](https://polymarket.com/settings?tab=builder) and the `@polymarket/builder-signing-sdk` package.
<Tabs>
<Tab title="Local Builder Credentials">
@@ -31,7 +29,7 @@ and the `@polymarket/builder-signing-sdk` package.
"https://clob.polymarket.com",
137,
signer,
apiCreds, // The user's API credentials generated from L1 authentication
apiCreds, // User's API credentials from L1 authentication
signatureType,
funderAddress,
undefined,
@@ -57,7 +55,7 @@ and the `@polymarket/builder-signing-sdk` package.
host="https://clob.polymarket.com",
chain_id=137,
key=os.getenv("PRIVATE_KEY"),
creds=creds, # The user's API credentials generated from L1 authentication
creds=creds, # User's API credentials from L1 authentication
signature_type=signature_type,
funder=funder,
builder_config=builder_config
@@ -73,14 +71,14 @@ and the `@polymarket/builder-signing-sdk` package.
import { BuilderConfig } from "@polymarket/builder-signing-sdk";
const builderConfig = new BuilderConfig({
remoteBuilderConfig: {url: "http://localhost:3000/sign"}
remoteBuilderConfig: { url: "http://localhost:3000/sign" }
});
const clobClient = new ClobClient(
"https://clob.polymarket.com",
137,
signer,
apiCreds, // The user's API credentials generated from L1 authentication
apiCreds, // User's API credentials from L1 authentication
signatureType,
funder,
undefined,
@@ -89,7 +87,7 @@ and the `@polymarket/builder-signing-sdk` package.
);
```
```typescript Python theme={null}
```python Python theme={null}
from py_clob_client.client import ClobClient
from py_builder_signing_sdk.config import BuilderConfig, RemoteBuilderConfig
import os
@@ -104,7 +102,7 @@ and the `@polymarket/builder-signing-sdk` package.
host="https://clob.polymarket.com",
chain_id=137,
key=os.getenv("PRIVATE_KEY"),
creds=creds, # The user's API credentials generated from L1 authentication
creds=creds, # User's API credentials from L1 authentication
signature_type=signature_type,
funder=funder,
builder_config=builder_config
@@ -115,7 +113,7 @@ and the `@polymarket/builder-signing-sdk` package.
</Tabs>
<Info>
[More information on builder signing](/developers/builders/order-attribution)
See [Order Attribution](/trading/orders/attribution) for more information on builder signing.
</Info>
***
@@ -126,8 +124,7 @@ and the `@polymarket/builder-signing-sdk` package.
### getBuilderTrades()
Retrieves all trades attributed to your builder account.
This method allows builders to track which trades were routed through your platform.
Retrieves all trades attributed to your builder account. Use this to track which trades were routed through your platform.
```typescript Signature theme={null}
async getBuilderTrades(
@@ -135,81 +132,176 @@ async getBuilderTrades(
): Promise<BuilderTradesPaginatedResponse>
```
```typescript Params theme={null}
interface TradeParams {
id?: string;
maker_address?: string;
market?: string;
asset_id?: string;
before?: string;
after?: string;
}
```
**Params (`TradeParams`)**
```typescript Response theme={null}
interface BuilderTradesPaginatedResponse {
trades: BuilderTrade[];
next_cursor: string;
limit: number;
count: number;
}
<ResponseField name="id" type="string">
Optional. Filter trades by trade ID.
</ResponseField>
interface BuilderTrade {
id: string;
tradeType: string;
takerOrderHash: string;
builder: string;
market: string;
assetId: string;
side: string;
size: string;
sizeUsdc: string;
price: string;
status: string;
outcome: string;
outcomeIndex: number;
owner: string;
maker: string;
transactionHash: string;
matchTime: string;
bucketIndex: number;
fee: string;
feeUsdc: string;
err_msg?: string | null;
createdAt: string | null;
updatedAt: string | null;
}
```
<ResponseField name="maker_address" type="string">
Optional. Filter trades by maker address.
</ResponseField>
<ResponseField name="market" type="string">
Optional. Filter trades by market condition ID.
</ResponseField>
<ResponseField name="asset_id" type="string">
Optional. Filter trades by asset (token) ID.
</ResponseField>
<ResponseField name="before" type="string">
Optional. Return trades created before this cursor value.
</ResponseField>
<ResponseField name="after" type="string">
Optional. Return trades created after this cursor value.
</ResponseField>
**Response (`BuilderTradesPaginatedResponse`)**
<ResponseField name="trades" type="BuilderTrade[]">
Array of trades attributed to the builder account.
</ResponseField>
<ResponseField name="next_cursor" type="string">
Cursor string for fetching the next page of results.
</ResponseField>
<ResponseField name="limit" type="number">
Maximum number of trades returned per page.
</ResponseField>
<ResponseField name="count" type="number">
Total number of trades returned in this response.
</ResponseField>
**`BuilderTrade` fields**
<ResponseField name="id" type="string">
Unique identifier for the trade.
</ResponseField>
<ResponseField name="tradeType" type="string">
Type of the trade.
</ResponseField>
<ResponseField name="takerOrderHash" type="string">
Hash of the taker order associated with this trade.
</ResponseField>
<ResponseField name="builder" type="string">
Address of the builder who attributed this trade.
</ResponseField>
<ResponseField name="market" type="string">
Condition ID of the market this trade belongs to.
</ResponseField>
<ResponseField name="assetId" type="string">
Token ID of the asset traded.
</ResponseField>
<ResponseField name="side" type="string">
Side of the trade (e.g. BUY or SELL).
</ResponseField>
<ResponseField name="size" type="string">
Size of the trade in shares.
</ResponseField>
<ResponseField name="sizeUsdc" type="string">
Size of the trade denominated in USDC.
</ResponseField>
<ResponseField name="price" type="string">
Price at which the trade was executed.
</ResponseField>
<ResponseField name="status" type="string">
Current status of the trade.
</ResponseField>
<ResponseField name="outcome" type="string">
Outcome label associated with the traded asset.
</ResponseField>
<ResponseField name="outcomeIndex" type="number">
Index of the outcome within the market.
</ResponseField>
<ResponseField name="owner" type="string">
Address of the order owner (taker).
</ResponseField>
<ResponseField name="maker" type="string">
Address of the maker in the trade.
</ResponseField>
<ResponseField name="transactionHash" type="string">
On-chain transaction hash for the trade.
</ResponseField>
<ResponseField name="matchTime" type="string">
Timestamp when the trade was matched.
</ResponseField>
<ResponseField name="bucketIndex" type="number">
Bucket index used for trade grouping.
</ResponseField>
<ResponseField name="fee" type="string">
Fee charged for the trade in shares.
</ResponseField>
<ResponseField name="feeUsdc" type="string">
Fee charged for the trade denominated in USDC.
</ResponseField>
<ResponseField name="err_msg" type="string | null">
Optional. Error message if the trade encountered an issue, otherwise null.
</ResponseField>
<ResponseField name="createdAt" type="string | null">
Timestamp when the trade record was created, or null if unavailable.
</ResponseField>
<ResponseField name="updatedAt" type="string | null">
Timestamp when the trade record was last updated, or null if unavailable.
</ResponseField>
***
### revokeBuilderApiKey()
Revokes the builder API key used to authenticate the current request.
After revocation, the key can no longer be used to make builder-authenticated requests.
Revokes the builder API key used to authenticate the current request. After revocation, the key can no longer be used for builder-authenticated requests.
```typescript Signature theme={null}
async revokeBuilderApiKey(): Promise<any>
```
<ResponseField name="returns" type="any">
Response from the revocation request.
</ResponseField>
***
## See Also
<CardGroup cols={2}>
<Card title="Builders Program Introduction" icon="hammer" href="/developers/builders/builder-intro">
Learn the benefits, how to implement, and more.
<Card title="Builders Program" icon="hammer" href="/builders/overview">
Learn about the Builders Program and its benefits.
</Card>
<Card title="Implement Builders Signing" icon="key" href="/developers/builders/order-attribution">
Attribute orders to you, and pre-requisite to using the Relayer Client.
<Card title="Order Attribution" icon="key" href="/trading/orders/attribution">
Attribute orders to your builder account.
</Card>
<Card title="Relayer Client" icon="globe" href="/developers/builders/relayer-client">
The relayer executes other gasless transactions for your users, on your app.
<Card title="L2 Methods" icon="lock" href="/trading/clients/l2">
Place and manage orders with API credentials.
</Card>
<Card title="Full Example Implementations" icon="puzzle" href="/developers/builders/examples">
Complete Next.js examples integrated with embedded wallets (Privy, Magic, Turnkey, wagmi)
<Card title="Gasless Transactions" icon="gas-pump" href="/trading/gasless">
Execute onchain operations without paying gas.
</Card>
</CardGroup>