Kalshi MCP Server
JSON →A simple MCP server to interact with prediction market Kalshi
Install
pip install -e Tools · 15
- get_tags_for_series_categories Calls Kalshi public endpoint: GET /search/tags_by_categories. No API key required.
- get_balance Calls Kalshi private endpoint: GET /portfolio/balance. Requires API key authentication (KALSHI_API_KEY_ID + KALSHI_API_KEY_PATH).
- get_subaccount_balances Calls Kalshi private endpoint: GET /portfolio/subaccounts/balances. Requires API key authentication (KALSHI_API_KEY_ID + KALSHI_API_KEY_PATH).
- create_subaccount Calls Kalshi private endpoint: POST /portfolio/subaccounts. No arguments. Creates a new subaccount (maximum 32 per user). Returns: subaccount_number (int, 1-32). Requires API key authentication (KALSHI_API_KEY_ID + KALSHI_API_KEY_PATH).
- get_orders Calls Kalshi private endpoint: GET /portfolio/orders. Optional arguments: ticker, event_ticker, status, min_ts/max_ts, limit, cursor, subaccount. Returns portfolio orders (and optional pagination cursor). Requires API key authentication (KALSHI_API_KEY_ID + KALSHI_API_KEY_PATH).
- get_order Calls Kalshi private endpoint: GET /portfolio/orders/{order_id}. Required arguments: order_id (string). Returns a single order object with all order fields. Requires API key authentication (KALSHI_API_KEY_ID + KALSHI_API_KEY_PATH).
- create_order Calls Kalshi private endpoint: POST /portfolio/orders. Required arguments: ticker, side (yes|no), action (buy|sell). Optional arguments: client_order_id, count, count_fp, yes_price, no_price, yes_price_dollars, no_price_dollars, expiration_ts, time_in_force, buy_max_cost, sell_position_floor, post_only, reduce_only, self_trade_prevention_type, order_group_id, cancel_order_on_pause, subaccount. Returns created order details. Requires API key authentication (KALSHI_API_KEY_ID + KALSHI_API_KEY_PATH).
- cancel_order Calls Kalshi private endpoint: DELETE /portfolio/orders/{order_id}. Required arguments: order_id (string). Optional arguments: subaccount (int, 0-32). Returns the cancelled order object and the number of contracts reduced (reduced_by, reduced_by_fp). Requires API key authentication (KALSHI_API_KEY_ID + KALSHI_API_KEY_PATH).
- get_positions Calls Kalshi private endpoint: GET /portfolio/positions. Optional arguments: cursor, limit, count_filter, ticker, event_ticker, subaccount. Returns portfolio positions with market_positions and event_positions arrays, plus pagination cursor. Requires API key authentication (KALSHI_API_KEY_ID + KALSHI_API_KEY_PATH).
- get_categories Calls Kalshi public endpoint: GET /search/tags_by_categories. Returns only the category names. No API key required.
- get_tags_for_series_category Calls Kalshi public endpoint: GET /search/tags_by_categories. Requires one argument: category (exact category name). Returns tags for the selected category. No API key required.
- get_series_list Calls Kalshi public endpoint: GET /series. Optional arguments: category, tags, cursor, limit, include_product_metadata, include_volume. Returns typed series objects from Kalshi response. Logs warning/error details when response fields have unexpected types/shapes. No API key required.
- get_series_tickers_for_category Pages Kalshi public endpoint: GET /series. Required arguments: category (string). Optional arguments: tags, limit, max_pages. Returns only ticker values across all pages. No API key required.
- get_markets Calls Kalshi public endpoint: GET /markets. Optional arguments: cursor, limit, status, tickers, event_ticker, series_ticker, mve_filter, min_created_ts/max_created_ts, min_updated_ts, min_close_ts/max_close_ts, min_settled_ts/max_settled_ts. Returns typed markets from Kalshi response. No API key required.
- get_open_markets_for_series Pages Kalshi public endpoint: GET /markets. Required arguments: series_ticker (string). Optional arguments: limit, max_pages. Returns open markets for a series.
Environment variables
KALSHI_API_KEY_IDKALSHI_API_BASE_URL