RRebetiAll guides

Kalshi API vs. Polymarket API: Auth, Orders and Rate Limits Compared

Updated

If you are building a prediction market bot, the API decides more than the code. It decides what credential you have to guard, what units your prices come in, how you find a market's ID, and how fast you can poll before you get throttled. Kalshi and Polymarket differ on every one of these. And "the Polymarket API" is really two APIs, because Polymarket US and Polymarket International are separate exchanges.

This guide compares the three integrations a cross-venue bot actually has to write. We built all three into Rebeti's auto-trader, so the details below come from working code, not from the marketing pages.

RSA-PSS
Kalshi signing
Ed25519
Polymarket US signing
EIP-712
Polymarket Intl signing
All 3
Read market data without a key

Quick answer

  • Kalshi works like a brokerage API. You get an API key ID and an RSA private key, you sign each request, and prices come back in whole cents for whole contracts, settled in US dollars.
  • Polymarket US also works like a brokerage API. You get a key ID and an Ed25519 secret from its developer page, and you trade US-dollar contracts on its own order book.
  • Polymarket International is a crypto exchange with an order-book API on top. Your trading credential is a wallet private key. Each order is a signed EIP-712 message that settles in USDC on Polygon.

If you only need US-regulated venues, Kalshi and Polymarket US are close cousins. Polymarket International is the odd one out, and it adds key custody to your security work.

Authentication: three different signing schemes

Same order, three APIssample data
Host
api.elections.kalshi.com/trade-api/v2
You hold
API key ID + RSA private key (.pem)
Signing
RSA-PSS (SHA-256)
Signed payload
timestampMs + METHOD + path
Price & size units
Whole cents (1–99), whole contracts, USD
POST /trade-api/v2/portfolio/orders
KALSHI-ACCESS-KEY:       8f3c…e21a
KALSHI-ACCESS-TIMESTAMP: 1762380000000
KALSHI-ACCESS-SIGNATURE: Zm9v…base64…YmFy

{
  "action": "buy",
  "side": "yes",
  "ticker": "KXNBAGAME-26NOV06BOSNYK-BOS",
  "type": "limit",
  "yes_price": 34,
  "count": 12,
  "client_order_id": "b7d1…",
  "expiration_ts": 1762380300
}
Buying 12 YES contracts at 34¢ on the same NBA game. Keys and signatures are placeholders; header names, signing schemes and body fields follow each venue's API.

Kalshi

You create an API key under your Kalshi profile and download a .pem file once. Every authenticated request carries three headers: KALSHI-ACCESS-KEY, KALSHI-ACCESS-TIMESTAMP and KALSHI-ACCESS-SIGNATURE. The signature is RSA-PSS with SHA-256 over the millisecond timestamp, the HTTP method and the path, without the query string. If you include the query string, the signature fails, and the error message rarely tells you why.

Polymarket US

The model is the same, with a different curve. You create a key on the Polymarket US developer page and the secret is shown once. Requests carry X-PM-Access-Key, X-PM-Timestamp and X-PM-Signature, an Ed25519 signature over timestamp, method and path. Public market data comes from a separate gateway host that needs no credentials.

Polymarket International (CLOB)

Here authentication has two layers:

  1. L1, the wallet. You sign a fixed EIP-712 message with your wallet's private key to prove you control the address. That signature is used to create or derive a CLOB API key, secret and passphrase.
  2. L2, the API. Each request is signed with HMAC-SHA256 over timestamp, method, path and body, and sent with the POLY_* headers.

On top of that, every order is its own EIP-712 signature from the wallet. So you can't drop the private key after setup. A bot has to hold it for as long as it trades. You also need the right signature type (a plain wallet, a Polymarket-managed proxy wallet, or a Safe), and the right exchange contract, because multi-outcome "neg-risk" markets use a different one than binary markets.

Key custody is the biggest practical difference

A leaked Kalshi or Polymarket US API key can be revoked from the venue's settings page. A leaked wallet private key controls the funds in that wallet directly. If you self-host a Polymarket International bot, use a dedicated wallet holding only your trading bankroll, and keep the key encrypted and server-side.

Connect-a-venue fields from the Rebeti appsample data
KalshiNot connected

Kalshi → Profile → API keys: the key ID shown next to the key.

The .pem file Kalshi downloads when you create the API key — paste its full contents.

Created at kalshi.com

Polymarket InternationalNot connected

Polymarket → Settings → Export private key (the wallet holding your USDC). This is the only value you provide: the API key, secret and passphrase are derived from it on our server.

Only needed if your USDC sits in the Polymarket-managed wallet: Polymarket → Deposit shows that address. Leave blank and we read the balance of the key's own wallet.

Created at polymarket.com

What each API asks for before a bot can trade. Kalshi needs a key ID and the RSA .pem file it issued. Polymarket International needs the wallet's private key, and the CLOB API key, secret and passphrase are derived from it.

Order types and payloads

All three venues are central limit order books for binary YES/NO contracts, and all three accept limit orders. The differences that cause bugs are in units and identifiers:

Kalshi

  • —Market ID is a ticker (series → event → market)
  • —Price in whole cents, 1–99; size in whole contracts
  • —Limit orders with an expiration time; you buy the YES or NO side
  • —Fill-or-kill and immediate-or-cancel available
  • —Minimum order: 1 contract

Polymarket US

  • —Market ID is a slug; you pick the YES or NO outcome side
  • —Price as a probability in 1¢ ticks
  • —Limit orders with good-till-date expiry
  • —Separate public gateway for markets and prices
  • —Minimum order in Rebeti: 5 contracts

Polymarket International

  • —Each outcome is a token ID under a condition ID
  • —Orders are maker/taker amounts in USDC base units
  • —GTC, GTD, FOK and FAK order types
  • —Tick size can vary by market, so read it before pricing
  • —Minimum order in Rebeti: 5 shares

The Polymarket International payload trips people up most. You don't send "12 contracts at 34¢". You send a signed order that says how much USDC you give (makerAmount) and how many outcome tokens you get back (takerAmount), both as integers with six decimals. The price is implied by the ratio. If you round one side and not the other, the order lands at a slightly different price than you intended.

If you are deciding between patient resting orders and immediate fills, see Kalshi order types explained. On Polymarket, that choice also changes your fee, which the fees guide covers.

Market data and price history

All three venues serve market listings and live quotes without authentication. They differ on history, and history is what you need to backtest a strategy:

Venue capabilities — from Rebeti's venue configsample data
KalshiPolymarket USPolymarket Intl
RegulationCFTC (DCM)CFTC (DCM)Not CFTC-registered
CollateralUSDUSDUSDC (Polygon)
Trading credentialRSA API keyEd25519 API keyWallet private key
Live trading in Rebeti
Public price history
Price tick1¢1¢1¢
Min order size1 contract5 contracts5 contracts
Live trading, price history, tick and minimum size come straight from the capability table the Rebeti trader uses; regulation, collateral and credential type are summarised per venue.
  • Kalshi publishes candlestick history per market, so you can replay past prices from the venue itself.
  • Polymarket International exposes price history per outcome token through the CLOB, plus market metadata through its Gamma API.
  • Polymarket US has no history endpoint on its public gateway. A bot that needs a price path on US markets, for example to measure a dip, has to record its own snapshots over time.

Rate limits and polling

Every venue throttles, and a naive bot hits the limit long before it runs out of ideas. Kalshi's limits are tiered by account, and the default tier is the tightest constraint we've seen across the three. Requests that go over get HTTP 429 and have to back off. Polymarket's edge throttles bursts, especially from shared cloud IP addresses. So "it worked on my laptop" doesn't tell you much about how the bot will behave on a server.

The fix is the same on every venue. Spend requests on what changes:

Request budget per pass — illustrativesample data
Pricing 400 open markets in one five-minute pass. The dashed line is a hypothetical per-pass budget; the naive design blows through it before a single strategy is evaluated.
  1. 1

    Cache the catalogue

    Series, events, market metadata and settlement rules change rarely. Refresh them on a slow schedule, not every pass.

  2. 2

    Batch quote requests

    Ask for many tickers in one call where the API allows it, instead of one request per market.

  3. 3

    Only poll what a rule can act on

    A market outside every strategy's time window doesn't need a fresh price this pass.

  4. 4

    Back off on 429s, and serialize

    Keep one shared clock per venue so separate workers can't burst together, and widen the gap after every throttle.

For Kalshi specifically, the rate limits guide goes deeper on polling design.

Testing before real money

Kalshi offers a separate demo environment with its own API host, which helps you test signing and order flow end to end. Neither Polymarket venue offers a public sandbox of the same kind. The safest pattern on any venue is to paper trade against real live prices first, with the same code path that will later place real orders. Then turn on live trading with a small bankroll and hard risk limits.

Build both integrations, or use one that has them

A bot written for Kalshi doesn't become a Polymarket bot with a config flag. The signing, IDs, units, history and throttling all differ, so "cross-venue" really means three integrations, each with its own failure modes. That's the honest case for a platform: the integration work doesn't go away, but someone else maintains it.

One strategy model, three venues

Rebeti signs and routes orders to Kalshi, Polymarket US and Polymarket International behind a single strategy model. You define a rule once, paper trade it on the venue you choose, and arm it live once the results are convincing. Credentials are encrypted server-side and only decrypted when an order is sent. Compare venues in Rebeti →

Frequently asked questions

Is the Kalshi API or the Polymarket API easier for a beginner?

+

Kalshi and Polymarket US are easier. Both use a standard API key with signed HTTP requests and dollar-denominated contracts. Polymarket International adds wallet signing, token IDs and USDC amounts, so there are more ways to get an order wrong.

Do I need an API key to read Kalshi or Polymarket prices?

+

No. All three venues serve market listings and live quotes without authentication. You only need credentials to read your own account or to place and cancel orders.

What credential does a Polymarket trading bot need?

+

On Polymarket US, an API key ID and Ed25519 secret from its developer page. On Polymarket International, the private key of the wallet holding your USDC. The CLOB API key, secret and passphrase are derived from that key, and the wallet also signs every order.

Can the same bot code trade on Kalshi and Polymarket?

+

The strategy logic can be shared, but each venue needs its own adapter for signing, market IDs, price units and order payloads. Plan on three integrations if you want Kalshi, Polymarket US and Polymarket International.

Does Kalshi have a test environment?

+

Yes. Kalshi runs a separate demo environment with its own API host. Polymarket has no equivalent public sandbox, so paper trading against live prices is the usual way to test a Polymarket strategy before going live.