NEW: Live arbitrage across 10+ prediction markets.Arbitrage →
← Index
APIOct 5, 2026

Polymarket and Kalshi Rust SDKs (2026): Clients and Examples

Polymarket and Kalshi Rust SDKs (2026): Clients and Examples

The Short Answer

Polymarket publishes an official Rust client, the polymarket_client_sdk_v2 crate, and says a unified Rust SDK is in progress. Kalshi has no official Rust SDK. Polymarket's docs pin version 0.7.0, and the newest release on crates.io is 0.8.0, from 10 September 2026. Kalshi's official SDKs cover Python and TypeScript, and for production it recommends generating your own client from its OpenAPI spec. Every Kalshi crate on crates.io is a community project. In our checks on 3 October 2026, the Polymarket crate's default CLOB host no longer resolved, and none of the six Kalshi crates we checked referenced Ed25519, Kalshi's default key type.

Key Takeaways

  • polymarket_client_sdk_v2 is MIT licensed, needs Rust 1.88 or newer, and splits into features for the CLOB, WebSockets, Gamma, the Data API and more.
  • Its CLOB client defaults to clob-v2.polymarket.com, a retired test host, so pass https://clob.polymarket.com to Client::new.
  • Crates named rs-clob-client and rs-clob-client-v2 are community projects, even though they share names with Polymarket's repositories.
  • Kalshi's OpenAPI spec, version 3.32.0 as of October 2026, is the official starting point for a Rust client.
  • The Kalshi crates we checked sign with RSA-PSS only, so create an RSA key rather than an Ed25519 key for them.

Does Polymarket have an official Rust SDK?

Yes. Polymarket's docs call polymarket_client_sdk_v2 "the current Rust SDK" and say "a unified Rust SDK is in progress". The crate is built from Polymarket's rs-clob-client-v2 repository, carries an MIT license, and targets the 2024 edition with Rust 1.88 or newer. Two crates on crates.io come from Polymarket's own repositories:

CrateStatusNewest versionLast updated
polymarket_client_sdk_v2Official, for CLOB V20.8.010 Sep 2026
polymarket-client-sdkOfficial, earlier generation0.4.417 Mar 2026

The older crate stopped at 0.4.4 in March 2026. On 28 April 2026 Polymarket moved to CLOB V2, with new exchange contracts, a new order struct and pUSD collateral, and its changelog said there would be no backward compatibility after go-live. New code belongs on the V2 crate.

Everything else is community-built. A crates.io search for "polymarket" returned 94 crates on 3 October 2026, so watch the names. rs-clob-client and rs-clob-client-v2 are published by a community developer, not Polymarket. polymarket-us describes itself as an unofficial SDK for Polymarket US, whose official SDKs cover Python and TypeScript only. If you choose a community crate, check that it has a release after 28 April 2026.

How do you install the Polymarket Rust SDK?

Polymarket's docs give this command, which turns on the clob feature for authentication and trading:

cargo add polymarket_client_sdk_v2@0.7.0 --features clob

The docs pin 0.7.0. The newest release, 0.8.0, adds support for Polymarket V2 position IDs in Exchange V3 orders and market data reads, according to the crate's changelog. Everything beyond the CLOB sits behind a feature flag, and --features takes a comma-separated list such as clob,gamma.

FeatureWhat it adds
clobThe core CLOB client: orders, market data and authentication
wsWebSocket streams for order books, prices and user events
gammaGamma API client for market and event discovery and search
dataData API client for positions, trades and leaderboards
rtdsReal-time crypto price streams from Binance and Chainlink, plus comments
ctfSplit, merge and redeem on binary and neg-risk markets
heartbeatsAutomatic heartbeats, so open orders are canceled if the client disconnects
rfqRequest for quote endpoints within the CLOB
bridgeBridge API client for cross-chain deposits
tracingStructured logging of requests and auth flows

What does a Polymarket Rust SDK example look like?

This read-only example is copied from the crate's README. It needs the gamma feature, and your own Cargo.toml needs tokio and anyhow, which the example uses directly:

use polymarket_client_sdk_v2::gamma::Client;
use polymarket_client_sdk_v2::gamma::types::request::{EventsRequest, SearchRequest};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let client = Client::default();

    // Find active events
    let request = EventsRequest::builder().active(true).limit(5).build();
    let events = client.events(&request).await?;
    println!("Found {} events", events.len());

    // Search for markets
    let search = SearchRequest::builder().q("bitcoin").build();
    let results = client.search(&search).await?;
    println!("Search results: {:?}", results);
    Ok(())
}

The Gamma client defaults to https://gamma-api.polymarket.com and needs no key. It calls GET /events and GET /public-search. When we ran those two requests on 3 October 2026, the first returned five active events and the second returned matching events with pagination.

For trading, Polymarket's docs say the crate supports the CLOB order path for an existing Deposit Wallet: pass the wallet as the funder and authenticate with SignatureType::Poly1271. It has no client for deploying Deposit Wallets or submitting wallet batches, which go through the direct API. The wallet types are explained in our Polymarket proxy wallet guide.

Which CLOB host should the Polymarket Rust SDK use?

Set it yourself. In both 0.7.0 and 0.8.0, the CLOB's Client::default() points at https://clob-v2.polymarket.com, and the examples in the README and the docs pass the same host. That was the test host before launch. Polymarket's changelog says that as of 28 April 2026, V2 runs on https://clob.polymarket.com.

In our checks on 3 October 2026, clob-v2.polymarket.com returned no DNS records, while clob.polymarket.com answered {"version":2} on GET /version. Build the client with Client::new and pass https://clob.polymarket.com as the host. The SDK reads /version to decide how to sign orders, so the live host gets you V2 signing.

Is there an official Kalshi Rust SDK?

No. Kalshi's SDK page lists kalshi_python_sync, kalshi_python_async and kalshi-typescript, and warns that SDKs "may lag the API". For production it recommends generating your own client from its specs, or integrating directly. REST is described in an OpenAPI file, at version 3.32.0 as of October 2026, and WebSockets in an AsyncAPI file.

The Rust crates for Kalshi are all community projects. These are the client crates on crates.io as of 3 October 2026:

CrateNewest versionLast updatedAuth in the source
kalshi-pmx0.1.125 Jun 2026API key, RSA-PSS
kalshi-trade-rs0.6.018 Apr 2026API key, RSA-PSS
kalshi-fast-rs0.3.112 Apr 2026API key, RSA-PSS
kalshi-rs0.2.217 Mar 2026API key, RSA-PSS
kalshi-rust1.0.026 Dec 2025API key, RSA-PSS
kalshi0.9.014 Nov 2023Email and password

Two things stand out. Kalshi now selects Ed25519 by default when you create an API key, and its official SDKs accept Ed25519 from version 3.31.0, yet none of these crates referenced Ed25519 in its latest source when we checked. Create an RSA key for them. And kalshi 0.9.0 logs in with an email and password, a flow Kalshi's current API reference no longer documents. Key setup is covered in how to get a Kalshi API key.

How do you call Kalshi from Rust without an SDK?

Public market data needs no key, so any HTTP client works:

curl -s "https://external-api.kalshi.com/trade-api/v2/markets?limit=2&status=open"

The response holds markets and a cursor for the next page. Prices arrive as dollar strings such as "0.0000" in fields like yes_bid_dollars, and volumes as fixed-point strings in fields like volume_fp, so parse them into a decimal type rather than a float.

Authenticated requests carry three headers: KALSHI-ACCESS-KEY with the key ID, KALSHI-ACCESS-TIMESTAMP in milliseconds, and KALSHI-ACCESS-SIGNATURE, a base64 signature of the timestamp, the HTTP method and the path with its query string removed. RSA keys sign with RSA-PSS over SHA-256, and Ed25519 keys sign the text directly. Kalshi's spec models those three headers as plain header keys, so a client generated from it still needs your code to compute the signature on every request.

How do you query Polymarket and Kalshi from Rust with one API?

Two venues means two auth schemes, two sets of field names and, for Kalshi, a client you maintain yourself. The Predictefy API is plain REST at data.predictefy.com, so a Rust service calls it with the HTTP client it already has, and the same request shape covers Polymarket, Kalshi and the rest of its 15+ venues:

curl -s "https://data.predictefy.com/api/polymarket/fetchMarkets?limit=3&sort=volume" \
  -H "Authorization: Bearer pk_live_YOUR_KEY"

Swap polymarket for kalshi to read Kalshi's markets in the same normalized schema. Responses arrive as { success, data, ... }, and errors carry a code, a message and a retryable flag, which map neatly onto a Rust Result. A market read costs 1 credit, and the Free plan includes 25,000 credits a month.

Frequently Asked Questions

Does Polymarket have an official Rust SDK?

Yes. polymarket_client_sdk_v2 is Polymarket's current Rust client, and Polymarket says a unified Rust SDK is in progress. Its docs pin version 0.7.0, and the newest release on crates.io is 0.8.0, published on 10 September 2026.

Is there an official Kalshi Rust SDK?

No. Kalshi publishes Python and TypeScript SDKs and recommends generating your own client from its OpenAPI spec, or integrating directly. Kalshi crates on crates.io, such as kalshi-trade-rs and kalshi-rs, are community projects.

Which Polymarket Rust crate should I install?

polymarket_client_sdk_v2. The older polymarket-client-sdk predates the CLOB V2 cutover of 28 April 2026, and the crates named rs-clob-client and rs-clob-client-v2 come from a community developer, not Polymarket.

What Rust version does polymarket_client_sdk_v2 need?

Rust 1.88.0 or newer, on the 2024 edition, according to the crate's manifest for both 0.7.0 and 0.8.0. It is MIT licensed.

Do Kalshi Rust crates support Ed25519 keys?

Not the ones we checked. In the latest releases of six community Kalshi crates on 3 October 2026, none referenced Ed25519, and five signed requests with RSA-PSS. Kalshi selects Ed25519 by default when you create a key, so choose RSA for these crates.

Which host does the Polymarket Rust SDK use?

Its CLOB Client::default() points at clob-v2.polymarket.com, which had no DNS records in our checks on 3 October 2026. Pass https://clob.polymarket.com to Client::new instead, since Polymarket has run CLOB V2 there since 28 April 2026.