Skip to main content
Kalshi is a prediction market exchange offering event contracts. Molecule connects to Kalshi as a live execution venue, enabling you to discover Kalshi instruments, retrieve market data, and submit orders without building a separate Kalshi integration. The same authentication, signing, and order-management flow you use across the Molecule API applies here.

Discovering Kalshi Markets

Use client.markets.search() with venue="Kalshi" to retrieve available Kalshi instruments. Filter by status or keyword to narrow results.
Use client.markets.match() to look up a specific Kalshi market by ticker or slug when you already know its identifier:
Kalshi markets trade binary YES/NO contracts. Each market produces a YES instrument and a NO instrument, each with its own instrument_id. Both instruments share a common generic_asset_id that you can use for cross-venue routing. You can inspect the live order book for a specific Kalshi instrument or retrieve the aggregated view across all venues:

Submitting Orders to Kalshi

DIRECT routing to Kalshi

Use routing.mode = "DIRECT" with a Kalshi instrument_id to route an order to a specific Kalshi contract. Retrieve the instrument_id from a prior search() or match() call.

Cross-venue routing with BEST_PRICE

Use routing.mode = "BEST_PRICE" with a generic_asset_id to let Molecule select whichever connected venue — including Kalshi — currently offers the best available price for the asset.
To distribute a larger order across Kalshi and other venues simultaneously, use SPLIT:

Notes

  • Kalshi instruments require a venue-specific instrument_id for DIRECT routing. Retrieve this from client.markets.search(venue="Kalshi") or client.markets.match().
  • To route across Kalshi and other connected venues without targeting a specific instrument, use generic_asset_id with BEST_PRICE or SPLIT routing mode.
  • Each binary Kalshi market produces two separate instruments (YES and NO). Confirm the outcome field on the instrument before submitting a DIRECT order to ensure you are trading the intended side.
  • The client_order_id field acts as the idempotency key for simple orders. Resubmitting the same client_order_id with an identical payload is safe; resubmitting with a different payload returns a ConflictError.
Use the Demo venue to validate your integration before sending orders to live Kalshi. Demo provides the same API surface without live execution risk. Switch to Kalshi by changing venue="Kalshi" in your market queries and using a Kalshi instrument_id or a generic_asset_id that maps to Kalshi instruments.