2026-04-14 21:53:47 +02:00
> ## 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.
2026-02-19 14:31:02 +01:00
# Clients & SDKs
> Official open-source libraries for interacting with Polymarket
Polymarket provides official open-source clients in TypeScript, Python, and Rust. All three support the full CLOB API including market data, order management, and authentication.
## Installation
<CodeGroup>
```bash TypeScript theme={null}
2026-05-04 14:56:14 +02:00
npm install @polymarket/clob-client-v2 viem
2026-02-19 14:31:02 +01:00
` ``
` ``bash Python theme={null}
2026-04-20 01:19:37 +02:00
pip install py-clob-client-v2
2026-02-19 14:31:02 +01:00
` ``
` ``bash Rust theme={null}
2026-05-04 14:56:14 +02:00
cargo add polymarket_client_sdk_v2 --features clob
2026-02-19 14:31:02 +01:00
` ``
</CodeGroup>
## Quick Example
<CodeGroup>
` ``typescript TypeScript theme={null}
2026-04-20 01:19:37 +02:00
import { ClobClient } from "@polymarket/clob-client-v2";
2026-02-19 14:31:02 +01:00
2026-04-20 01:19:37 +02:00
const client = new ClobClient({
host: "https://clob.polymarket.com",
chain: 137,
2026-02-19 14:31:02 +01:00
signer,
2026-04-20 01:19:37 +02:00
creds: apiCreds,
});
2026-02-19 14:31:02 +01:00
const markets = await client.getMarkets();
` ``
` ``python Python theme={null}
2026-05-04 14:56:14 +02:00
from py_clob_client_v2 import ClobClient
2026-02-19 14:31:02 +01:00
client = ClobClient(
"https://clob.polymarket.com",
key=private_key,
2026-05-04 14:56:14 +02:00
chain_id=137,
2026-02-19 14:31:02 +01:00
creds=api_creds,
)
markets = client.get_markets()
` ``
2026-03-30 12:53:20 +02:00
` ``rust Rust theme={null}
2026-05-04 14:56:14 +02:00
use polymarket_client_sdk_v2::clob::{Client, Config};
2026-03-30 12:53:20 +02:00
let client = Client::new("https://clob.polymarket.com", Config::default())?
.authentication_builder(&signer)
.authenticate()
.await?;
let markets = client.markets(None).await?;
` ``
2026-02-19 14:31:02 +01:00
</CodeGroup>
## Source Code
2026-04-20 01:19:37 +02:00
| Language | Package | Repository |
| ---------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
| TypeScript | ` @polymarket/clob -client-v2` | [github.com/Polymarket/clob-client-v2](https://github.com/Polymarket/clob-client-v2) |
| Python | ` py-clob-client-v2` | [github.com/Polymarket/py-clob-client-v2](https://github.com/Polymarket/py-clob-client-v2) |
2026-05-04 14:56:14 +02:00
| Rust | ` polymarket_client_sdk_v2` | [github.com/Polymarket/rs-clob-client-v2](https://github.com/Polymarket/rs-clob-client-v2) |
2026-02-19 14:31:02 +01:00
Each repository includes working examples in the ` /examples` directory.
## Relayer SDK
2026-05-08 14:59:53 +02:00
For [gasless transactions](/trading/gasless), the relayer client handles deposit
wallet creation and signed wallet batches for new API users. Existing Safe and
Proxy wallet flows remain supported.
2026-02-19 14:31:02 +01:00
| Language | Package | Repository |
| ---------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| TypeScript | ` @polymarket/builder -relayer-client` | [github.com/Polymarket/builder-relayer-client](https://github.com/Polymarket/builder-relayer-client) |
| Python | ` py-builder-relayer-client` | [github.com/Polymarket/py-builder-relayer-client ](https://github.com/Polymarket/py-builder-relayer-client ) |
## Next Steps
<CardGroup cols={2}>
<Card title="Quickstart" icon="rocket" href="/quickstart">
Set up your client and place your first order.
</Card>
<Card title="Authentication" icon="lock" href="/api-reference/authentication">
Understand L1/L2 auth and API credentials.
</Card>
</CardGroup>