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
18 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.
Public Methods
These methods can be called without a signer or user credentials. Use these for reading market data, prices, and order books.
Client Initialization
Public methods require the client to initialize with the host URL and Polygon chain ID.
```typescript theme={null} import { ClobClient } from "@polymarket/clob-client-v2";const client = new ClobClient({
host: "https://clob.polymarket.com",
chain: 137,
});
// Ready to call public methods
const markets = await client.getMarkets();
```
```python theme={null}
from py_clob_client_v2 import ClobClient
client = ClobClient(
host="https://clob.polymarket.com",
chain_id=137
)
# Ready to call public methods
markets = client.get_markets()
```
Health Check
getOk
Health check endpoint to verify the CLOB service is operational.
async getOk(): Promise<any>
Markets
getMarket
Get details for a single market by condition ID.
async getMarket(conditionId: string): Promise<Market>
getMarkets
Get details for multiple markets paginated.
async getMarkets(): Promise<PaginationPayload>
getSimplifiedMarkets
Get simplified market data paginated for faster loading.
async getSimplifiedMarkets(): Promise<PaginationPayload>
getSamplingMarkets
Get markets eligible for sampling/liquidity rewards.
async getSamplingMarkets(): Promise<PaginationPayload>
getSamplingSimplifiedMarkets
Get simplified market data for markets eligible for sampling/liquidity rewards.
async getSamplingSimplifiedMarkets(): Promise<PaginationPayload>
Order Books and Prices
calculateMarketPrice
Calculate the estimated price for a market order of a given size.
async calculateMarketPrice(
tokenID: string,
side: Side,
amount: number,
orderType: OrderType = OrderType.FOK
): Promise<number>
getOrderBook
Get the order book for a specific token ID.
async getOrderBook(tokenID: string): Promise<OrderBookSummary>
getOrderBooks
Get order books for multiple token IDs.
async getOrderBooks(params: BookParams[]): Promise<OrderBookSummary[]>
getPrice
Get the current best price for buying or selling a token ID.
async getPrice(
tokenID: string,
side: "BUY" | "SELL"
): Promise<any>
getPrices
Get the current best prices for multiple token IDs.
async getPrices(params: BookParams[]): Promise<PricesResponse>
getMidpoint
Get the midpoint price (average of best bid and best ask) for a token ID.
async getMidpoint(tokenID: string): Promise<any>
getMidpoints
Get the midpoint prices for multiple token IDs.
async getMidpoints(params: BookParams[]): Promise<any>
getSpread
Get the spread (difference between best ask and best bid) for a token ID.
async getSpread(tokenID: string): Promise<SpreadResponse>
getSpreads
Get the spreads for multiple token IDs.
async getSpreads(params: BookParams[]): Promise<SpreadsResponse>
getPricesHistory
Get historical price data for a token.
async getPricesHistory(params: PriceHistoryFilterParams): Promise<MarketPrice[]>
Trades
getLastTradePrice
Get the price of the most recent trade for a token.
async getLastTradePrice(tokenID: string): Promise<LastTradePrice>
getLastTradesPrices
Get the most recent trade prices for multiple tokens.
async getLastTradesPrices(params: BookParams[]): Promise<LastTradePriceWithToken[]>
getMarketTradesEvents
Get recent trade events for a market.
async getMarketTradesEvents(conditionID: string): Promise<MarketTradeEvent[]>
Market Parameters
getClobMarketInfo
Fetch all CLOB-level parameters for a market in a single call — tokens, tick size, base fees, rewards config, RFQ status, and fee details.
async getClobMarketInfo(conditionID: string): Promise<ClobMarketDetails>
Response (ClobMarketDetails)
t(string) — token IDo(string) — outcome label (e.g.Yes,No)
r(number) — fee ratee(number) — fee curve exponentto(boolean) — whether fees apply to takers only
getFeeRateBps
Get the fee rate in basis points for a token.
async getFeeRateBps(tokenID: string): Promise<number>
getFeeExponent
Get the fee curve exponent for a token. The exponent shapes the fee curve used by the protocol when calculating fees at match time.
async getFeeExponent(tokenID: string): Promise<number>
getTickSize
Get the tick size (minimum price increment) for a market.
async getTickSize(tokenID: string): Promise<TickSize>
getNegRisk
Check if a market uses negative risk (binary complementary tokens).
async getNegRisk(tokenID: string): Promise<boolean>
Time and Server Info
getServerTime
Get the current server timestamp.
async getServerTime(): Promise<number>