---
title: Kalshi
description: Access prediction markets and trade on Kalshi
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard 
  type="kalshi"
  color="#09C285"
/>

{/* MANUAL-CONTENT-START:intro */}
[Kalshi](https://kalshi.com) is a federally regulated exchange where users can trade directly on the outcomes of future events—prediction markets. Kalshi’s robust API and Sim integration enable agents and workflows to programmatically access all aspects of the platform, supporting everything from research and analytics to automated trading and monitoring.

With Kalshi’s integration in Sim, you can:

- **Market & Event Data:** Search, filter, and retrieve real-time and historical data for markets and events; fetch granular details on market status, series, event groupings, and more.
- **Account & Balance Management:** Access account balances, available funds, and monitor real-time open positions.
- **Order & Trade Management:** Place new orders, cancel existing ones, view open orders, retrieve a live orderbook, and access complete trade histories.
- **Execution Analysis:** Fetch recent trades, historical fills, and candlestick data for backtesting or market structure research.
- **Monitoring:** Check exchange-wide or series-level status, receive real-time updates about market changes or trading halts, and automate responses.
- **Automation Ready:** Build end-to-end automated agents and dashboards that consume, analyze, and trade on real-world event probabilities.

By using these unified tools and endpoints, you can seamlessly incorporate Kalshi’s prediction markets, live trading capabilities, and deep event data into your AI-powered applications, dashboards, and workflows—enabling sophisticated, automated decision-making tied to real-world outcomes.
{/* MANUAL-CONTENT-END */}


## Usage Instructions

Integrate Kalshi prediction markets into the workflow. Can get markets, market, events, event, balance, positions, orders, orderbook, trades, candlesticks, fills, series, exchange status, and place/cancel/amend trades.



## Tools

### `kalshi_get_markets`

Retrieve a list of prediction markets from Kalshi with optional filtering

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `status` | string | No | Filter by status \(unopened, open, closed, settled\) |
| `seriesTicker` | string | No | Filter by series ticker |
| `eventTicker` | string | No | Filter by event ticker |
| `limit` | string | No | Number of results \(1-1000, default: 100\) |
| `cursor` | string | No | Pagination cursor for next page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `markets` | array | Array of market objects |
| `paging` | object | Pagination cursor for fetching more results |

### `kalshi_get_market`

Retrieve details of a specific prediction market by ticker

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `ticker` | string | Yes | The market ticker \(e.g., "KXBTC-24DEC31"\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `market` | object | Market object with details |

### `kalshi_get_events`

Retrieve a list of events from Kalshi with optional filtering

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `status` | string | No | Filter by status \(open, closed, settled\) |
| `seriesTicker` | string | No | Filter by series ticker |
| `withNestedMarkets` | string | No | Include nested markets in response \(true/false\) |
| `limit` | string | No | Number of results \(1-200, default: 200\) |
| `cursor` | string | No | Pagination cursor for next page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `events` | array | Array of event objects |
| `paging` | object | Pagination cursor for fetching more results |

### `kalshi_get_event`

Retrieve details of a specific event by ticker

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `eventTicker` | string | Yes | The event ticker |
| `withNestedMarkets` | string | No | Include nested markets in response \(true/false\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `event` | object | Event object with details |

### `kalshi_get_balance`

Retrieve your account balance and portfolio value from Kalshi

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `keyId` | string | Yes | Your Kalshi API Key ID |
| `privateKey` | string | Yes | Your RSA Private Key \(PEM format\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `balance` | number | Account balance in cents |
| `portfolioValue` | number | Portfolio value in cents |
| `balanceDollars` | number | Account balance in dollars |
| `portfolioValueDollars` | number | Portfolio value in dollars |

### `kalshi_get_positions`

Retrieve your open positions from Kalshi

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `keyId` | string | Yes | Your Kalshi API Key ID |
| `privateKey` | string | Yes | Your RSA Private Key \(PEM format\) |
| `ticker` | string | No | Filter by market ticker |
| `eventTicker` | string | No | Filter by event ticker \(max 10 comma-separated\) |
| `settlementStatus` | string | No | Filter by settlement status \(all, unsettled, settled\). Default: unsettled |
| `limit` | string | No | Number of results \(1-1000, default: 100\) |
| `cursor` | string | No | Pagination cursor for next page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `positions` | array | Array of position objects |
| `paging` | object | Pagination cursor for fetching more results |

### `kalshi_get_orders`

Retrieve your orders from Kalshi with optional filtering

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `keyId` | string | Yes | Your Kalshi API Key ID |
| `privateKey` | string | Yes | Your RSA Private Key \(PEM format\) |
| `ticker` | string | No | Filter by market ticker |
| `eventTicker` | string | No | Filter by event ticker \(max 10 comma-separated\) |
| `status` | string | No | Filter by status \(resting, canceled, executed\) |
| `limit` | string | No | Number of results \(1-200, default: 100\) |
| `cursor` | string | No | Pagination cursor for next page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `orders` | array | Array of order objects |
| `paging` | object | Pagination cursor for fetching more results |

### `kalshi_get_order`

Retrieve details of a specific order by ID from Kalshi

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `keyId` | string | Yes | Your Kalshi API Key ID |
| `privateKey` | string | Yes | Your RSA Private Key \(PEM format\) |
| `orderId` | string | Yes | The order ID to retrieve |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `order` | object | Order object with details |

### `kalshi_get_orderbook`

Retrieve the orderbook (yes and no bids) for a specific market

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `ticker` | string | Yes | Market ticker \(e.g., KXBTC-24DEC31\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `orderbook` | object | Orderbook with yes/no bids and asks |

### `kalshi_get_trades`

Retrieve recent trades across all markets

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `limit` | string | No | Number of results \(1-1000, default: 100\) |
| `cursor` | string | No | Pagination cursor for next page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `trades` | array | Array of trade objects |
| `paging` | object | Pagination cursor for fetching more results |

### `kalshi_get_candlesticks`

Retrieve OHLC candlestick data for a specific market

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `seriesTicker` | string | Yes | Series ticker |
| `ticker` | string | Yes | Market ticker \(e.g., KXBTC-24DEC31\) |
| `startTs` | number | Yes | Start timestamp \(Unix seconds\) |
| `endTs` | number | Yes | End timestamp \(Unix seconds\) |
| `periodInterval` | number | Yes | Period interval: 1 \(1min\), 60 \(1hour\), or 1440 \(1day\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `candlesticks` | array | Array of OHLC candlestick data |

### `kalshi_get_fills`

Retrieve your portfolio

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `keyId` | string | Yes | Your Kalshi API Key ID |
| `privateKey` | string | Yes | Your RSA Private Key \(PEM format\) |
| `ticker` | string | No | Filter by market ticker |
| `orderId` | string | No | Filter by order ID |
| `minTs` | number | No | Minimum timestamp \(Unix milliseconds\) |
| `maxTs` | number | No | Maximum timestamp \(Unix milliseconds\) |
| `limit` | string | No | Number of results \(1-1000, default: 100\) |
| `cursor` | string | No | Pagination cursor for next page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `fills` | array | Array of fill/trade objects |
| `paging` | object | Pagination cursor for fetching more results |

### `kalshi_get_series_by_ticker`

Retrieve details of a specific market series by ticker

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `seriesTicker` | string | Yes | Series ticker |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `series` | object | Series object with details |

### `kalshi_get_exchange_status`

Retrieve the current status of the Kalshi exchange (trading and exchange activity)

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `status` | object | Exchange status with trading_active and exchange_active flags |

### `kalshi_create_order`

Create a new order on a Kalshi prediction market

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `keyId` | string | Yes | Your Kalshi API Key ID |
| `privateKey` | string | Yes | Your RSA Private Key \(PEM format\) |
| `ticker` | string | Yes | Market ticker \(e.g., KXBTC-24DEC31\) |
| `side` | string | Yes | Side of the order: 'yes' or 'no' |
| `action` | string | Yes | Action type: 'buy' or 'sell' |
| `count` | string | Yes | Number of contracts \(minimum 1\) |
| `type` | string | No | Order type: 'limit' or 'market' \(default: limit\) |
| `yesPrice` | string | No | Yes price in cents \(1-99\) |
| `noPrice` | string | No | No price in cents \(1-99\) |
| `yesPriceDollars` | string | No | Yes price in dollars \(e.g., "0.56"\) |
| `noPriceDollars` | string | No | No price in dollars \(e.g., "0.56"\) |
| `clientOrderId` | string | No | Custom order identifier |
| `expirationTs` | string | No | Unix timestamp for order expiration |
| `timeInForce` | string | No | Time in force: 'fill_or_kill', 'good_till_canceled', 'immediate_or_cancel' |
| `buyMaxCost` | string | No | Maximum cost in cents \(auto-enables fill_or_kill\) |
| `postOnly` | string | No | Set to 'true' for maker-only orders |
| `reduceOnly` | string | No | Set to 'true' for position reduction only |
| `selfTradePreventionType` | string | No | Self-trade prevention: 'taker_at_cross' or 'maker' |
| `orderGroupId` | string | No | Associated order group ID |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `order` | object | The created order object |

### `kalshi_cancel_order`

Cancel an existing order on Kalshi

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `keyId` | string | Yes | Your Kalshi API Key ID |
| `privateKey` | string | Yes | Your RSA Private Key \(PEM format\) |
| `orderId` | string | Yes | The order ID to cancel |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `order` | object | The canceled order object |
| `reducedBy` | number | Number of contracts canceled |

### `kalshi_amend_order`

Modify the price or quantity of an existing order on Kalshi

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `keyId` | string | Yes | Your Kalshi API Key ID |
| `privateKey` | string | Yes | Your RSA Private Key \(PEM format\) |
| `orderId` | string | Yes | The order ID to amend |
| `ticker` | string | Yes | Market ticker |
| `side` | string | Yes | Side of the order: 'yes' or 'no' |
| `action` | string | Yes | Action type: 'buy' or 'sell' |
| `clientOrderId` | string | Yes | The original client-specified order ID |
| `updatedClientOrderId` | string | Yes | The new client-specified order ID after amendment |
| `count` | string | No | Updated quantity for the order |
| `yesPrice` | string | No | Updated yes price in cents \(1-99\) |
| `noPrice` | string | No | Updated no price in cents \(1-99\) |
| `yesPriceDollars` | string | No | Updated yes price in dollars \(e.g., "0.56"\) |
| `noPriceDollars` | string | No | Updated no price in dollars \(e.g., "0.56"\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `order` | object | The amended order object |



## Notes

- Category: `tools`
- Type: `kalshi`
