Client Initialization
Builder methods require the client to initialize with a separate builder config using credentials acquired from Polymarket.com and the@polymarket/builder-signing-sdk package.
- Local Builder Credentials
- Remote Builder Signing
See Order Attribution for more information on builder signing.
Methods
getOrder
Get details for a specific order by ID using builder authentication. When called from a builder-configured client, the request authenticates with builder headers and returns orders attributed to the builder.Signature
When a
BuilderConfig is present, the client automatically sends builder headers. If builder auth is unavailable, it falls back to standard L2 headers.getOpenOrders
Get all open orders attributed to the builder. When called from a builder-configured client, returns orders placed through the builder rather than orders owned by the authenticated user.Signature
Optional. Filter by order ID.
Optional. Filter by market condition ID.
Optional. Filter by token ID.
TypeScript
getBuilderTrades
Retrieves all trades attributed to your builder account. Use this to track which trades were routed through your platform.Signature
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.
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.
Address of the builder who attributed 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.
revokeBuilderApiKey
Revokes the builder API key used to authenticate the current request. After revocation, the key can no longer be used for builder-authenticated requests.Signature
Response from the revocation request.