# Table of Contents - [Confirm Quote - API Documentation](#confirm-quote-api-documentation) - [Accept Quote - API Documentation](#accept-quote-api-documentation) - [Generate API Key - API Documentation](#generate-api-key-api-documentation) - [Get Account API Limits - API Documentation](#get-account-api-limits-api-documentation) - [Get Historical Cutoff Timestamps - API Documentation](#get-historical-cutoff-timestamps-api-documentation) - [Kalshi SDKs - API Documentation](#kalshi-sdks-api-documentation) - [FIX API Overview - API Documentation](#fix-api-overview-api-documentation) - [Python SDK Quick Start - API Documentation](#python-sdk-quick-start-api-documentation) - [Test In The Demo Environment - API Documentation](#test-in-the-demo-environment-api-documentation) - [Connectivity - API Documentation](#connectivity-api-documentation) - [Drop Copy Session - API Documentation](#drop-copy-session-api-documentation) - [Order Group Messages - API Documentation](#order-group-messages-api-documentation) - [TypeScript SDK Quick Start - API Documentation](#typescript-sdk-quick-start-api-documentation) - [Historical Data - API Documentation](#historical-data-api-documentation) - [Fixed-Point Migration - API Documentation](#fixed-point-migration-api-documentation) - [Fee Rounding - API Documentation](#fee-rounding-api-documentation) - [Subpenny Pricing - API Documentation](#subpenny-pricing-api-documentation) - [Quick Start: Create your first order (No SDK) - API Documentation](#quick-start-create-your-first-order-no-sdk-api-documentation) - [Kalshi Glossary - API Documentation](#kalshi-glossary-api-documentation) - [Market Settlement - API Documentation](#market-settlement-api-documentation) - [RFQ Messages - API Documentation](#rfq-messages-api-documentation) - [Making Your First Request - API Documentation](#making-your-first-request-api-documentation) - [Order Entry Messages - API Documentation](#order-entry-messages-api-documentation) - [Error Handling - API Documentation](#error-handling-api-documentation) - [Session Management - API Documentation](#session-management-api-documentation) - [Quick Start: Authenticated Requests (No SDK) - API Documentation](#quick-start-authenticated-requests-no-sdk-api-documentation) - [API Keys - API Documentation](#api-keys-api-documentation) - [Order Group Updates - API Documentation](#order-group-updates-api-documentation) - [Market Positions - API Documentation](#market-positions-api-documentation) - [Multivariate Lookups - API Documentation](#multivariate-lookups-api-documentation) - [Market & Event Lifecycle - API Documentation](#market-event-lifecycle-api-documentation) - [Connection Keep-Alive - API Documentation](#connection-keep-alive-api-documentation) - [ApiKeys - API Documentation](#apikeys-api-documentation) - [Market Ticker - API Documentation](#market-ticker-api-documentation) - [Public Trades - API Documentation](#public-trades-api-documentation) - [StructuredTargets - API Documentation](#structuredtargets-api-documentation) - [Exchange - API Documentation](#exchange-api-documentation) - [Orderbook Updates - API Documentation](#orderbook-updates-api-documentation) - [User Fills - API Documentation](#user-fills-api-documentation) - [User Orders - API Documentation](#user-orders-api-documentation) - [Communications - API Documentation](#communications-api-documentation) - [Milestones - API Documentation](#milestones-api-documentation) - [Orderbook Responses - API Documentation](#orderbook-responses-api-documentation) - [Events - API Documentation](#events-api-documentation) - [MultivariateCollections - API Documentation](#multivariatecollections-api-documentation) - [Communications - API Documentation](#communications-api-documentation) - [Quick Start: Market Data (No SDK) - API Documentation](#quick-start-market-data-no-sdk-api-documentation) - [Portfolio - API Documentation](#portfolio-api-documentation) - [WebSocket Connection - API Documentation](#websocket-connection-api-documentation) - [Introduction - API Documentation](#introduction-api-documentation) - [Series - API Documentation](#series-api-documentation) - [Quick Start: WebSockets (No SDK) - API Documentation](#quick-start-websockets-no-sdk-api-documentation) - [StructuredTargets - API Documentation](#structuredtargets-api-documentation) - [Markets - API Documentation](#markets-api-documentation) - [API Changelog - API Documentation](#api-changelog-api-documentation) - [Understanding Pagination - API Documentation](#understanding-pagination-api-documentation) - [Milestones - API Documentation](#milestones-api-documentation) - [Series - API Documentation](#series-api-documentation) - [Rate Limits and Tiers - API Documentation](#rate-limits-and-tiers-api-documentation) - [ApiKeys - API Documentation](#apikeys-api-documentation) - [Exchange - API Documentation](#exchange-api-documentation) - [Portfolio - API Documentation](#portfolio-api-documentation) - [Delete API Key - API Documentation](#delete-api-key-api-documentation) - [Create API Key - API Documentation](#create-api-key-api-documentation) - [Get API Keys - API Documentation](#get-api-keys-api-documentation) - [MultivariateCollections - API Documentation](#multivariatecollections-api-documentation) - [Create Quote - API Documentation](#create-quote-api-documentation) - [Markets - API Documentation](#markets-api-documentation) - [Events - API Documentation](#events-api-documentation) - [Create RFQ - API Documentation](#create-rfq-api-documentation) - [Get Quote - API Documentation](#get-quote-api-documentation) - [Delete RFQ - API Documentation](#delete-rfq-api-documentation) - [Get Communications ID - API Documentation](#get-communications-id-api-documentation) - [Delete Quote - API Documentation](#delete-quote-api-documentation) - [Get Live Data - API Documentation](#get-live-data-api-documentation) - [Get Historical Fills - API Documentation](#get-historical-fills-api-documentation) - [Get Historical Market Candlesticks - API Documentation](#get-historical-market-candlesticks-api-documentation) - [Get Historical Orders - API Documentation](#get-historical-orders-api-documentation) - [Get Historical Trades - API Documentation](#get-historical-trades-api-documentation) - [Get Incentives - API Documentation](#get-incentives-api-documentation) - [Get FCM Positions - API Documentation](#get-fcm-positions-api-documentation) - [Get Historical Markets - API Documentation](#get-historical-markets-api-documentation) - [Get Multiple Live Data - API Documentation](#get-multiple-live-data-api-documentation) - [Communications - API Documentation](#communications-api-documentation) - [Get Market - API Documentation](#get-market-api-documentation) - [Get Market Orderbook - API Documentation](#get-market-orderbook-api-documentation) - [Get Market Candlesticks - API Documentation](#get-market-candlesticks-api-documentation) - [Get Series - API Documentation](#get-series-api-documentation) - [Get Series List - API Documentation](#get-series-list-api-documentation) - [Batch Get Market Candlesticks - API Documentation](#batch-get-market-candlesticks-api-documentation) - [Get Historical Market - API Documentation](#get-historical-market-api-documentation) - [Get Milestones - API Documentation](#get-milestones-api-documentation) - [Get Markets - API Documentation](#get-markets-api-documentation) - [Get Multivariate Event Collection - API Documentation](#get-multivariate-event-collection-api-documentation) - [Get Milestone - API Documentation](#get-milestone-api-documentation) - [Get Trades - API Documentation](#get-trades-api-documentation) - [Get Multivariate Event Collection Lookup History - API Documentation](#get-multivariate-event-collection-lookup-history-api-documentation) - [Get Multivariate Event Collections - API Documentation](#get-multivariate-event-collections-api-documentation) - [Get Order Groups - API Documentation](#get-order-groups-api-documentation) - [Create Order Group - API Documentation](#create-order-group-api-documentation) - [Delete Order Group - API Documentation](#delete-order-group-api-documentation) - [Update Order Group Limit - API Documentation](#update-order-group-limit-api-documentation) - [Reset Order Group - API Documentation](#reset-order-group-api-documentation) - [Trigger Order Group - API Documentation](#trigger-order-group-api-documentation) - [Get Balance - API Documentation](#get-balance-api-documentation) - [Get Queue Positions for Orders - API Documentation](#get-queue-positions-for-orders-api-documentation) - [Create Market In Multivariate Event Collection - API Documentation](#create-market-in-multivariate-event-collection-api-documentation) --- # Confirm Quote - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/communications/confirm-quote#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation communications Confirm Quote [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Confirm Quote cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes/{quote_id}/confirm \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data '{}' 401 404 500 Copy Ask AI { "code": "", "message": "", "details": "", "service": "" } PUT / communications / quotes / {quote\_id} / confirm Try it Confirm Quote cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes/{quote_id}/confirm \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data '{}' 401 404 500 Copy Ask AI { "code": "", "message": "", "details": "", "service": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/communications/confirm-quote#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/communications/confirm-quote#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/communications/confirm-quote#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/communications/confirm-quote#parameter-quote-id) quote\_id string required Quote ID #### Body application/json An empty response body #### Response 204 Quote confirmed successfully [Accept Quote](https://docs.kalshi.com/api-reference/communications/accept-quote) [Get Multivariate Event Collection](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Accept Quote - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/communications/accept-quote#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation communications Accept Quote [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Accept Quote cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes/{quote_id}/accept \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "accepted_side": "yes" } ' 400 401 404 500 Copy Ask AI { "code": "", "message": "", "details": "", "service": "" } PUT / communications / quotes / {quote\_id} / accept Try it Accept Quote cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes/{quote_id}/accept \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "accepted_side": "yes" } ' 400 401 404 500 Copy Ask AI { "code": "", "message": "", "details": "", "service": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/communications/accept-quote#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/communications/accept-quote#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/communications/accept-quote#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/communications/accept-quote#parameter-quote-id) quote\_id string required Quote ID #### Body application/json [​](https://docs.kalshi.com/api-reference/communications/accept-quote#body-accepted-side) accepted\_side enum required The side of the quote to accept (yes or no) Available options: `yes`, `no` #### Response 204 Quote accepted successfully [Delete Quote](https://docs.kalshi.com/api-reference/communications/delete-quote) [Confirm Quote](https://docs.kalshi.com/api-reference/communications/confirm-quote) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Generate API Key - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/api-keys/generate-api-key#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation api-keys Generate API Key [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Generate API Key cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/api_keys/generate \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "name": "", "scopes": [\ ""\ ] } ' 201 Copy Ask AI { "api_key_id": "", "private_key": "" } POST / api\_keys / generate Try it Generate API Key cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/api_keys/generate \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "name": "", "scopes": [\ ""\ ] } ' 201 Copy Ask AI { "api_key_id": "", "private_key": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/api-keys/generate-api-key#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/api-keys/generate-api-key#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/api-keys/generate-api-key#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Body application/json [​](https://docs.kalshi.com/api-reference/api-keys/generate-api-key#body-name) name string required Name for the API key. This helps identify the key's purpose [​](https://docs.kalshi.com/api-reference/api-keys/generate-api-key#body-scopes) scopes string\[\] List of scopes to grant to the API key. Valid values are 'read' and 'write'. If 'write' is included, 'read' must also be included. Defaults to full access (\['read', 'write'\]) if not provided. #### Response 201 application/json API key generated successfully [​](https://docs.kalshi.com/api-reference/api-keys/generate-api-key#response-api-key-id) api\_key\_id string required Unique identifier for the newly generated API key [​](https://docs.kalshi.com/api-reference/api-keys/generate-api-key#response-private-key) private\_key string required RSA private key in PEM format. This must be stored securely and cannot be retrieved again after this response [Create API Key](https://docs.kalshi.com/api-reference/api-keys/create-api-key) [Delete API Key](https://docs.kalshi.com/api-reference/api-keys/delete-api-key) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Account API Limits - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/account/get-account-api-limits#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation account Get Account API Limits [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Account API Limits cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/account/limits \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 Copy Ask AI { "usage_tier": "", "read_limit": 123, "write_limit": 123 } GET / account / limits Try it Get Account API Limits cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/account/limits \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 Copy Ask AI { "usage_tier": "", "read_limit": 123, "write_limit": 123 } #### Authorizations [​](https://docs.kalshi.com/api-reference/account/get-account-api-limits#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/account/get-account-api-limits#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/account/get-account-api-limits#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Response 200 application/json Account API tier limits retrieved successfully [​](https://docs.kalshi.com/api-reference/account/get-account-api-limits#response-usage-tier) usage\_tier string required User's API usage tier [​](https://docs.kalshi.com/api-reference/account/get-account-api-limits#response-read-limit) read\_limit integer required Maximum read requests per second [​](https://docs.kalshi.com/api-reference/account/get-account-api-limits#response-write-limit) write\_limit integer required Maximum write requests per second [Get Filters for Sports](https://docs.kalshi.com/api-reference/search/get-filters-for-sports) [Get Market Candlesticks](https://docs.kalshi.com/api-reference/market/get-market-candlesticks) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Historical Cutoff Timestamps - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation historical Get Historical Cutoff Timestamps [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Historical Cutoff Timestamps cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/cutoff 200 Copy Ask AI { "market_settled_ts": "2023-11-07T05:31:56Z", "trades_created_ts": "2023-11-07T05:31:56Z", "orders_updated_ts": "2023-11-07T05:31:56Z" } GET / historical / cutoff Try it Get Historical Cutoff Timestamps cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/cutoff 200 Copy Ask AI { "market_settled_ts": "2023-11-07T05:31:56Z", "trades_created_ts": "2023-11-07T05:31:56Z", "orders_updated_ts": "2023-11-07T05:31:56Z" } #### Response 200 application/json Historical cutoff timestamps retrieved successfully [​](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps#response-market-settled-ts) market\_settled\_ts string required Cutoff based on market settlement time. Markets and their candlesticks that settled before this timestamp must be accessed via `GET /historical/markets` and `GET /historical/markets/{ticker}/candlesticks`. [​](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps#response-trades-created-ts) trades\_created\_ts string required Cutoff based on trade fill time. Fills that occurred before this timestamp must be accessed via `GET /historical/fills`. [​](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps#response-orders-updated-ts) orders\_updated\_ts string required Cutoff based on order cancellation or execution time. Orders canceled or fully executed before this timestamp must be accessed via `GET /historical/orders`. Resting (active) orders are always available in `GET /portfolio/orders`. [Get Historical Market Candlesticks](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Kalshi SDKs - API Documentation [Skip to main content](https://docs.kalshi.com/sdks/overview#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Kalshi SDKs [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Available SDKs](https://docs.kalshi.com/sdks/overview#available-sdks) * [Versioning and Updates](https://docs.kalshi.com/sdks/overview#versioning-and-updates) * [Features](https://docs.kalshi.com/sdks/overview#features) * [Installation](https://docs.kalshi.com/sdks/overview#installation) * [Authentication](https://docs.kalshi.com/sdks/overview#authentication) [​](https://docs.kalshi.com/sdks/overview#available-sdks) Available SDKs --------------------------------------------------------------------------- Kalshi provides official SDKs to make integration easier. Each SDK provides full access to the Kalshi API with language-specific conventions and best practices. [Python\ ------\ \ Full-featured Python SDK with async support](https://docs.kalshi.com/sdks/python/quickstart) [TypeScript\ ----------\ \ TypeScript/JavaScript SDK for Node.js and browsers](https://docs.kalshi.com/sdks/typescript/quickstart) [​](https://docs.kalshi.com/sdks/overview#versioning-and-updates) Versioning and Updates ------------------------------------------------------------------------------------------- SDK versions are aligned with the [OpenAPI specification](https://docs.kalshi.com/openapi.yaml) . New SDK releases are generally published on Tuesdays or Wednesdays each week, in advance of any corresponding API changes going live. However, release timing may vary and is not guaranteed. We recommend checking the SDK package repositories and the [API Changelog](https://docs.kalshi.com/changelog) for the latest updates. These SDKs are intended to help developers get started quickly with the Kalshi API. For production applications, we recommend generating your own client libraries from the [OpenAPI specification](https://docs.kalshi.com/openapi.yaml) or implementing direct API integration to ensure full control over your implementation. [​](https://docs.kalshi.com/sdks/overview#features) Features --------------------------------------------------------------- All SDKs provide: * Full API coverage for trading, market data, and portfolio management * Authentication with RSA-PSS signing * Automatic request signing and timestamp handling * Type-safe models and responses * Error handling and retries * Comprehensive documentation and examples [​](https://docs.kalshi.com/sdks/overview#installation) Installation ----------------------------------------------------------------------- Python (sync) Python (async) TypeScript Report incorrect code Copy Ask AI pip install kalshi_python_sync The old `kalshi-python` package is deprecated. Please migrate to `kalshi-python-sync` or `kalshi-python-async`. [​](https://docs.kalshi.com/sdks/overview#authentication) Authentication --------------------------------------------------------------------------- All SDKs use the same authentication mechanism with API keys and RSA-PSS signing. You’ll need: 1. An API key ID from your Kalshi account 2. A private key file for signing requests See the quickstart guide for your chosen SDK for detailed setup instructions. [Python SDK Quick Start](https://docs.kalshi.com/sdks/python/quickstart) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # FIX API Overview - API Documentation [Skip to main content](https://docs.kalshi.com/fix#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation FIX API Overview [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Kalshi FIX API Specifications](https://docs.kalshi.com/fix#kalshi-fix-api-specifications) * [Introduction](https://docs.kalshi.com/fix#introduction) * [FIX Dictionary Download](https://docs.kalshi.com/fix#fix-dictionary-download) * [Key Features](https://docs.kalshi.com/fix#key-features) * [Getting Started](https://docs.kalshi.com/fix#getting-started) * [Support](https://docs.kalshi.com/fix#support) [​](https://docs.kalshi.com/fix#kalshi-fix-api-specifications) Kalshi FIX API Specifications =============================================================================================== **Version**: 1.0.16 **Last Updated**: 2025-11-30 [​](https://docs.kalshi.com/fix#introduction) Introduction ------------------------------------------------------------- FIX (Financial Information eXchange) is a standard protocol that can be used to enter orders, submit cancel requests, and receive fills. Kalshi’s implementation follows the standards as closely as possible, with any divergences highlighted in this documentation. Please contact [institutional@kalshi.com](mailto:institutional@kalshi.com) to inquire about FIX access. [​](https://docs.kalshi.com/fix#fix-dictionary-download) FIX Dictionary Download ----------------------------------------------------------------------------------- Need a machine-readable view of the Kalshi-specific FIX tags and messages? Download the XML dictionary and import it into your FIX tooling of choice: * [Kalshi FIX Dictionary v0.1 (XML)](https://kalshi-public-docs.s3.us-east-1.amazonaws.com/fix/kalshi-fix-dictionary.xml) [​](https://docs.kalshi.com/fix#key-features) Key Features ------------------------------------------------------------- [Session Management\ ------------------\ \ Logon, logout, heartbeat, and session control messages](https://docs.kalshi.com/fix/session-management) [Order Entry\ -----------\ \ Submit, modify, and cancel orders through standard FIX messages](https://docs.kalshi.com/fix/order-entry) [Market Settlement\ -----------------\ \ Market settlement and payout updates](https://docs.kalshi.com/fix/market-settlement) [RFQ Support\ -----------\ \ Request for Quote functionality for market makers](https://docs.kalshi.com/fix/rfq-messages) [Drop Copy\ ---------\ \ Separate session for order event recovery](https://docs.kalshi.com/fix/drop-copy) [Order Groups\ ------------\ \ Automatic order cancellation with contracts limits](https://docs.kalshi.com/fix/order-groups) [​](https://docs.kalshi.com/fix#getting-started) Getting Started ------------------------------------------------------------------- 1 [](https://docs.kalshi.com/fix#) Generate RSA Keys Create a 2048 bit RSA PKCS#8 key pair for authentication 2 [](https://docs.kalshi.com/fix#) Create API Key Upload your public key to the Kalshi platform to receive your FIX API key 3 [](https://docs.kalshi.com/fix#) Configure Connection Set up your FIX client with the appropriate endpoints and credentials 4 [](https://docs.kalshi.com/fix#) Start Trading Send a Logon message and begin submitting orders [​](https://docs.kalshi.com/fix#support) Support --------------------------------------------------- For technical support or questions about the FIX API, please contact the Kalshi trading support team. [Connectivity](https://docs.kalshi.com/fix/connectivity) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Python SDK Quick Start - API Documentation [Skip to main content](https://docs.kalshi.com/sdks/python/quickstart#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Python Python SDK Quick Start [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Installation](https://docs.kalshi.com/sdks/python/quickstart#installation) * [Quick Start](https://docs.kalshi.com/sdks/python/quickstart#quick-start) * [Source Code](https://docs.kalshi.com/sdks/python/quickstart#source-code) [​](https://docs.kalshi.com/sdks/python/quickstart#installation) Installation -------------------------------------------------------------------------------- Report incorrect code Copy Ask AI pip install kalshi_python_sync Or for async support: Report incorrect code Copy Ask AI pip install kalshi_python_async The old `kalshi-python` package is deprecated. Please use `kalshi_python_sync` or `kalshi_python_async` instead. [​](https://docs.kalshi.com/sdks/python/quickstart#quick-start) Quick Start ------------------------------------------------------------------------------ Report incorrect code Copy Ask AI from kalshi_python_sync import Configuration, KalshiClient # Configure the client config = Configuration( host="https://api.elections.kalshi.com/trade-api/v2" ) # For authenticated requests # Read private key from file with open("path/to/private_key.pem", "r") as f: private_key = f.read() config.api_key_id = "your-api-key-id" config.private_key_pem = private_key # Initialize the client client = KalshiClient(config) # Make API calls balance = client.get_balance() print(f"Balance: ${balance.balance / 100:.2f}") [​](https://docs.kalshi.com/sdks/python/quickstart#source-code) Source Code ------------------------------------------------------------------------------ * PyPI (sync): [https://pypi.org/project/kalshi\_python\_sync/](https://pypi.org/project/kalshi_python_sync/) * PyPI (async): [https://pypi.org/project/kalshi\_python\_async/](https://pypi.org/project/kalshi_python_async/) [Kalshi SDKs](https://docs.kalshi.com/sdks/overview) [Portfolio](https://docs.kalshi.com/python-sdk/api/PortfolioApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Test In The Demo Environment - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/demo_env#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Test In The Demo Environment [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) For testing purposes, Kalshi offers a _demo_ environment with mock funds. You can access the Demo environment at [https://demo.kalshi.co/](https://demo.kalshi.co/) . For safety, credentials are not shared between this environment and production. To set up a Kalshi Demo account, [follow this step-by-step tutorial](https://docs.google.com/presentation/d/e/2PACX-1vRvhUAqRBYzJmt7JCinMXmu6KVWkj-cc7ikDXGConmqjcv4mnlJacgHPcZJ20fWWnrYdubn-oczclKP/pub?start=false&loop=false&delayms=3000&slide=id.p) . Demo’s API root is `https://demo-api.kalshi.co/trade-api/v2`. [Making Your First Request](https://docs.kalshi.com/getting_started/making_your_first_request) [API Keys](https://docs.kalshi.com/getting_started/api_keys) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Connectivity - API Documentation [Skip to main content](https://docs.kalshi.com/fix/connectivity#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Connectivity [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [FIX API Connectivity](https://docs.kalshi.com/fix/connectivity#fix-api-connectivity) * [Endpoints](https://docs.kalshi.com/fix/connectivity#endpoints) * [Rate Limits](https://docs.kalshi.com/fix/connectivity#rate-limits) * [Order Entry Session](https://docs.kalshi.com/fix/connectivity#order-entry-session) * [TCP SSL Configuration](https://docs.kalshi.com/fix/connectivity#tcp-ssl-configuration) * [SSL/TLS Requirements](https://docs.kalshi.com/fix/connectivity#ssl%2Ftls-requirements) * [Message Retransmission](https://docs.kalshi.com/fix/connectivity#message-retransmission) * [Supported Endpoints](https://docs.kalshi.com/fix/connectivity#supported-endpoints) * [Unsupported Message Types](https://docs.kalshi.com/fix/connectivity#unsupported-message-types) * [Alternative Recovery](https://docs.kalshi.com/fix/connectivity#alternative-recovery) * [Session Configuration](https://docs.kalshi.com/fix/connectivity#session-configuration) * [Required Settings](https://docs.kalshi.com/fix/connectivity#required-settings) * [Session Identification](https://docs.kalshi.com/fix/connectivity#session-identification) * [Best Practices](https://docs.kalshi.com/fix/connectivity#best-practices) * [Troubleshooting](https://docs.kalshi.com/fix/connectivity#troubleshooting) * [Common Connection Issues](https://docs.kalshi.com/fix/connectivity#common-connection-issues) [​](https://docs.kalshi.com/fix/connectivity#fix-api-connectivity) FIX API Connectivity ========================================================================================== [​](https://docs.kalshi.com/fix/connectivity#endpoints) Endpoints -------------------------------------------------------------------- Before logging onto a FIX session, clients must establish a secure connection to the FIX gateway. * Production * Demo **Host:** `fix.elections.kalshi.com` | Purpose | Port | TargetCompID | | --- | --- | --- | | Order Entry (without retransmission) | 8228 | KalshiNR | | Order Entry (with retransmission) | 8230 | KalshiRT | | Drop Copy | 8229 | KalshiDC | | Post Trade | 8231 | KalshiPT | | RFQ | 8232 | KalshiRFQ | **Host:** `fix.demo.kalshi.co` | Purpose | Port | TargetCompID | | --- | --- | --- | | Order Entry (without retransmission) | 8228 | KalshiNR | | Order Entry (with retransmission) | 8230 | KalshiRT | | Drop Copy | 8229 | KalshiDC | | Post Trade | 8231 | KalshiPT | | RFQ | 8232 | KalshiRFQ | Sessions are potentially dropped during trading closed hours for maintenance. For now, this is on Thursdays from 3 AM to 5 AM ET. All users are required to restart their sessions during this time and reset sequence numbers to 0. [​](https://docs.kalshi.com/fix/connectivity#rate-limits) Rate Limits ------------------------------------------------------------------------ ### [​](https://docs.kalshi.com/fix/connectivity#order-entry-session) Order Entry Session * **Limit**: Your account-level rate limits are applicable * **Scope**: Application messages only (from client to server) * **Excluded**: Session layer messages Session layer messages excluded from rate limits: * Logon (35=A) * Logout (35=5) * Heartbeat (35=0) * TestRequest (35=1) [​](https://docs.kalshi.com/fix/connectivity#tcp-ssl-configuration) TCP SSL Configuration -------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/connectivity#ssl/tls-requirements) SSL/TLS Requirements **You must use TLS/SSL (not plain TCP) to connect to the FIX gateway.** Plain TCP connections will fail because the gateway requires a TLS handshake. If your FIX implementation does not support native TLS connections, set up a local proxy such as stunnel to establish a secure connection. Kalshi will provide the certificate for pinning on the initiator side when providing your API key. [​](https://docs.kalshi.com/fix/connectivity#message-retransmission) Message Retransmission ---------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/connectivity#supported-endpoints) Supported Endpoints Message retransmission is currently only supported on: * Order Entry with retransmission (KalshiRT) * RFQ session (KalshiRFQ) ### [​](https://docs.kalshi.com/fix/connectivity#unsupported-message-types) Unsupported Message Types For endpoints without retransmission support: * ResendRequest (35=2) - Not supported * SequenceReset (35=4) - Not supported For sessions without retransmission support, `ResetSeqNumFlag<141>` in the Logon message must always be `true` or the Logon will be rejected. ### [​](https://docs.kalshi.com/fix/connectivity#alternative-recovery) Alternative Recovery The drop copy session endpoint provides an alternative way for clients to query for missed execution reports without using the retransmission protocol. [​](https://docs.kalshi.com/fix/connectivity#session-configuration) Session Configuration -------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/connectivity#required-settings) Required Settings * **Session Profile**: FIXT.1.1 (required for Application Version Independence) * **Application Version**: FIX50SP2 (FIX 5.0 SP2) * **SenderCompID**: Your FIX API Key (UUID format) * **TargetCompID**: See endpoints table above ### [​](https://docs.kalshi.com/fix/connectivity#session-identification) Session Identification * Session identification uses: `SessionID = TargetCompID + SenderCompID` * Only one FIX connection is allowed per FIX API Key Each API key can only be used for a single connection at a time. If you need to establish multiple concurrent connections (e.g., for both order entry and drop copy), you must create separate API keys for each connection. [​](https://docs.kalshi.com/fix/connectivity#best-practices) Best Practices ------------------------------------------------------------------------------ 1. **Connection Management** * Implement automatic reconnection logic for the daily maintenance window * Monitor heartbeat intervals (default 30 seconds) * Handle connection drops gracefully 2. **Sequence Number Management** * Reset sequence numbers to 0 after daily maintenance * For non-retransmission endpoints, always use `ResetSeqNumFlag=Y` 3. **Security** * Store private keys securely * Never share private keys, even with Kalshi employees * Use certificate pinning when provided [​](https://docs.kalshi.com/fix/connectivity#troubleshooting) Troubleshooting -------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/connectivity#common-connection-issues) Common Connection Issues SSL/TLS Connection Failed * **Verify you are using TLS, not plain TCP** - this is the most common issue * Check your FIX library settings to ensure TLS/SSL mode is enabled * Verify certificate configuration * Check if stunnel or similar proxy is needed if your library doesn’t support native TLS Logon Rejected * Verify SenderCompID matches your FIX API key * Check TargetCompID matches the port number * Ensure ResetSeqNumFlag is set correctly for non-retransmission endpoints * Verify signature generation uses the exact SendingTime from field 52 [FIX API Overview](https://docs.kalshi.com/fix) [Session Management](https://docs.kalshi.com/fix/session-management) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Drop Copy Session - API Documentation [Skip to main content](https://docs.kalshi.com/fix/drop-copy#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Drop Copy Session [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Drop Copy Session](https://docs.kalshi.com/fix/drop-copy#drop-copy-session) * [Overview](https://docs.kalshi.com/fix/drop-copy#overview) * [Connection Details](https://docs.kalshi.com/fix/drop-copy#connection-details) * [EventResendRequest (35=U1)](https://docs.kalshi.com/fix/drop-copy#eventresendrequest-35%3Du1) * [Fields](https://docs.kalshi.com/fix/drop-copy#fields) * [Limitations](https://docs.kalshi.com/fix/drop-copy#limitations) * [Example Request](https://docs.kalshi.com/fix/drop-copy#example-request) * [EventResendComplete (35=U2)](https://docs.kalshi.com/fix/drop-copy#eventresendcomplete-35%3Du2) * [Fields](https://docs.kalshi.com/fix/drop-copy#fields-2) * [EventResendReject (35=U3)](https://docs.kalshi.com/fix/drop-copy#eventresendreject-35%3Du3) * [Fields](https://docs.kalshi.com/fix/drop-copy#fields-3) * [Rejection Reasons (21004)](https://docs.kalshi.com/fix/drop-copy#rejection-reasons-21004) * [Usage Patterns](https://docs.kalshi.com/fix/drop-copy#usage-patterns) * [Recovery After Disconnect](https://docs.kalshi.com/fix/drop-copy#recovery-after-disconnect) * [Best Practices](https://docs.kalshi.com/fix/drop-copy#best-practices) * [1\. ExecID Management](https://docs.kalshi.com/fix/drop-copy#1-execid-management) * [2\. Rate Limiting](https://docs.kalshi.com/fix/drop-copy#2-rate-limiting) * [3\. Deduplication](https://docs.kalshi.com/fix/drop-copy#3-deduplication) * [4\. Error Recovery](https://docs.kalshi.com/fix/drop-copy#4-error-recovery) * [Comparison with Retransmission](https://docs.kalshi.com/fix/drop-copy#comparison-with-retransmission) [​](https://docs.kalshi.com/fix/drop-copy#drop-copy-session) Drop Copy Session ================================================================================= [​](https://docs.kalshi.com/fix/drop-copy#overview) Overview --------------------------------------------------------------- The drop copy session provides an alternative method to query for missed execution reports without using the FIX retransmission protocol. This is particularly useful for: * Recovering from connection failures * Auditing order activity * Building backup systems * Compliance recording Kalshi’s DropCopy format utilizes a request-response message type, if you are interested in a session that “follows along” the execution report activity of your trading session, consider using a KalshiRT session with the ListenerFlag parameter. [​](https://docs.kalshi.com/fix/drop-copy#connection-details) Connection Details ----------------------------------------------------------------------------------- | Environment | URL | Port | TargetCompID | | --- | --- | --- | --- | | Production | fix.elections.kalshi.com | 8229 | KalshiDC | | Demo | fix.demo.kalshi.co | 8229 | KalshiDC | [​](https://docs.kalshi.com/fix/drop-copy#eventresendrequest-35=u1) EventResendRequest (35=U1) ------------------------------------------------------------------------------------------------- Request execution reports within a specified ExecID range. ### [​](https://docs.kalshi.com/fix/drop-copy#fields) Fields | Tag | Name | Description | Required | | --- | --- | --- | --- | | 21001 | BeginExecID | Starting ExecID (inclusive) | Yes | | 21002 | EndExecID | Ending ExecID (inclusive) | No | If EndExecID is not provided, it defaults to the latest ExecID in your history. ### [​](https://docs.kalshi.com/fix/drop-copy#limitations) Limitations * **Lookback Window**: Last 3 hours only * **Message Types**: Only ExecutionReport (35=8) supported * **Excluded Messages**: * Rejects (no valid ExecID) * Pending new orders (ExecID = “-1;-1”) ### [​](https://docs.kalshi.com/fix/drop-copy#example-request) Example Request Report incorrect code Copy Ask AI 8=FIXT.1.1|35=U1|21001=12345;67890|21002=12350;67895| [​](https://docs.kalshi.com/fix/drop-copy#eventresendcomplete-35=u2) EventResendComplete (35=U2) --------------------------------------------------------------------------------------------------- Sent after all requested events have been resent. ### [​](https://docs.kalshi.com/fix/drop-copy#fields-2) Fields | Tag | Name | Description | Required | | --- | --- | --- | --- | | 45 | RefSeqNum | MsgSeqNum of the EventResendRequest | Yes | | 21003 | ResentEventCount | Total number of events resent | Yes | [​](https://docs.kalshi.com/fix/drop-copy#eventresendreject-35=u3) EventResendReject (35=U3) ----------------------------------------------------------------------------------------------- Sent when a resend request cannot be fulfilled. ### [​](https://docs.kalshi.com/fix/drop-copy#fields-3) Fields | Tag | Name | Description | Required | | --- | --- | --- | --- | | 45 | RefSeqNum | MsgSeqNum of the EventResendRequest | Yes | | 21004 | EventResendRejectReason | Rejection code | Yes | ### [​](https://docs.kalshi.com/fix/drop-copy#rejection-reasons-21004) Rejection Reasons (21004) | Code | Description | | --- | --- | | 1 | Too many resend requests | | 2 | Server error | | 3 | BeginExecID is too small (outside window) | | 4 | EndExecID is too large | [​](https://docs.kalshi.com/fix/drop-copy#usage-patterns) Usage Patterns --------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/drop-copy#recovery-after-disconnect) Recovery After Disconnect 1 [](https://docs.kalshi.com/fix/drop-copy#) Track Last ExecID Store the last processed ExecID before disconnect 2 [](https://docs.kalshi.com/fix/drop-copy#) Reconnect to Drop Copy Establish new drop copy session 3 [](https://docs.kalshi.com/fix/drop-copy#) Request Missing Events Send EventResendRequest starting from last ExecID 4 [](https://docs.kalshi.com/fix/drop-copy#) Process Resent Events Handle execution reports with new sequence numbers [​](https://docs.kalshi.com/fix/drop-copy#best-practices) Best Practices --------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/drop-copy#1-execid-management) 1\. ExecID Management * Store ExecIDs persistently * Handle the two-part format correctly (e.g., “12345;67890”) * Implement proper ID comparison logic ### [​](https://docs.kalshi.com/fix/drop-copy#2-rate-limiting) 2\. Rate Limiting * Avoid excessive resend requests * Implement exponential backoff on failures * Batch requests when possible ### [​](https://docs.kalshi.com/fix/drop-copy#3-deduplication) 3\. Deduplication * Events may arrive via both primary and drop copy sessions * Implement deduplication based on ExecID * Handle out-of-order delivery ### [​](https://docs.kalshi.com/fix/drop-copy#4-error-recovery) 4\. Error Recovery * Handle all rejection codes appropriately * Implement retry logic with delays * Alert on persistent failures [​](https://docs.kalshi.com/fix/drop-copy#comparison-with-retransmission) Comparison with Retransmission ----------------------------------------------------------------------------------------------------------- | Feature | Drop Copy | Retransmission | | --- | --- | --- | | Session Type | Separate | Same as order entry | | Sequence Numbers | Independent | Original preserved | | Lookback Window | 3 hours | 3 hours | | Message Types | ExecutionReport only | All types | | Use Case | Recovery/Audit | Real-time gaps | All resent messages will have new FIX sequence numbers in the drop copy session, different from their original sequence numbers in the order entry session. [RFQ Messages](https://docs.kalshi.com/fix/rfq-messages) [Market Settlement](https://docs.kalshi.com/fix/market-settlement) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Order Group Messages - API Documentation [Skip to main content](https://docs.kalshi.com/fix/order-groups#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Order Group Messages [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Order Group Messages](https://docs.kalshi.com/fix/order-groups#order-group-messages) * [Overview](https://docs.kalshi.com/fix/order-groups#overview) * [Order Group Request (35=UOG)](https://docs.kalshi.com/fix/order-groups#order-group-request-35%3Duog) * [Required Fields](https://docs.kalshi.com/fix/order-groups#required-fields) * [Fields by Action](https://docs.kalshi.com/fix/order-groups#fields-by-action) * [Create (Action=1)](https://docs.kalshi.com/fix/order-groups#create-action%3D1) * [Reset (Action=2)](https://docs.kalshi.com/fix/order-groups#reset-action%3D2) * [Delete (Action=3)](https://docs.kalshi.com/fix/order-groups#delete-action%3D3) * [Trigger (Action=4)](https://docs.kalshi.com/fix/order-groups#trigger-action%3D4) * [Update (Action=5)](https://docs.kalshi.com/fix/order-groups#update-action%3D5) * [Example Messages](https://docs.kalshi.com/fix/order-groups#example-messages) * [Order Group Response (35=UOH)](https://docs.kalshi.com/fix/order-groups#order-group-response-35%3Duoh) * [Response Fields](https://docs.kalshi.com/fix/order-groups#response-fields) [​](https://docs.kalshi.com/fix/order-groups#order-group-messages) Order Group Messages ========================================================================================== [​](https://docs.kalshi.com/fix/order-groups#overview) Overview ------------------------------------------------------------------ Order groups provide automatic order cancellation when a contracts limit is reached. This feature helps manage risk by ensuring positions don’t exceed predefined thresholds. Limits are evaluated over a rolling 15-second window. Order groups are managed through custom FIX message types. When an order group’s contracts limit is hit, all orders in the group are automatically canceled and no new orders can be placed until the group is reset. [​](https://docs.kalshi.com/fix/order-groups#order-group-request-35=uog) Order Group Request (35=UOG) -------------------------------------------------------------------------------------------------------- Manage order groups with Create, Reset, Delete, Trigger, and Update operations. ### [​](https://docs.kalshi.com/fix/order-groups#required-fields) Required Fields | Tag | Name | Description | Type/Values | | --- | --- | --- | --- | | 20131 | OrderGroupAction | Operation to perform | Create<1>, Reset<2>, Delete<3>, Trigger<4>, Update<5> | ### [​](https://docs.kalshi.com/fix/order-groups#fields-by-action) Fields by Action #### [​](https://docs.kalshi.com/fix/order-groups#create-action=1) Create (Action=1) | Tag | Name | Description | Required | | --- | --- | --- | --- | | 20132 | OrderGroupContractsLimit | Maximum contracts allowed (1-1,000,000) | Yes | The OrderGroupID is generated by the server and returned in the response. Do not include tag 20130 in Create requests. #### [​](https://docs.kalshi.com/fix/order-groups#reset-action=2) Reset (Action=2) | Tag | Name | Description | Required | | --- | --- | --- | --- | | 20130 | OrderGroupID | ID of group to reset | Yes | #### [​](https://docs.kalshi.com/fix/order-groups#delete-action=3) Delete (Action=3) | Tag | Name | Description | Required | | --- | --- | --- | --- | | 20130 | OrderGroupID | ID of group to delete | Yes | #### [​](https://docs.kalshi.com/fix/order-groups#trigger-action=4) Trigger (Action=4) | Tag | Name | Description | Required | | --- | --- | --- | --- | | 20130 | OrderGroupID | ID of group to trigger | Yes | The Trigger action immediately cancels all orders in the specified order group, regardless of whether the contracts limit has been reached. This is useful for manual risk management or emergency order cancellation. #### [​](https://docs.kalshi.com/fix/order-groups#update-action=5) Update (Action=5) | Tag | Name | Description | Required | | --- | --- | --- | --- | | 20130 | OrderGroupID | ID of group to update | Yes | | 20132 | OrderGroupContractsLimit | New maximum contracts allowed (1-1,000,000) | Yes | If the updated limit would immediately trigger the group (based on the rolling 15-second window), the server cancels all orders in the group and marks it as triggered. No new orders can be placed until the group is reset. ### [​](https://docs.kalshi.com/fix/order-groups#example-messages) Example Messages Create Order Group Report incorrect code Copy Ask AI 8=FIXT.1.1|9=150|35=UOG|34=5|52=20230809-12:34:56.789|49=your-api-key|56=KalshiNR| 20131=1|20132=5000|10=123| Reset Order Group Report incorrect code Copy Ask AI 8=FIXT.1.1|9=150|35=UOG|34=6|52=20230809-12:34:57.789|49=your-api-key|56=KalshiNR| 20131=2|20130=770e8400-e29b-41d4-a716-446655440002|10=124| Delete Order Group Report incorrect code Copy Ask AI 8=FIXT.1.1|9=150|35=UOG|34=7|52=20230809-12:34:58.789|49=your-api-key|56=KalshiNR| 20131=3|20130=770e8400-e29b-41d4-a716-446655440002|10=125| Trigger Order Group Report incorrect code Copy Ask AI 8=FIXT.1.1|9=150|35=UOG|34=8|52=20230809-12:34:59.789|49=your-api-key|56=KalshiNR| 20131=4|20130=770e8400-e29b-41d4-a716-446655440002|10=126| Update Order Group Limit Report incorrect code Copy Ask AI 8=FIXT.1.1|9=150|35=UOG|34=9|52=20230809-12:35:00.789|49=your-api-key|56=KalshiNR| 20131=5|20130=770e8400-e29b-41d4-a716-446655440002|20132=2500|10=127| [​](https://docs.kalshi.com/fix/order-groups#order-group-response-35=uoh) Order Group Response (35=UOH) ---------------------------------------------------------------------------------------------------------- Response to order group management requests. ### [​](https://docs.kalshi.com/fix/order-groups#response-fields) Response Fields | Tag | Name | Description | | --- | --- | --- | | 20130 | OrderGroupID | ID of the order group | Errors are returned as BusinessMessageReject (35=j) messages, not in the OrderGroupResponse. [Order Entry Messages](https://docs.kalshi.com/fix/order-entry) [RFQ Messages](https://docs.kalshi.com/fix/rfq-messages) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # TypeScript SDK Quick Start - API Documentation [Skip to main content](https://docs.kalshi.com/sdks/typescript/quickstart#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation TypeScript TypeScript SDK Quick Start [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Installation](https://docs.kalshi.com/sdks/typescript/quickstart#installation) * [Quick Start](https://docs.kalshi.com/sdks/typescript/quickstart#quick-start) * [Authentication](https://docs.kalshi.com/sdks/typescript/quickstart#authentication) * [Source Code](https://docs.kalshi.com/sdks/typescript/quickstart#source-code) [​](https://docs.kalshi.com/sdks/typescript/quickstart#installation) Installation ------------------------------------------------------------------------------------ Report incorrect code Copy Ask AI npm install kalshi-typescript [​](https://docs.kalshi.com/sdks/typescript/quickstart#quick-start) Quick Start ---------------------------------------------------------------------------------- Report incorrect code Copy Ask AI import { Configuration, PortfolioApi } from 'kalshi-typescript'; // Configure the SDK const config = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: 'path/to/your/private-key.pem', // or use privateKeyPem basePath: 'https://api.elections.kalshi.com/trade-api/v2' }); // Create API instance const portfolioApi = new PortfolioApi(config); // Make API calls const balance = await portfolioApi.getBalance(); console.log(`Balance: $${(balance.data.balance || 0) / 100}`); [​](https://docs.kalshi.com/sdks/typescript/quickstart#authentication) Authentication ---------------------------------------------------------------------------------------- The SDK uses RSA-PSS signing for authentication. You can provide your private key either as a file path or as a PEM string: Report incorrect code Copy Ask AI // Using file path const config = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: 'path/to/private-key.pem', basePath: 'https://api.elections.kalshi.com/trade-api/v2' }); // Using PEM string const config = new Configuration({ apiKey: 'your-api-key-id', privateKeyPem: '-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----', basePath: 'https://api.elections.kalshi.com/trade-api/v2' }); [​](https://docs.kalshi.com/sdks/typescript/quickstart#source-code) Source Code ---------------------------------------------------------------------------------- * NPM: [kalshi-typescript](https://www.npmjs.com/package/kalshi-typescript) [ApiKeys](https://docs.kalshi.com/python-sdk/api/ApiKeysApi) [Portfolio](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Historical Data - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/historical_data#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Historical Data [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Overview](https://docs.kalshi.com/getting_started/historical_data#overview) * [How It Works](https://docs.kalshi.com/getting_started/historical_data#how-it-works) * [Cutoff Timestamps](https://docs.kalshi.com/getting_started/historical_data#cutoff-timestamps) * [Historical Endpoints](https://docs.kalshi.com/getting_started/historical_data#historical-endpoints) * [Impacted Live Endpoints](https://docs.kalshi.com/getting_started/historical_data#impacted-live-endpoints) * [Migration Guide](https://docs.kalshi.com/getting_started/historical_data#migration-guide) [​](https://docs.kalshi.com/getting_started/historical_data#overview) Overview --------------------------------------------------------------------------------- As trading activity on Kalshi grows, so does the volume of settled markets, completed trades, and fulfilled orders. To keep the live API fast and responsive, Kalshi partitions exchange data into **live** and **historical** tiers. Live endpoints return current and recent data — open and recently closed markets, active orders, and recent fills. Older data that is no longer actively referenced is made available through a separate set of historical endpoints. This separation means that if you query for data that is older than the cutoff (described below), you’ll need to use the historical API instead of the standard live endpoints. The partitioning happens for **markets**, **market\_candlesticks**, **trades**, and **orders**. Old **Events** and **Series** will always still be available through their original endpoints. [​](https://docs.kalshi.com/getting_started/historical_data#how-it-works) How It Works ----------------------------------------------------------------------------------------- The boundary between live and historical data is defined by a set of **cutoff timestamps**, which you can retrieve at any time via `GET /historical/cutoff`. Any record older than the relevant cutoff must be queried through the corresponding historical endpoint. The cutoff timestamps will be regularly updated, advancing forward over time. The target window for live data is approximately **3 months**, though the initial cutoff will start at **1 year** of lookback. [​](https://docs.kalshi.com/getting_started/historical_data#cutoff-timestamps) Cutoff Timestamps --------------------------------------------------------------------------------------------------- | Field | Partitioned By | Meaning | | --- | --- | --- | | `market_settled_ts` | Market settlement time | Markets and their candlesticks that settled before this timestamp are only available via `GET /historical/markets` | | `trades_created_ts` | Trade fill time | Trades that occurred before this timestamp are only available via `GET /historical/trades`. User fills are only available via `GET /historical/fills` | | `orders_updated_ts` | Order cancellation or execution time | Orders canceled or fully executed before this timestamp are only available via `GET /historical/orders` | Resting (active) orders are unaffected and always appear in `GET /portfolio/orders`, regardless of the cutoff. [​](https://docs.kalshi.com/getting_started/historical_data#historical-endpoints) Historical Endpoints --------------------------------------------------------------------------------------------------------- | Endpoint | Description | | --- | --- | | `GET /historical/cutoff` | Returns the current cutoff timestamps | | `GET /historical/markets` | Settled markets older than the cutoff | | `GET /historical/markets/{ticker}` | Single historical market by ticker | | `GET /historical/markets/{ticker}/candlesticks` | Candlestick data for historical markets | | `GET /historical/trades` | All trades older than the cutoff | | `GET /historical/fills` | User-scoped trade fills older than the cutoff | | `GET /historical/orders` | Canceled/executed orders older than the cutoff | [​](https://docs.kalshi.com/getting_started/historical_data#impacted-live-endpoints) Impacted Live Endpoints --------------------------------------------------------------------------------------------------------------- The following live endpoints will no longer return data older than the corresponding cutoff: | Live Endpoint | Cutoff Field | Impact | | --- | --- | --- | | `GET /markets`, `GET /markets/{ticker}` | `market_settled_ts` | Settled markets and their candlesticks older than the cutoff will not appear | | `GET /events` with `with_nested_markets=true` | `market_settled_ts` | Nested markets older than the cutoff will not be included, only markets impacted | | `GET /markets/trades` | `trades_created_ts` | Trades older than the cutoff will not appear | | `GET /portfolio/fills` | `trades_created_ts` | Fills older than the cutoff will not appear | | `GET /portfolio/orders` | `orders_updated_ts` | Completed/canceled orders older than the cutoff will not appear (resting orders are unaffected) | [​](https://docs.kalshi.com/getting_started/historical_data#migration-guide) Migration Guide ----------------------------------------------------------------------------------------------- 1. **Fetch the cutoff** — call `GET /historical/cutoff` to get the current timestamps. 2. **Route queries accordingly** — if the data you need is older than the relevant cutoff, use the corresponding `GET /historical/...` endpoint instead. 3. **Combine results if needed** — for use cases like building a complete fill history, query both the live and historical endpoints and merge the results. The historical endpoints support the same [cursor-based pagination](https://docs.kalshi.com/getting_started/pagination) as their live counterparts. For the time being, historical data is still available through the standard live endpoints. However, we are targeting **March 6th, 2026** for the removal of historical data from the live API. Please migrate to the historical endpoints before this date.The initial cutoff timestamps are initially intended to be the same across **markets**, **trades**, and **orders**, and to start with a 1 year lookback. Over time, the cutoff timestamps are intended to move up to approximately 2-3 months. [Fee Rounding](https://docs.kalshi.com/getting_started/fee_rounding) [Kalshi Glossary](https://docs.kalshi.com/getting_started/terms) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Fixed-Point Migration - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/fixed_point_migration#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Fixed-Point Migration [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Overview](https://docs.kalshi.com/getting_started/fixed_point_migration#overview) * [Deprecation Timeline](https://docs.kalshi.com/getting_started/fixed_point_migration#deprecation-timeline) * [Subpenny Pricing](https://docs.kalshi.com/getting_started/fixed_point_migration#subpenny-pricing) * [Price Level Structures](https://docs.kalshi.com/getting_started/fixed_point_migration#price-level-structures) * [Fractional Contracts](https://docs.kalshi.com/getting_started/fixed_point_migration#fractional-contracts) * [Fee Rounding](https://docs.kalshi.com/getting_started/fixed_point_migration#fee-rounding) Last Updated: March 3, 2026 [​](https://docs.kalshi.com/getting_started/fixed_point_migration#overview) Overview --------------------------------------------------------------------------------------- Kalshi is migrating from integer to fixed-point representation across all APIs. This involves two independent changes: 1. **Subpenny Pricing** — price fields transition from integer cents to fixed-point dollar strings (`_dollars` suffix) 2. **Fractional Contracts** — contract count fields transition from integers to fixed-point strings (`_fp` suffix) Two fields on Market responses indicate which of these features are active for a given market: | Field | Type | Description | | --- | --- | --- | | `price_level_structure` | string | Price level structure defining price ranges and tick sizes | | `fractional_trading_enabled` | boolean | Whether fractional order sizes are accepted | [​](https://docs.kalshi.com/getting_started/fixed_point_migration#deprecation-timeline) Deprecation Timeline --------------------------------------------------------------------------------------------------------------- 1. `_fp` and `_dollars` fields returned and accepted across REST and WebSocket APIs — **Completed January 29, 2026** 2. Legacy integer count fields and integer cents price fields will **no longer be returned**. Fractional order sizes enabled per-market. Users must migrate to `_fp` and `_dollars` equivalents — **March 12, 2026** (they may be truncated prior to March 12 and will be removed after March 12) 3. REST endpoints will no longer accept integer fields for contract counts — **TBD** Please follow along the [changelog](https://docs.kalshi.com/changelog) for further updates. * * * [​](https://docs.kalshi.com/getting_started/fixed_point_migration#subpenny-pricing) Subpenny Pricing ------------------------------------------------------------------------------------------------------- Prices are represented in two formats: integer cents (legacy) and fixed-point dollars (new). Report incorrect code Copy Ask AI { "price": 12, "price_dollars": "0.1200" } * `*_dollars` fields are fixed-point dollar strings with up to 4 decimal places (e.g., `"0.1200"`) * When combined with fractional contract sizes, intermediate calculations can reach up to 6 decimal places (for example, in fee rounding math) * Legacy integer cents price fields (e.g., `yes_bid`, `no_ask`, `last_price`) will be deprecated on **March 12, 2026**. Their `_dollars` equivalents (e.g., `yes_bid_dollars`, `no_ask_dollars`, `last_price_dollars`) are already available Subpenny pricing is offered on a per-market basis. The `price_level_structure` field on Market responses indicates which pricing tier is active, and the `price_ranges` array provides the exact valid price intervals and tick sizes for that market. ### [​](https://docs.kalshi.com/getting_started/fixed_point_migration#price-level-structures) Price Level Structures | Structure | Ranges | Tick Size | | --- | --- | --- | | `linear_cent` | $0.00 – $1.00 | $0.01 | | `tapered_deci_cent` | $0.00 – $0.10 | $0.001 | | | $0.10 – $0.90 | $0.01 | | | $0.90 – $1.00 | $0.001 | | `deci_cent` | $0.00 – $1.00 | $0.001 | `tapered_deci_cent` provides finer $0.001 (decicent) precision at the tails of the probability range — below $0.10 and above $0.90 — where small absolute price differences represent large relative changes in implied probability. The middle range uses standard $0.01 (cent) ticks. `deci_cent` applies $0.001 precision across the entire range. * * * [​](https://docs.kalshi.com/getting_started/fixed_point_migration#fractional-contracts) Fractional Contracts --------------------------------------------------------------------------------------------------------------- Contract count fields are transitioning from integers to fixed-point strings. Report incorrect code Copy Ask AI { "count": 10, "count_fp": "10.00" } * `*_fp` fields are strings * Accept 0-2 decimal places on input (responses always emit 2 decimals) * In requests where both integer and `_fp` fields are provided, they must match Starting the week of **March 9, 2026**, fractional trading will be enabled on a limited per-market basis. Check the `fractional_trading_enabled` field on Market responses to determine whether a given market supports fractional order sizes. For fractional-enabled markets, the legacy integer count fields (e.g., `count`, `remaining_count`) should not be relied upon. Between fractional enablement (week of **March 9, 2026**) and legacy-field removal (**March 12, 2026**), they may still appear but will contain **truncated values**; after March 12 they will no longer be returned. Migrate to their `_fp` equivalents to avoid data loss. Even if you are not placing fractional orders, you may encounter fractional values in other parts of the API (for example, fills on fractional-enabled markets). One way to prepare is to internally multiply the `_fp` value by 100 and cast to an integer. For example, treating `"1.55"` as 155 units of 1c contracts allows continued use of integer arithmetic. * * * [​](https://docs.kalshi.com/getting_started/fixed_point_migration#fee-rounding) Fee Rounding ----------------------------------------------------------------------------------------------- Both subpenny pricing and fractional contracts can produce sub-cent balance changes on fills. When this happens, the exchange applies a rounding fee to restore cent-alignment, and a fee accumulator issues rebates to prevent systematic overpayment. See [Fee Rounding](https://docs.kalshi.com/getting_started/fee_rounding) for the mechanics and worked examples. [Orderbook Responses](https://docs.kalshi.com/getting_started/orderbook_responses) [Fee Rounding](https://docs.kalshi.com/getting_started/fee_rounding) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Fee Rounding - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/fee_rounding#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Fee Rounding [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Overview](https://docs.kalshi.com/getting_started/fee_rounding#overview) * [Rounding Mechanics](https://docs.kalshi.com/getting_started/fee_rounding#rounding-mechanics) * [Fee Accumulator](https://docs.kalshi.com/getting_started/fee_rounding#fee-accumulator) * [When Does Rounding Apply?](https://docs.kalshi.com/getting_started/fee_rounding#when-does-rounding-apply) * [Worked Examples](https://docs.kalshi.com/getting_started/fee_rounding#worked-examples) [​](https://docs.kalshi.com/getting_started/fee_rounding#overview) Overview ------------------------------------------------------------------------------ User balances must be exact multiples of **$0.01** before and after every fill. When a trade produces a sub-cent balance change, the exchange charges a **rounding fee** to bring the balance back to cent alignment. A **fee accumulator** applies rounding across all fills of an order collectively so that the total fee converges to what a single equivalent fill would cost. Every fill produces three fee components: | Component | Description | | --- | --- | | **Trade fee** | Fee from the fee model, rounded up to the nearest $0.0001 (centicent) | | **Rounding fee** | Sub-cent adjustment that restores cent-alignment ($0.0000 - $0.0099) | | **Rebate** | Refund from accumulated rounding overpayment (always a multiple of $0.01) | **Net fee** = trade fee + rounding fee - rebate (always >= $0.00) [​](https://docs.kalshi.com/getting_started/fee_rounding#rounding-mechanics) Rounding Mechanics -------------------------------------------------------------------------------------------------- Given a fill’s `revenue` (signed; negative for buyers) and `trade_fee`: 1. Round trade fee **up** to the nearest $0.0001 2. Compute `balance_change = revenue - trade_fee` 3. Floor `balance_change` toward negative infinity to the nearest $0.01 4. `rounding_fee = balance_change - floor(balance_change)` The user’s balance changes by `floor(balance_change)`, which is always cent-aligned. [​](https://docs.kalshi.com/getting_started/fee_rounding#fee-accumulator) Fee Accumulator -------------------------------------------------------------------------------------------- The fee accumulator tracks cumulative rounding overpayment across all fills of an order. Once the accumulated rounding exceeds $0.01, a whole-cent rebate is issued and the accumulator is reduced by $0.01. This ensures the total fee across many small fills converges to what a single equivalent fill would cost. The fee accumulator is maintained per order across all fills regardless of whether the fills are taker or maker. If an order initially takes (matching resting orders) and then becomes a resting maker order, the accumulated rounding carries over to subsequent maker fills. [​](https://docs.kalshi.com/getting_started/fee_rounding#when-does-rounding-apply) When Does Rounding Apply? --------------------------------------------------------------------------------------------------------------- Rounding applies whenever `revenue - trade_fee` has a sub-cent component. This can happen two ways: * **Subpenny prices** (e.g., $0.0550) — sub-cent revenue from the price itself * **Fractional contracts** (e.g., 0.30 contracts) — sub-cent revenue from the fractional quantity When both apply simultaneously, intermediate values can reach up to 6 decimal places (for example, `$0.3301 * 0.03 = $0.009903`). The worked examples below show each scenario. * * * [​](https://docs.kalshi.com/getting_started/fee_rounding#worked-examples) Worked Examples -------------------------------------------------------------------------------------------- Subpenny prices: buy 3 contracts at $0.055 (three 1-lot matches) Buy **3 contracts** at **$0.055** — filled as three 1-lot matches. Contracts are whole; rounding arises from the sub-cent price.**Fill 1 walkthrough:** Report incorrect code Copy Ask AI revenue = -$0.055 x 1 = -$0.0550 trade fee = $0.0085 (ceiled to centicent) balance change = -$0.0550 - $0.0085 = -$0.0635 floored to -$0.07 rounding fee = $0.07 - $0.0635 = $0.0065 **All fills:** | Fill | Trade Fee | Rounding | Accumulator | Rebate | Net Fee | Balance Change | | --- | --- | --- | --- | --- | --- | --- | | 1 | $0.0085 | $0.0065 | $0.0065 | — | $0.0150 | \-$0.07 | | 2 | $0.0085 | $0.0065 | $0.0130 | $0.0100 | $0.0050 | \-$0.07 | | 3 | $0.0085 | $0.0065 | $0.0095 | — | $0.0150 | \-$0.07 | On Fill 2, the accumulator reaches $0.0130 (> $0.01), triggering a $0.01 rebate. The net fee drops to $0.0050 for that fill. Fractional contracts: buy 0.90 contracts at $0.50 (three 0.30-lot matches) Buy **0.90 contracts** at **$0.50** — filled as three 0.30-lot matches. The price is a whole cent; rounding arises from the fractional quantity.**Fill 1 walkthrough:** Report incorrect code Copy Ask AI revenue = -$0.50 x 0.30 = -$0.1500 trade fee = $0.0041 (ceiled to centicent) balance change = -$0.1500 - $0.0041 = -$0.1541 floored to -$0.16 rounding fee = $0.16 - $0.1541 = $0.0059 **All fills:** | Fill | Trade Fee | Rounding | Accumulator | Rebate | Net Fee | Balance Change | | --- | --- | --- | --- | --- | --- | --- | | 1 | $0.0041 | $0.0059 | $0.0059 | — | $0.0100 | \-$0.16 | | 2 | $0.0041 | $0.0059 | $0.0118 | $0.0100 | $0.0000 | \-$0.16 | | 3 | $0.0041 | $0.0059 | $0.0077 | — | $0.0100 | \-$0.16 | On Fill 2, the accumulator reaches $0.0118 (> $0.01), triggering a $0.01 rebate. The entire fee is offset, resulting in a $0.00 net fee for that fill. Combined: fractional contracts + subpenny prices (three 0.03-lot matches) Buy **0.09 contracts** at **$0.3301** — filled as three 0.03-lot matches. Both features contribute sub-cent components, pushing intermediates to 6 decimal places.**Fill 1 walkthrough:** Report incorrect code Copy Ask AI revenue = -$0.3301 x 0.03 = -$0.009903 trade fee = $0.0005 (ceiled to centicent) balance change = -$0.009903 - $0.0005 = -$0.010403 floored to -$0.02 rounding fee = $0.02 - $0.010403 = $0.009597 **All fills:** | Fill | Trade Fee | Rounding | Accumulator | Rebate | Net Fee | Balance Change | | --- | --- | --- | --- | --- | --- | --- | | 1 | $0.0005 | $0.009597 | $0.009597 | — | $0.010097 | \-$0.02 | | 2 | $0.0005 | $0.009597 | $0.019194 | $0.0100 | $0.000097 | \-$0.02 | | 3 | $0.0005 | $0.009597 | $0.018791 | $0.0100 | $0.000097 | \-$0.02 | The accumulator triggers a rebate on both Fill 2 and Fill 3, keeping the total net fee close to the single-fill equivalent. Subpenny prices alone produce 4-decimal-place intermediates. Fractional contracts alone also produce 4-decimal-place intermediates. When combined, intermediates can reach 6 decimal places (e.g., $0.3301 x 0.03 = $0.009903). Final balances are always rounded to whole cents. [Fixed-Point Migration](https://docs.kalshi.com/getting_started/fixed_point_migration) [Historical Data](https://docs.kalshi.com/getting_started/historical_data) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Subpenny Pricing - API Documentation [Skip to main content](https://docs.kalshi.com/fix/subpenny-pricing#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Subpenny Pricing [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Technical Specification](https://docs.kalshi.com/fix/subpenny-pricing#technical-specification) * [Sample Messages](https://docs.kalshi.com/fix/subpenny-pricing#sample-messages) For the general overview of fixed-point pricing and contract quantities across REST and WebSocket APIs, see [Fixed-Point Migration](https://docs.kalshi.com/getting_started/fixed_point_migration) . [​](https://docs.kalshi.com/fix/subpenny-pricing#technical-specification) Technical Specification ---------------------------------------------------------------------------------------------------- To enable subpenny precision, include tag **21005** in your Logon message: | Tag | Name | Description | Value | | --- | --- | --- | --- | | 21005 | UseDollars | Enable dollar-based price format | Y | Overview: * **Legacy Format (Cents)**: Prices given in whole cents. E.g. 72 cents = `72`. * **New Format (Dollars)**: Prices normalized to dollars with fixed precision (up to 4 decimal places). Examples: | Cents | FIX Decimal | String Representation | | --- | --- | --- | | 1.23¢ | Decimal(123, -4) | 0.0123 | | 72.5¢ | Decimal(7250, -4) | 0.725 | | 99¢ | Decimal(9900, -4) | 0.99 | Affected Tags: | Tag | Field Name | Description | | --- | --- | --- | | 6 | AvgPx | Average price of fills | | 31 | LastPx | Price of last fill | | 44 | Price | Order limit price | | 132 | BidPx | Quote bid price | | 133 | OfferPx | Quote ask price | [​](https://docs.kalshi.com/fix/subpenny-pricing#sample-messages) Sample Messages ------------------------------------------------------------------------------------ logon Report incorrect code Copy Ask AI 8=FIXT.1.1|9=300|35=A|34=1|52=20250926-21:54:07.001| 96=QhA8659Mhygcm+xE/wb1m...|21005=Y| ^^ Enable dollar format new order single Report incorrect code Copy Ask AI 8=FIXT.1.1|9=200|35=D|34=2|52=20250926-21:54:16.040| 38=100.0|40=2|44=0.7500|54=1|60=20250926-21:54:16.040| ^^ price 10=092| execution report Report incorrect code Copy Ask AI 8=FIXT.1.1|9=400|35=8|34=4|52=20250926-21:54:16.159| 6=0.6600|14=100|31=0.7000|32=60|38=100.0000|39=2|44=0.7500| ^^ avgPx ^^ lastPx ^^ price [Error Handling](https://docs.kalshi.com/fix/error-handling) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Quick Start: Create your first order (No SDK) - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/quick_start_create_order#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Quick Start: Create your first order (No SDK) [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Prerequisites](https://docs.kalshi.com/getting_started/quick_start_create_order#prerequisites) * [Step 1: Find an Open Market](https://docs.kalshi.com/getting_started/quick_start_create_order#step-1-find-an-open-market) * [Step 2: Place a Buy Order](https://docs.kalshi.com/getting_started/quick_start_create_order#step-2-place-a-buy-order) * [Complete Example Script](https://docs.kalshi.com/getting_started/quick_start_create_order#complete-example-script) * [Important Notes](https://docs.kalshi.com/getting_started/quick_start_create_order#important-notes) * [Client Order ID](https://docs.kalshi.com/getting_started/quick_start_create_order#client-order-id) * [Error Handling](https://docs.kalshi.com/getting_started/quick_start_create_order#error-handling) * [Next Steps](https://docs.kalshi.com/getting_started/quick_start_create_order#next-steps) This guide will walk you through the complete lifecycle of placing and managing orders on Kalshi. [​](https://docs.kalshi.com/getting_started/quick_start_create_order#prerequisites) Prerequisites ---------------------------------------------------------------------------------------------------- Before you begin, you’ll need: * A Kalshi account with API access configured * Python with the `requests` and `cryptography` libraries installed * Your authentication functions set up (see our [authentication guide](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests) ) This guide assumes you have the authentication code from our authentication guide, including the `get()` function for making authenticated requests. [​](https://docs.kalshi.com/getting_started/quick_start_create_order#step-1-find-an-open-market) Step 1: Find an Open Market ------------------------------------------------------------------------------------------------------------------------------- First, let’s find an open market to trade on. Report incorrect code Copy Ask AI # Get the first open market (no auth required for public market data) response = requests.get('https://demo-api.kalshi.co/trade-api/v2/markets?limit=1&status=open') market = response.json()['markets'][0] print(f"Selected market: {market['ticker']}") print(f"Title: {market['title']}") [​](https://docs.kalshi.com/getting_started/quick_start_create_order#step-2-place-a-buy-order) Step 2: Place a Buy Order --------------------------------------------------------------------------------------------------------------------------- Now let’s place an order to buy 1 YES contract for 1 cent (limit order). We’ll use a `client_order_id` to deduplicate orders - this allows you to identify duplicate orders before receiving the server-generated `order_id` in the response. Report incorrect code Copy Ask AI import uuid def post(private_key, api_key_id, path, data, base_url=BASE_URL): """Make an authenticated POST request to the Kalshi API.""" timestamp = str(int(datetime.datetime.now().timestamp() * 1000)) signature = create_signature(private_key, timestamp, "POST", path) headers = { 'KALSHI-ACCESS-KEY': api_key_id, 'KALSHI-ACCESS-SIGNATURE': signature, 'KALSHI-ACCESS-TIMESTAMP': timestamp, 'Content-Type': 'application/json' } return requests.post(base_url + path, headers=headers, json=data) # Place a buy order for 1 YES contract at 1 cent order_data = { "ticker": market['ticker'], "action": "buy", "side": "yes", "count": 1, "type": "limit", "yes_price": 1, "client_order_id": str(uuid.uuid4()) # Unique ID for deduplication } response = post(private_key, API_KEY_ID, '/trade-api/v2/portfolio/orders', order_data) if response.status_code == 201: order = response.json()['order'] print(f"Order placed successfully!") print(f"Order ID: {order['order_id']}") print(f"Client Order ID: {order_data['client_order_id']}") print(f"Status: {order['status']}") else: print(f"Error: {response.status_code} - {response.text}") [​](https://docs.kalshi.com/getting_started/quick_start_create_order#complete-example-script) Complete Example Script ------------------------------------------------------------------------------------------------------------------------ Here’s a complete script that creates your first order: Report incorrect code Copy Ask AI import requests import uuid # Assumes you have the authentication code from the prerequisites # Add POST function to your existing auth code def post(private_key, api_key_id, path, data, base_url=BASE_URL): """Make an authenticated POST request to the Kalshi API.""" timestamp = str(int(datetime.datetime.now().timestamp() * 1000)) signature = create_signature(private_key, timestamp, "POST", path) headers = { 'KALSHI-ACCESS-KEY': api_key_id, 'KALSHI-ACCESS-SIGNATURE': signature, 'KALSHI-ACCESS-TIMESTAMP': timestamp, 'Content-Type': 'application/json' } return requests.post(base_url + path, headers=headers, json=data) # Step 1: Find an open market print("Finding an open market...") response = requests.get('https://demo-api.kalshi.co/trade-api/v2/markets?limit=1&status=open') market = response.json()['markets'][0] print(f"Selected: {market['ticker']} - {market['title']}") # Step 2: Place a buy order print("\nPlacing order...") client_order_id = str(uuid.uuid4()) order_data = { "ticker": market['ticker'], "action": "buy", "side": "yes", "count": 1, "type": "limit", "yes_price": 1, "client_order_id": client_order_id } response = post(private_key, API_KEY_ID, '/trade-api/v2/portfolio/orders', order_data) if response.status_code == 201: order = response.json()['order'] print(f"Order placed successfully!") print(f"Order ID: {order['order_id']}") print(f"Client Order ID: {client_order_id}") print(f"Status: {order['status']}") else: print(f"Error: {response.status_code} - {response.text}") [​](https://docs.kalshi.com/getting_started/quick_start_create_order#important-notes) Important Notes -------------------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/getting_started/quick_start_create_order#client-order-id) Client Order ID The `client_order_id` field is crucial for order deduplication: * Generate a unique ID (like UUID4) for each order before submission * If network issues occur, you can resubmit with the same `client_order_id` * The API will reject duplicate submissions, preventing accidental double orders * Store this ID locally to track orders before receiving the server’s `order_id` ### [​](https://docs.kalshi.com/getting_started/quick_start_create_order#error-handling) Error Handling Common errors and how to handle them: * `401 Unauthorized`: Check your API keys and signature generation * `400 Bad Request`: Verify your order parameters (price must be 1-99 cents) * `409 Conflict`: Order with this `client_order_id` already exists * `429 Too Many Requests`: You’ve hit the rate limit - slow down your requests [​](https://docs.kalshi.com/getting_started/quick_start_create_order#next-steps) Next Steps ---------------------------------------------------------------------------------------------- Now that you’ve created your first order, you can: * Check order status using the `/portfolio/orders/{order_id}` endpoint * List all your orders with `/portfolio/orders` * Amend your order price or quantity using PUT `/portfolio/orders/{order_id}` * Cancel orders using DELETE `/portfolio/orders/{order_id}` * Implement WebSocket connections for real-time updates * Build automated trading strategies For more information, check out: * [API Reference Documentation](https://docs.kalshi.com/api-reference) * [Kalshi Discord Community](https://discord.gg/kalshi) [Quick Start: Authenticated Requests (No SDK)](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests) [Quick Start: WebSockets (No SDK)](https://docs.kalshi.com/getting_started/quick_start_websockets) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Kalshi Glossary - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/terms#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Kalshi Glossary [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Here are some core terminologies used in Kalshi exchange: **Market:** A single binary market. This is a low level object which rarely will need to be exposed on its own to members. The usage of the term “market” here is consistent with how it’s used in the backend and API. **Event:** An event is a collection of markets and the basic unit that members should interact with on Kalshi. **Series:** A series is a collection of related events. The following should hold true for events that make up a series: * Each event should look at similar data for determination, but translated over another, disjoint time period. * Series should never have a logical outcome dependency between events. * Events in a series should have the same ticker prefix. Please see the “Timeline and Payout” dropdown on a market’s page to find the Market, Event, and Series tickers. Note that the market ticker will depend on which market you are looking at on that page. For example, Trump and Harris are each their own market. [Historical Data](https://docs.kalshi.com/getting_started/historical_data) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Market Settlement - API Documentation [Skip to main content](https://docs.kalshi.com/fix/market-settlement#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Market Settlement [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Market Settlement](https://docs.kalshi.com/fix/market-settlement#market-settlement) * [Overview](https://docs.kalshi.com/fix/market-settlement#overview) * [Market Settlement Report (35=UMS)](https://docs.kalshi.com/fix/market-settlement#market-settlement-report-35%3Dums) * [Message Structure](https://docs.kalshi.com/fix/market-settlement#message-structure) * [Repeating Groups](https://docs.kalshi.com/fix/market-settlement#repeating-groups) * [Party Information (NoMarketSettlementPartyIDs)](https://docs.kalshi.com/fix/market-settlement#party-information-nomarketsettlementpartyids) * [Collateral Changes (NoCollateralAmountChanges)](https://docs.kalshi.com/fix/market-settlement#collateral-changes-nocollateralamountchanges) * [Fees (NoMiscFees)](https://docs.kalshi.com/fix/market-settlement#fees-nomiscfees) * [Settlement Process](https://docs.kalshi.com/fix/market-settlement#settlement-process) * [Market Resolution Flow](https://docs.kalshi.com/fix/market-settlement#market-resolution-flow) * [Settlement Calculations](https://docs.kalshi.com/fix/market-settlement#settlement-calculations) * [Example Settlement Report](https://docs.kalshi.com/fix/market-settlement#example-settlement-report) * [Pagination](https://docs.kalshi.com/fix/market-settlement#pagination) * [Settlement Timing](https://docs.kalshi.com/fix/market-settlement#settlement-timing) * [Integration Considerations](https://docs.kalshi.com/fix/market-settlement#integration-considerations) * [1\. Position Reconciliation](https://docs.kalshi.com/fix/market-settlement#1-position-reconciliation) * [2\. Multi-Account Handling](https://docs.kalshi.com/fix/market-settlement#2-multi-account-handling) * [3\. Fee Processing](https://docs.kalshi.com/fix/market-settlement#3-fee-processing) * [Best Practices](https://docs.kalshi.com/fix/market-settlement#best-practices) * [Real-time Processing](https://docs.kalshi.com/fix/market-settlement#real-time-processing) * [Batch Processing](https://docs.kalshi.com/fix/market-settlement#batch-processing) * [Related Systems](https://docs.kalshi.com/fix/market-settlement#related-systems) * [Error Scenarios](https://docs.kalshi.com/fix/market-settlement#error-scenarios) * [Missing Settlements](https://docs.kalshi.com/fix/market-settlement#missing-settlements) * [Incorrect Positions](https://docs.kalshi.com/fix/market-settlement#incorrect-positions) [​](https://docs.kalshi.com/fix/market-settlement#market-settlement) Market Settlement ========================================================================================= [​](https://docs.kalshi.com/fix/market-settlement#overview) Overview ----------------------------------------------------------------------- Market settlement messages provide information about market outcomes and the resulting position settlements. These messages are available on: * **KalshiPT** (Post Trade) sessions * **KalshiRT** sessions when `ReceiveSettlementReports=Y` in Logon Settlement occurs when a market’s outcome is determined, triggering automatic position resolution and fund transfers. [​](https://docs.kalshi.com/fix/market-settlement#market-settlement-report-35=ums) Market Settlement Report (35=UMS) ----------------------------------------------------------------------------------------------------------------------- Provides settlement details for a specific market. ### [​](https://docs.kalshi.com/fix/market-settlement#message-structure) Message Structure | Tag | Name | Description | Required | | --- | --- | --- | --- | | 20105 | MarketSettlementReportID | Unique settlement identifier | Yes | | 55 | Symbol | Market ticker (e.g., NHIGH-23JAN02-66) | Yes | | 715 | ClearingBusinessDate | Date settlement cleared (YYYYMMDD) | Yes | | 20106 | TotNumMarketSettlementReports | Total number of settlement reports in sequence | No | | 20107 | MarketResult | Result of the market when determined | Yes | | 893 | LastFragment | Last page indicator (Y/N) | No | | 730 | SettlementPrice | Settlement price of market in cents (2 decimal places, e.g. `30.60`) | Yes | ### [​](https://docs.kalshi.com/fix/market-settlement#repeating-groups) Repeating Groups #### [​](https://docs.kalshi.com/fix/market-settlement#party-information-nomarketsettlementpartyids) Party Information (NoMarketSettlementPartyIDs) | Tag | Name | Description | | --- | --- | --- | | 20108 | NoMarketSettlementPartyIDs | Number of parties | | 20109 | MarketSettlementPartyID | Unique identifier for party | | 20110 | MarketSettlementPartyRole | Type of party (Customer Account<24>) | | 704 | LongQty | Number of YES contracts held | | 705 | ShortQty | Number of NO contracts held | #### [​](https://docs.kalshi.com/fix/market-settlement#collateral-changes-nocollateralamountchanges) Collateral Changes (NoCollateralAmountChanges) | Tag | Name | Description | | --- | --- | --- | | 1703 | NoCollateralAmountChanges | Number of collateral changes (should be only 1 - payout balance change) | | 1704 | CollateralAmountChange | Delta in dollars | | 1705 | CollateralAmountType | Balance<1> or Payout<2> | #### [​](https://docs.kalshi.com/fix/market-settlement#fees-nomiscfees) Fees (NoMiscFees) | Tag | Name | Description | | --- | --- | --- | | 136 | NoMiscFees | Number of fees (currently zero, single item with zeroed values) | | 137 | MiscFeeAmt | Total fees for settlement in dollars | | 138 | MiscFeeCurr | Currency (USD) | | 139 | MiscFeeType | Type of fee (Exchange fees<4>) | | 891 | MiscFeeBasis | Unit for fee (Absolute<0>) | [​](https://docs.kalshi.com/fix/market-settlement#settlement-process) Settlement Process ------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/market-settlement#market-resolution-flow) Market Resolution Flow ### [​](https://docs.kalshi.com/fix/market-settlement#settlement-calculations) Settlement Calculations For each position: * **Yes outcome**: Yes contract holders receive $1 per contract * **No outcome**: No contract holders receive $1 per contract * **Net position**: Only net positions are settled (after netting) [​](https://docs.kalshi.com/fix/market-settlement#example-settlement-report) Example Settlement Report --------------------------------------------------------------------------------------------------------- Report incorrect code Copy Ask AI // Market settled as "Yes" 8=FIXT.1.1|35=UMS| 20105=settle-123|55=HIGHNY-23DEC31|715=20231231| 20107=Yes| 20108=1| 20109=user-456|20110=24| 704=100|705=0| 1703=1| 1704=10000|1705=1| 136=1| 137=0.00|138=USD|139=4|891=0| 893=Y| This example shows: * Market HIGHNY-23DEC31 settled as “Yes” * User held 100 Yes contracts * Received $100.00 (10000 cents) to balance * No settlement fees [​](https://docs.kalshi.com/fix/market-settlement#pagination) Pagination --------------------------------------------------------------------------- Large settlement batches may span multiple messages: | Tag | Use Case | | --- | --- | | 20106 | Total number of reports in batch | | 893 | LastFragment=N for more pages, Y for last | **Important:** The `MarketSettlementReportID` (tag 20105) will be different across paginated responses. Each page of results generates a new unique settlement ID. Use the `Symbol` (tag 55) ticker to identify fragments belonging to the same paginated settlement. [​](https://docs.kalshi.com/fix/market-settlement#settlement-timing) Settlement Timing ----------------------------------------------------------------------------------------- Markets typically settle shortly after expiration, but timing can vary based on: * Market type * Data source availability * Manual review requirements [​](https://docs.kalshi.com/fix/market-settlement#integration-considerations) Integration Considerations ----------------------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/market-settlement#1-position-reconciliation) 1\. Position Reconciliation Report incorrect code Copy Ask AI def reconcile_settlement(report): # Verify position matches records our_position = get_position(report.Symbol) if report.LongQty != our_position.yes_contracts: alert("Position mismatch", report) # Verify payout calculation if report.MarketResult == "Yes": expected_payout = report.LongQty * 100 # cents else: expected_payout = report.ShortQty * 100 if report.CollateralAmountChange != expected_payout: alert("Payout mismatch", report) ### [​](https://docs.kalshi.com/fix/market-settlement#2-multi-account-handling) 2\. Multi-Account Handling For sessions managing multiple accounts: * Each party (sub-account) receives separate entry * Aggregate by MarketSettlementPartyID * Track settlements per account ### [​](https://docs.kalshi.com/fix/market-settlement#3-fee-processing) 3\. Fee Processing Currently settlement fees are zero, but implement handling for future changes: * Parse NoMiscFees group * Account for fees in P&L calculations * Track fee types for reporting [​](https://docs.kalshi.com/fix/market-settlement#best-practices) Best Practices ----------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/market-settlement#real-time-processing) Real-time Processing 1 [](https://docs.kalshi.com/fix/market-settlement#) Subscribe to Reports Set ReceiveSettlementReports=Y in KalshiRT Logon 2 [](https://docs.kalshi.com/fix/market-settlement#) Process Immediately Update positions and balances in real-time 3 [](https://docs.kalshi.com/fix/market-settlement#) Reconcile Compare with expected outcomes and positions 4 [](https://docs.kalshi.com/fix/market-settlement#) Update Risk Adjust risk calculations for settled positions ### [​](https://docs.kalshi.com/fix/market-settlement#batch-processing) Batch Processing For post-trade reconciliation: 1. Connect to KalshiPT session 2. Query for day’s settlements 3. Process in sequence order 4. Generate settlement reports [​](https://docs.kalshi.com/fix/market-settlement#related-systems) Related Systems ------------------------------------------------------------------------------------- | System | Purpose | | --- | --- | | Order Entry | Track positions leading to settlement | | Drop Copy | Audit trail of trades | | Market Data | Market expiration times | | REST API | Query market details and outcomes | [​](https://docs.kalshi.com/fix/market-settlement#error-scenarios) Error Scenarios ------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/market-settlement#missing-settlements) Missing Settlements If settlements are missing: 1. Check connection to appropriate session 2. Verify ReceiveSettlementReports flag 3. Use REST API as backup data source 4. Contact support if discrepancies persist ### [​](https://docs.kalshi.com/fix/market-settlement#incorrect-positions) Incorrect Positions Position mismatches may indicate: * Missed execution reports * Incorrect position tracking * Late trades near expiration Always maintain independent position tracking for verification. [Drop Copy Session](https://docs.kalshi.com/fix/drop-copy) [Error Handling](https://docs.kalshi.com/fix/error-handling) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # RFQ Messages - API Documentation [Skip to main content](https://docs.kalshi.com/fix/rfq-messages#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation RFQ Messages [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [RFQ (Request for Quote) Messages](https://docs.kalshi.com/fix/rfq-messages#rfq-request-for-quote-messages) * [Overview](https://docs.kalshi.com/fix/rfq-messages#overview) * [Message Flow](https://docs.kalshi.com/fix/rfq-messages#message-flow) * [QuoteRequest (35=R)](https://docs.kalshi.com/fix/rfq-messages#quoterequest-35%3Dr) * [Quote (35=S)](https://docs.kalshi.com/fix/rfq-messages#quote-35%3Ds) * [QuoteStatusReport (35=AI)](https://docs.kalshi.com/fix/rfq-messages#quotestatusreport-35%3Dai) * [Quote Status Values (297)](https://docs.kalshi.com/fix/rfq-messages#quote-status-values-297) * [QuoteCancel (35=Z)](https://docs.kalshi.com/fix/rfq-messages#quotecancel-35%3Dz) * [QuoteCancelStatus (35=U9)](https://docs.kalshi.com/fix/rfq-messages#quotecancelstatus-35%3Du9) * [QuoteConfirm (35=U7)](https://docs.kalshi.com/fix/rfq-messages#quoteconfirm-35%3Du7) * [QuoteConfirmStatus (35=U8)](https://docs.kalshi.com/fix/rfq-messages#quoteconfirmstatus-35%3Du8) * [QuoteRequestReject (35=AG)](https://docs.kalshi.com/fix/rfq-messages#quoterequestreject-35%3Dag) * [Best Practices](https://docs.kalshi.com/fix/rfq-messages#best-practices) * [For Market Makers](https://docs.kalshi.com/fix/rfq-messages#for-market-makers) * [Error Handling](https://docs.kalshi.com/fix/rfq-messages#error-handling) * [Example Workflow](https://docs.kalshi.com/fix/rfq-messages#example-workflow) * [Integration Notes](https://docs.kalshi.com/fix/rfq-messages#integration-notes) [​](https://docs.kalshi.com/fix/rfq-messages#rfq-request-for-quote-messages) RFQ (Request for Quote) Messages ================================================================================================================ [​](https://docs.kalshi.com/fix/rfq-messages#overview) Overview ------------------------------------------------------------------ The RFQ session allows market makers to respond to quote requests from users. The workflow involves: 1. Exchange sends QuoteRequest to market makers 2. Market makers respond with Quote 3. Requester can accept the quote 4. Market maker confirms execution RFQ sessions use the KalshiRFQ endpoint with retransmission support. [​](https://docs.kalshi.com/fix/rfq-messages#message-flow) Message Flow -------------------------------------------------------------------------- [​](https://docs.kalshi.com/fix/rfq-messages#quoterequest-35=r) QuoteRequest (35=R) -------------------------------------------------------------------------------------- This message is sent by Kalshi Exchange back to clients to inform of new quote requests. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 131 | QuoteReqId | UUID | Y | Unique quote request ID | | 146 | NoRelatedSym | Integer | Y | Number of symbols. Currently, only 1 is supported. | | 38 | OrderQty | Integer | Y | Number of contracts | | 152 | CashOrderQty | Decimal | N | Target cost of the quote in dollars. | | 55 | Symbol | String | Y | Market ticker | | 453 | NoPartyIDs | Integer | N | Number of parties. Currently, only 1 is supported. | | 448 | PartyId | UUID | N | Pseudonymous identifier for requester | | 20180 | MultivariateCollectionTicker | String | N | Collection ticker for multivariate markets | | 20181 | NoMultivariateSelectedLegs | Integer | N | Number of selected legs for multivariate markets. Repeating group containing the following 3 fields. | | 20182 | MultivariateSelectedEventTicker | String | N | Event ticker for the selected leg | | 20183 | MultivariateSelectedMarketTicker | String | N | Market ticker for the selected leg | | 20184 | MultivariateSelectedMarketSide | String | N | Side for the selected leg (“yes” or “no”) | [​](https://docs.kalshi.com/fix/rfq-messages#quote-35=s) Quote (35=S) ------------------------------------------------------------------------ Used to submit a quote in response to a quote request. If a new Quote is created when an existing quote for the same market already exists for the user, the exchange will cancel the existing quote. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 117 | QuoteId | UUID | Y | Unique quote identifier | | 131 | QuoteReqId | UUID | Y | Quote request for which the quote is in response to. | | 55 | Symbol | String | Y | Market ticker | | 132 | BidPx | Integer | Y | Yes price in cents. Only integer part considered (1-99) | | 133 | OfferPx | Integer | Y | No price in cents. Only integer part considered (1-99) | | 79 | AllocAccount | Integer | N | Subaccount number (0-32). If provided, the quote will be created for the specified subaccount. | Either BidPx or OfferPx can be zero, but not both. Zero indicates no quote for that side. [​](https://docs.kalshi.com/fix/rfq-messages#quotestatusreport-35=ai) QuoteStatusReport (35=AI) -------------------------------------------------------------------------------------------------- A QuoteStatusReport is sent by the exchange: 1. In response to a Quote. Status will be PENDING if processed, or REJECTED if rejected 2. When the requester accepts the quote. Status will be ACCEPTED. Quoter should reply with QuoteConfirm within 30 seconds 3. In response to a QuoteCancel. Status will be CANCELLED | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 117 | QuoteId | String | Y | Quote identifier (empty if rejected) | | 131 | QuoteReqId | String | Y | Request reference | | 79 | AllocAccount | Integer | C | Subaccount number (0-32). Present if the quote was created for a subaccount | | 297 | QuoteStatus | Integer | Y | Current status | | 38 | OrderQty | Integer | C | Number of contracts. Not present if REJECTED | | 132 | BidPx | Integer | C | Yes price in cents. Only integer part considered. Not present if REJECTED | | 133 | OfferPx | Integer | C | No price in cents. Only integer part considered. Not present if REJECTED | | 54 | AcceptedSide | Char | C | Side accepted (1=Yes, 2=No). Only present if ACCEPTED | | 58 | Text | String | C | Rejection reason. Only present if REJECTED | ### [​](https://docs.kalshi.com/fix/rfq-messages#quote-status-values-297) Quote Status Values (297) * **ACCEPTED<0>**: Requester accepted the quote * **REJECTED<5>**: Exchange rejected the quote * **PENDING<10>**: Quote processed, awaiting action * **CANCELLED<17>**: Quote cancelled [​](https://docs.kalshi.com/fix/rfq-messages#quotecancel-35=z) QuoteCancel (35=Z) ------------------------------------------------------------------------------------ Market maker cancels an active quote. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 117 | QuoteId | String | Y | Quote to cancel | Exchange responds with QuoteStatusReport (Status=CANCELLED). [​](https://docs.kalshi.com/fix/rfq-messages#quotecancelstatus-35=u9) QuoteCancelStatus (35=U9) -------------------------------------------------------------------------------------------------- Response to QuoteCancel from exchange. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 117 | QuoteId | String | Y | Quote identifier | | 298 | QuoteCancelStatus | Integer | Y | CANCELED(0) or REJECTED(1) | | 58 | RejectReason | String | C | Present if QuoteCancelStatus is REJECTED | [​](https://docs.kalshi.com/fix/rfq-messages#quoteconfirm-35=u7) QuoteConfirm (35=U7) ---------------------------------------------------------------------------------------- Market maker confirms willingness to execute after quote acceptance. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 117 | QuoteId | String | Y | Accepted quote ID | Quote must be confirmed within 30 seconds of acceptance or it will be voided. [​](https://docs.kalshi.com/fix/rfq-messages#quoteconfirmstatus-35=u8) QuoteConfirmStatus (35=U8) ---------------------------------------------------------------------------------------------------- Exchange response to quote confirmation. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 117 | QuoteId | String | Y | Quote identifier | | 21010 | QuoteConfirmStatus | Integer | Y | ACCEPTED(0) or REJECTED(1) | | 58 | RejectReason | String | C | Present if QuoteConfirmStatus is REJECTED | [​](https://docs.kalshi.com/fix/rfq-messages#quoterequestreject-35=ag) QuoteRequestReject (35=AG) ---------------------------------------------------------------------------------------------------- Exchange notifies that a quote request was cancelled. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 58 | Text | String | Y | Reason the quote has been cancelled | | 131 | QuoteReqId | String | Y | Request identifier | | 658 | QuoteRequestRejectReason | Integer | Y | OTHER(99) | Market makers do not send QuoteRequestReject when ignoring a request. [​](https://docs.kalshi.com/fix/rfq-messages#best-practices) Best Practices ------------------------------------------------------------------------------ ### [​](https://docs.kalshi.com/fix/rfq-messages#for-market-makers) For Market Makers 1. **Response Time** * Respond to quote requests promptly * Confirm accepted quotes within 30 seconds * Cancel stale quotes proactively 2. **Quote Management** * Track active quotes locally * Handle quote replacements properly * Monitor for acceptance notifications 3. **Risk Management** * Validate prices before quoting * Implement position limits * Handle partial quotes (one-sided) ### [​](https://docs.kalshi.com/fix/rfq-messages#error-handling) Error Handling 1. **Rejection Scenarios** * Invalid price range * Symbol not found * Technical issues 2. **Timeout Handling** * 30-second confirmation window * Automatic quote expiration * Network disconnection recovery [​](https://docs.kalshi.com/fix/rfq-messages#example-workflow) Example Workflow ---------------------------------------------------------------------------------- QuoteRequest from Exchange Quote Response Quote Accepted Quote Confirmation Report incorrect code Copy Ask AI 8=FIXT.1.1|35=R|131=req-123|146=1|38=100|55=HIGHNY-23DEC31|453=1|448=anon-456| [​](https://docs.kalshi.com/fix/rfq-messages#integration-notes) Integration Notes ------------------------------------------------------------------------------------ * RFQ session requires separate connection * Uses KalshiRFQ endpoint * Independent of order entry session [Order Group Messages](https://docs.kalshi.com/fix/order-groups) [Drop Copy Session](https://docs.kalshi.com/fix/drop-copy) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Making Your First Request - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/making_your_first_request#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Making Your First Request [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) To make your request we recommend testing a public endpoint like [GetMarkets](https://docs.kalshi.com/api-reference/market/get-markets) . As you explore our other endpoints, you’ll notice some endpoints return an authentication\_error. If you want to experiment with these endpoints, you will need to get [API Keys](https://docs.kalshi.com/getting_started/api_keys) . You may also want to sign up for a demo account to test without real funds. The following resources might help you on your journey to exploring Kalshi’s markets: * [**Quick Start: Market Data (No SDK)**](https://docs.kalshi.com/getting_started/quick_start_market_data) * [**Quick Start: Authenticated Requests (No SDK)**](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests) * [**Discord**](https://discord.gg/kalshi) and check out #dev and #support [Test In The Demo Environment](https://docs.kalshi.com/getting_started/demo_env) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Order Entry Messages - API Documentation [Skip to main content](https://docs.kalshi.com/fix/order-entry#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Order Entry Messages [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Order Entry Messages](https://docs.kalshi.com/fix/order-entry#order-entry-messages) * [Overview](https://docs.kalshi.com/fix/order-entry#overview) * [New Order Single (35=D)](https://docs.kalshi.com/fix/order-entry#new-order-single-35%3Dd) * [Order Cancel/Replace Request (35=G)](https://docs.kalshi.com/fix/order-entry#order-cancel%2Freplace-request-35%3Dg) * [Supported Modifications](https://docs.kalshi.com/fix/order-entry#supported-modifications) * [Order Cancel Request (35=F)](https://docs.kalshi.com/fix/order-entry#order-cancel-request-35%3Df) * [Execution Report (35=8)](https://docs.kalshi.com/fix/order-entry#execution-report-35%3D8) * [Order Status (39)](https://docs.kalshi.com/fix/order-entry#order-status-39) * [Order Rejection Reasons (103)](https://docs.kalshi.com/fix/order-entry#order-rejection-reasons-103) * [Execution Types (150)](https://docs.kalshi.com/fix/order-entry#execution-types-150) * [Text Field Values (58)](https://docs.kalshi.com/fix/order-entry#text-field-values-58) * [Position and Fee Information](https://docs.kalshi.com/fix/order-entry#position-and-fee-information) * [Collateral Changes](https://docs.kalshi.com/fix/order-entry#collateral-changes) * [Party Information](https://docs.kalshi.com/fix/order-entry#party-information) * [Rejection Reasons (102)](https://docs.kalshi.com/fix/order-entry#rejection-reasons-102) * [Mass Cancel Request (35=q)](https://docs.kalshi.com/fix/order-entry#mass-cancel-request-35%3Dq) * [Mass Cancel Report (35=r)](https://docs.kalshi.com/fix/order-entry#mass-cancel-report-35%3Dr) [​](https://docs.kalshi.com/fix/order-entry#order-entry-messages) Order Entry Messages ========================================================================================= [​](https://docs.kalshi.com/fix/order-entry#overview) Overview ----------------------------------------------------------------- Kalshi treats all orders as bids or asks for Yes contracts. Selling Yes is equivalent to buying No contracts. [​](https://docs.kalshi.com/fix/order-entry#new-order-single-35=d) New Order Single (35=D) --------------------------------------------------------------------------------------------- Used to submit a new order to the Exchange. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 11 | ClOrderID | String | Y | Client order identifier for idempotency. Must not match any open orders.

**UUID format is preferred.**

Validation:
• Maximum 64 characters
• Only alphanumeric, ”+”, ”=”, ”\_”, ”-”, and ”:” characters allowed
• Pattern: `^[\-\w:+=/]*$` | | 18 | ExecInst | Char | N | Execution instruction flags.

Supported values:
6 = Post Only | | 38 | OrderQty | Integer | Y | Number of contracts to trade. | | 40 | OrdType | Char | Y | Order type.

Supported values:
2 = Limit | | 44 | Price | Integer | Y | Price per contract in cents (1-99). | | 54 | Side | Char | Y | Side of the order.

Supported values:
1 = Buy (Yes contracts)
2 = Sell (No contracts) | | 55 | Symbol | String | Y | Market ticker (e.g., “EURUSD-23JUN2618-B1.087”). | | 59 | TimeInForce | Char | N | Specifies how long the order remains in effect.

Supported values:
0 = Day (expires at 11:59:59.999pm ET)
1 = Good Till Cancel (GTC)
3 = Immediate Or Cancel (IOC)
4 = Fill Or Kill (FOK)
6 = Good Till Date (GTD)

**Note:** Day orders expire at 11:59:59.999pm ET. For GTD orders, any date in the past is treated as Immediate Or Cancel. | | 126 | ExpireTime | UTCTimestamp | C | Required when TimeInForce=GTD. Specifies when the GTD order expires. | | 448 | PartyID | UUID | N | **Only applicable for FCM entities .** Sub-account identifier. | | 452 | PartyRole | Integer | N | **Only applicable for FCM entities .** Party role.

Supported values:
24 = Customer Account | | 453 | NoPartyIDs | Integer | N | **Only applicable for FCM entities .** Number of parties. Currently, only 1 is supported. | | 79 | AllocAccount | Integer | N | Subaccount number (0-32). Alternative to NoPartyIDs for specifying a subaccount. | | 526 | SecondaryClOrdID | UUID | N | Order group identifier. Please refer to the Order Groups tab for more information. | | 2964 | SelfTradePreventionType | Char | N | Self-trade prevention mode. If unset, defaults to Taker At Cross.

Supported values:
1 = Taker At Cross
2 = Maker | | 21006 | CancelOrderOnPause | Boolean | N | If this flag is set to true, the order will be canceled if the order is open and trading on the exchange is paused for any reason. | | 21009 | MaxExecutionCost | Decimal | N | Optional value representing max execution cost for an order in dollars. Order is canceled if unable to fill OrdQty for the given cost. | Example New Order Report incorrect code Copy Ask AI 8=FIXT.1.1|9=200|35=D|34=5|52=20230809-12:34:56.789|49=your-api-key|56=KalshiNR| 11=550e8400-e29b-41d4-a716-446655440000|38=10|40=2|54=1|55=HIGHNY-23DEC31|44=75| 59=1|10=123| [​](https://docs.kalshi.com/fix/order-entry#order-cancel/replace-request-35=g) Order Cancel/Replace Request (35=G) --------------------------------------------------------------------------------------------------------------------- Used to modify an existing order without canceling it. ### [​](https://docs.kalshi.com/fix/order-entry#supported-modifications) Supported Modifications * **OrderQty**: Increases or decreases the quantity of your order, note that increasing the quantity for the same point means forfeiting your queue position * **Price**: Changes the limit price of your order | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 11 | ClOrderID | String | Y | Unique modification request identifier. Must not match any existing ClOrderID.

**UUID format is preferred.**

Validation:
• Maximum 64 characters
• Only alphanumeric, ”+”, ”=”, ”\_”, ”-”, and ”:” characters allowed
• Pattern: `^[\-\w:+=/]*$` | | 37 | OrderID | String | N | Order identifier provided by Kalshi Exchange. | | 38 | OrderQty | Integer | Y | New total quantity for the order.

**Note:** If OrderQty equals filled quantity, the order will be canceled. If less than filled quantity, the request will be rejected. | | 40 | OrdType | Char | Y | Order type.

Supported values:
2 = Limit | | 41 | OrigClOrdID | String | Y | ClOrderID of the order to modify. | | 44 | Price | Integer | N | New price per contract in cents (1-99). Required if changing price. | | 54 | Side | Char | Y | Must match the original order side. | | 55 | Symbol | String | Y | Must match the original order symbol. | | 448 | PartyID | UUID | N | **Only applicable for FCM entities .** Sub-account identifier. Must match the original order field value. | | 452 | PartyRole | Integer | N | **Only applicable for FCM entities .** Party role. Must match the original order field value.

Supported values:
24 = Customer Account | | 453 | NoPartyIDs | Integer | N | **Only applicable for FCM entities .** Number of parties. Must match the original order field value. Currently, only 1 is supported. | | 79 | AllocAccount | Integer | N | Subaccount number (0-32). Must match the original order. Alternative to NoPartyIDs for specifying a subaccount. | [​](https://docs.kalshi.com/fix/order-entry#order-cancel-request-35=f) Order Cancel Request (35=F) ----------------------------------------------------------------------------------------------------- Cancel all remaining quantity of an existing order. | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 11 | ClOrderID | String | Y | Unique cancel request identifier. Must not match any existing ClOrderID.

**UUID format is preferred.**

Validation:
• Maximum 64 characters
• Only alphanumeric, ”+”, ”=”, ”\_”, ”-”, and ”:” characters allowed
• Pattern: `^[\-\w:+=/]*$` | | 37 | OrderID | String | N | Order identifier provided by Kalshi Exchange. | | 41 | OrigClOrdID | String | Y | ClOrderID of the order to cancel. | | 54 | Side | Char | Y | Must match the original order side. | | 55 | Symbol | String | Y | Must match the original order symbol. | | 448 | PartyID | UUID | N | **Only applicable for FCM entities .** Sub-account identifier. Must match the original order field value. | | 452 | PartyRole | Integer | N | **Only applicable for FCM entities .** Party role. Must match the original order field value.

Supported values:
24 = Customer Account | | 453 | NoPartyIDs | Integer | N | **Only applicable for FCM entities .** Number of parties. Must match the original order field value. Currently, only 1 is supported. | | 79 | AllocAccount | Integer | N | Subaccount number (0-32). Must match the original order. Alternative to NoPartyIDs for specifying a subaccount. | [​](https://docs.kalshi.com/fix/order-entry#execution-report-35=8) Execution Report (35=8) --------------------------------------------------------------------------------------------- This message is sent by Kalshi Exchange back to clients to reflect changes to an order’s state (accepted, replaced, partially filled, filled or canceled). | Tag | Name | Type | Required | Description | | --- | --- | --- | --- | --- | | 6 | AvgPx | Decimal | Y | Calculated average price of all fills on this order. | | 11 | ClOrderID | String | Y | ClOrderID provided by the initiator on the last message that made any change to the order. | | 14 | CumQty | Integer | Y | Total number of contracts filled in this order so far. | | 17 | ExecID | String | Y | Unique sequenced identifier for this report message.

**Format:** `integer;integer` pattern (e.g., “4;4”, “4;7”, “7;3”)

Monotonically increasing at the Exchange level. Returns “-1;-1” for PENDING execution reports. | | 31 | LastPx | Integer | C | Price of this (last) fill in cents. Present only for trade execution reports. | | 32 | LastQty | Integer | C | Number of contracts bought or sold in this fill. Present only for trade execution reports. | | 37 | OrderID | String | Y | Unique identifier for the order in the Kalshi Exchange. Use this ID when referencing the order for support. | | 38 | OrderQty | Integer | Y | Total number of contracts currently in the order. OrderQty = CumQty + LeavesQty. | | 39 | OrdStatus | Char | Y | Current status of the order after this event. See Order Status values below. | | 41 | OrigClOrdID | String | C | ClOrderID of the previous non-rejected order state. Present for Replaced/Canceled orders. | | 44 | Price | Integer | C | Price per contract in cents. | | 54 | Side | Char | Y | Side of the original order.

Values:
1 = Buy (Yes contracts)
2 = Sell (No contracts) | | 55 | Symbol | String | Y | Market ticker for the order. | | 58 | Text | String | N | Human-readable description of the execution report result. | | 60 | TransactTime | UTCTimestamp | Y | Timestamp for the event that triggered this execution report. | | 103 | OrdRejReason | Integer | C | Rejection reason. Present only when ExecType = Rejected. See Order Rejection Reasons below. | | 126 | ExpireTime | UTCTimestamp | C | Order expiration timestamp. Returns 11:59pm ET for Day orders. | | 150 | ExecType | Char | Y | Reason why this execution report was sent. See Execution Types below. | | 151 | LeavesQty | Integer | Y | Remaining quantity open for further execution on this order. | | 448 | PartyID | UUID | N | **Only applicable for FCM entities .** Sub-account identifier. | | 452 | PartyRole | Integer | N | **Only applicable for FCM entities .** Party role.

Supported values:
24 = Customer Account | | 453 | NoPartyIDs | Integer | N | **Only applicable for FCM entities .** Number of parties. Currently, only 1 is supported. | | 79 | AllocAccount | Integer | C | Subaccount number (0-32). Present if the order was placed for a subaccount. | ### [​](https://docs.kalshi.com/fix/order-entry#order-status-39) Order Status (39) * **New<0>**: Active order, no fills * **Partially Filled<1>**: Some quantity filled * **Filled<2>**: Completely filled * **Canceled<4>**: Canceled (may have partial fills) * **Pending Cancel<6>**: Cancel pending * **Rejected<8>**: Order rejected * **Pending New**: Order pending acceptance * **Expired**: Time in force expired * **Pending Replace**: Modification pending By default, expiry-style system cancellations are reported as **Canceled<4>**. If Logon tag **21012 (UseExpiredOrdStatus)=Y**, expiry-style system cancellations (CloseCancel and OrderExpiryCancel) are reported as **Expired**. ### [​](https://docs.kalshi.com/fix/order-entry#order-rejection-reasons-103) Order Rejection Reasons (103) * **Unknown symbol<1>** * **Exchange closed<2>** * **Order exceeds limit<3>** * **Too late to enter<4>** * **Duplicate order<6>** * **Unsupported order characteristic<11>** * **Unknown account<15>** * **Other<99>** ### [​](https://docs.kalshi.com/fix/order-entry#execution-types-150) Execution Types (150) * **New<0>**: Order accepted * **Trade**: Order filled (partial or complete) * **Canceled<4>**: Order canceled * **Replaced<5>**: Order modified * **Rejected<8>**: Order rejected * **Expired**: Order expired * **Pending New**: Order pending acceptance * **Pending Cancel<6>**: Cancel pending * **Pending Replace**: Modification pending With default settings, expiry-style system cancellations emit **Canceled<4>**. If Logon tag **21012 (UseExpiredOrdStatus)=Y**, expiry-style system cancellations (CloseCancel and OrderExpiryCancel) emit **Expired**. ### [​](https://docs.kalshi.com/fix/order-entry#text-field-values-58) Text Field Values (58) Common values for the Text field in Execution Reports: * **EXCHANGE\_UNAVAILABLE** - Catch-all for Exchange outage or unmapped errors, maps to OrdRejReason “Other” * **MARKET\_ALREADY\_CLOSED** - maps to OrdRejReason “Exchange closed” * **MARKET\_INACTIVE** - maps to OrdRejReason “Exchange closed” * **MARKET\_NOT\_FOUND** - maps to OrdRejReason “Unknown symbol” * **SELF\_CROSS\_ATTEMPT** - maps to ExecutionType “Canceled” * **SELF\_CROSS\_ATTEMPT\_PARTIALLY\_FILLED** - maps to ExecutionType “Canceled” * **ORDER\_ALREADY\_EXISTS** - maps to OrdRejReason “Duplicate order” * **INVALID\_AMEND\_QTY\_FOR\_ORDER** - maps to OrdRejReason “Other” * **CANNOT\_UPDATE\_FILLED\_ORDER** - maps to OrdRejReason “Too late to enter” * **EXCEEDED\_ORDER\_GROUP\_RISK\_LIMIT** - maps to OrdRejReason “Order exceeds limit” * **INSUFFICIENT\_BALANCE** - maps to OrdRejReason “Other” * **EXCHANGE\_PAUSED** - maps to OrdRejReason “Exchange closed” * **TRADING\_PAUSED** - maps to OrdRejReason “Exchange closed” * **INVALID\_ORDER** - maps to OrdRejReason “Unsupported order characteristic” * **ORDER\_GROUP\_NOT\_FOUND** - maps to OrdRejReason “Unsupported order characteristic” * **EXCEEDED\_PER\_MARKET\_RISK\_LIMIT** - maps to OrdRejReason “Order exceeds limit” * **EXCEEDED\_SELL\_POSITION\_FLOOR** - maps to OrdRejReason “Order exceeds limit” * **NOT\_FOUND** - maps to OrdRejReason “Unknown symbol” * **CUSTOMER\_ACCOUNT\_NOT\_FOUND** - maps to OrdRejReason “Unknown account” * **PERMISSION\_DENIED\_FOR\_CUSTOMER\_ACCOUNT** - maps to OrdRejReason “Unknown account” * **FOK\_INSUFFICIENT\_VOLUME** - maps to ExecutionType “Canceled” * **POST\_ONLY\_CROSS** - maps to OrdRejReason “Other” * **ORDER\_GROUP\_CANCEL** - maps to ExecutionType “Canceled” * **TAKER\_CANCEL\_FOR\_SELF\_TRADE\_PREVENTION** - maps to ExecutionType “Canceled” * **MAKER\_CANCEL\_FOR\_SELF\_TRADE\_PREVENTION** - maps to ExecutionType “Canceled” * **IMMEDIATE\_OR\_CANCELLED** - maps to ExecutionType “Canceled” ### [​](https://docs.kalshi.com/fix/order-entry#position-and-fee-information) Position and Fee Information When ExecType=Trade: | Tag | Name | Description | | --- | --- | --- | | 704 | LongQty | Net Yes position after trade | | 705 | ShortQty | Net No position after trade | | 136 | NoMiscFees | Number of fees | | 137 | MiscFeeAmt | Total fees in dollars | | 138 | MiscFeeCurr | Currency (USD) | | 139 | MiscFeeType | Exchange Fees<4> | | 891 | MiscFeeBasis | Fee unit (always ABSOLUTE<0>) | | 880 | TrdMatchID | Unique trade identifier | | 1057 | AggressorIndicator | Taker/Maker flag | ### [​](https://docs.kalshi.com/fix/order-entry#collateral-changes) Collateral Changes | Tag | Name | Description | | --- | --- | --- | | 1703 | NoCollateralAmounts | Number of collateral changes | | 1704 | CurrentCollateralAmount | Delta in dollars | | 1705 | CollateralType | BALANCE or PAYOUT | ### [​](https://docs.kalshi.com/fix/order-entry#party-information) Party Information Party fields from the original order request are echoed back in ExecutionReports: | Tag | Name | Description | | --- | --- | --- | | 453 | NoPartyIDs | Number of parties (for sub-accounts) | | 448 | PartyID | Sub-account identifier | | 452 | PartyRole | Customer Account<24> | | 79 | AllocAccount | Subaccount number (0-32) | Party and AllocAccount fields are only included when the order is placed under a sub-account. These fields help track orders across different sub-accounts or FCM clients. ### [​](https://docs.kalshi.com/fix/order-entry#rejection-reasons-102) Rejection Reasons (102) * **Too late to cancel<0>**: Order already filled * **Unknown order<1>**: Order not found * **Other<99>**: See Text field [​](https://docs.kalshi.com/fix/order-entry#mass-cancel-request-35=q) Mass Cancel Request (35=q) --------------------------------------------------------------------------------------------------- Cancel all orders for the trading session. | Tag | Name | Description | | --- | --- | --- | | 11 | ClOrderID | Unique request ID | | 530 | MassCancelRequestType | Cancel for session<6> | [​](https://docs.kalshi.com/fix/order-entry#mass-cancel-report-35=r) Mass Cancel Report (35=r) ------------------------------------------------------------------------------------------------- Response to mass cancel request. | Tag | Name | Description | | --- | --- | --- | | 11 | ClOrderID | Request ID | | 37 | OrderID | Operation ID | | 531 | MassCancelResponse | Success<6> or Rejected<0> | | 532 | MassCancelRejectReason | If rejected | Individual ExecutionReports will follow for each canceled order. [Session Management](https://docs.kalshi.com/fix/session-management) [Order Group Messages](https://docs.kalshi.com/fix/order-groups) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Error Handling - API Documentation [Skip to main content](https://docs.kalshi.com/fix/error-handling#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Error Handling [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Error Handling](https://docs.kalshi.com/fix/error-handling#error-handling) * [Overview](https://docs.kalshi.com/fix/error-handling#overview) * [Error Message Types](https://docs.kalshi.com/fix/error-handling#error-message-types) * [Reject (35=3)](https://docs.kalshi.com/fix/error-handling#reject-35%3D3) * [Session Reject Reasons (373)](https://docs.kalshi.com/fix/error-handling#session-reject-reasons-373) * [BusinessMessageReject (35=j)](https://docs.kalshi.com/fix/error-handling#businessmessagereject-35%3Dj) * [Business Reject Reasons (380)](https://docs.kalshi.com/fix/error-handling#business-reject-reasons-380) * [Order-Specific Rejections](https://docs.kalshi.com/fix/error-handling#order-specific-rejections) * [Order Reject Reasons (103)](https://docs.kalshi.com/fix/error-handling#order-reject-reasons-103) * [Cancel Reject Reasons (102)](https://docs.kalshi.com/fix/error-handling#cancel-reject-reasons-102) * [Common Error Scenarios](https://docs.kalshi.com/fix/error-handling#common-error-scenarios) * [Example 1: Invalid Tag](https://docs.kalshi.com/fix/error-handling#example-1-invalid-tag) * [Example 2: Business Logic Error](https://docs.kalshi.com/fix/error-handling#example-2-business-logic-error) * [Example 3: Order Rejection](https://docs.kalshi.com/fix/error-handling#example-3-order-rejection) * [Error Handling Best Practices](https://docs.kalshi.com/fix/error-handling#error-handling-best-practices) * [1\. Comprehensive Logging](https://docs.kalshi.com/fix/error-handling#1-comprehensive-logging) * [2\. Retry Strategies](https://docs.kalshi.com/fix/error-handling#2-retry-strategies) * [3\. Graceful Degradation](https://docs.kalshi.com/fix/error-handling#3-graceful-degradation) * [Specific Error Conditions](https://docs.kalshi.com/fix/error-handling#specific-error-conditions) * [Authentication Errors](https://docs.kalshi.com/fix/error-handling#authentication-errors) * [Order Entry Errors](https://docs.kalshi.com/fix/error-handling#order-entry-errors) * [Connection Errors](https://docs.kalshi.com/fix/error-handling#connection-errors) * [Error Response Patterns](https://docs.kalshi.com/fix/error-handling#error-response-patterns) * [Synchronous Errors](https://docs.kalshi.com/fix/error-handling#synchronous-errors) * [Asynchronous Errors](https://docs.kalshi.com/fix/error-handling#asynchronous-errors) [​](https://docs.kalshi.com/fix/error-handling#error-handling) Error Handling ================================================================================ [​](https://docs.kalshi.com/fix/error-handling#overview) Overview -------------------------------------------------------------------- Kalshi FIX API uses standard FIX error messages with additional detail in the Text field. Errors fall into two categories: * **Session-level errors**: Protocol violations, handled with Reject (35=3) * **Business-level errors**: Application logic issues, handled with BusinessMessageReject (35=j) or specific rejection messages [​](https://docs.kalshi.com/fix/error-handling#error-message-types) Error Message Types ------------------------------------------------------------------------------------------ ### [​](https://docs.kalshi.com/fix/error-handling#reject-35=3) Reject (35=3) Used for session-level protocol violations. | Tag | Name | Description | Required | | --- | --- | --- | --- | | 45 | RefSeqNum | Sequence number of rejected message | Yes | | 58 | Text | Human-readable error description | No | | 371 | RefTagID | Tag that caused the rejection | No | | 372 | RefMsgType | Message type being rejected | No | | 373 | SessionRejectReason | Rejection reason code | No | #### [​](https://docs.kalshi.com/fix/error-handling#session-reject-reasons-373) Session Reject Reasons (373) | Code | Reason | Description | | --- | --- | --- | | 0 | Invalid tag number | Unknown tag in message | | 1 | Required tag missing | Mandatory field not present | | 2 | Tag not defined for message | Tag not valid for this message type | | 3 | Undefined tag | Tag number not in FIX specification | | 4 | Tag without value | Empty tag value | | 5 | Incorrect value | Invalid value for tag | | 6 | Incorrect data format | Wrong data type | | 7 | Decryption problem | Security issue | | 8 | Signature problem | Authentication failure | | 9 | CompID problem | SenderCompID/TargetCompID issue | | 10 | SendingTime accuracy | Time outside acceptable window | | 11 | Invalid MsgType | Unknown message type | ### [​](https://docs.kalshi.com/fix/error-handling#businessmessagereject-35=j) BusinessMessageReject (35=j) Used for application-level business logic errors. | Tag | Name | Description | Required | | --- | --- | --- | --- | | 45 | RefSeqNum | Sequence number of rejected message | Yes | | 58 | Text | Human-readable error description | No | | 371 | RefTagID | Tag that caused the rejection | No | | 372 | RefMsgType | Message type being rejected | No | | 379 | BusinessRejectRefID | Business ID from rejected message | No | | 380 | BusinessRejectReason | Business rejection reason code | Yes | #### [​](https://docs.kalshi.com/fix/error-handling#business-reject-reasons-380) Business Reject Reasons (380) | Code | Reason | Description | | --- | --- | --- | | 0 | Other | See Text field for details | | 1 | Unknown ID | Referenced ID not found | | 2 | Unknown Security | Invalid symbol | | 3 | Unsupported Message Type | Message type not implemented | | 4 | Application not available | System temporarily unavailable | | 5 | Conditionally required field missing | Context-specific field missing | [​](https://docs.kalshi.com/fix/error-handling#order-specific-rejections) Order-Specific Rejections ------------------------------------------------------------------------------------------------------ ### [​](https://docs.kalshi.com/fix/error-handling#order-reject-reasons-103) Order Reject Reasons (103) In ExecutionReport (35=8) with ExecType=Rejected: | Code | Reason | Common Causes | | --- | --- | --- | | 1 | Unknown symbol | Invalid market ticker | | 2 | Exchange closed | Outside trading hours | | 3 | Order exceeds limit | Position or order size limit, insufficient balance | | 4 | Too late to enter | Market expired/closed | | 6 | Duplicate order | ClOrdID already used | | 11 | Unsupported order characteristic | Invalid order parameters, order ID/side/ticker mismatch on amend | | 13 | Incorrect quantity | Invalid order size | | 99 | Other | See Text field | ### [​](https://docs.kalshi.com/fix/error-handling#cancel-reject-reasons-102) Cancel Reject Reasons (102) In OrderCancelReject (35=9): | Code | Reason | Description | | --- | --- | --- | | 0 | Too late to cancel | Order already filled | | 1 | Unknown order | Order ID not found, order ID/side/ticker mismatch | | 99 | Other | See Text field | [​](https://docs.kalshi.com/fix/error-handling#common-error-scenarios) Common Error Scenarios ------------------------------------------------------------------------------------------------ ### [​](https://docs.kalshi.com/fix/error-handling#example-1-invalid-tag) Example 1: Invalid Tag **Scenario**: Undefined tag in NewOrderSingle Report incorrect code Copy Ask AI // Sent 8=FIXT.1.1|35=D|11=123|38=10|333333=test|... // Response: Reject 8=FIXT.1.1|35=3|45=5|58=Undefined tag received|371=333333|372=D|373=3| ### [​](https://docs.kalshi.com/fix/error-handling#example-2-business-logic-error) Example 2: Business Logic Error **Scenario**: Trading during maintenance Report incorrect code Copy Ask AI // Sent 8=FIXT.1.1|35=D|11=456|38=10|55=HIGHNY-23DEC31|... // Response: BusinessMessageReject 8=FIXT.1.1|35=j|45=10|58=Kalshi exchange unavailable|372=D|380=4| ### [​](https://docs.kalshi.com/fix/error-handling#example-3-order-rejection) Example 3: Order Rejection **Scenario**: Insufficient funds Report incorrect code Copy Ask AI // Response: ExecutionReport 8=FIXT.1.1|35=8|11=789|150=8|39=8|58=Insufficient funds|103=99|... [​](https://docs.kalshi.com/fix/error-handling#error-handling-best-practices) Error Handling Best Practices -------------------------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/error-handling#1-comprehensive-logging) 1\. Comprehensive Logging Report incorrect code Copy Ask AI def handle_message(msg): if msg.type == 'Reject': log.error(f"Session reject: {msg.Text} (Tag: {msg.RefTagID}, Reason: {msg.SessionRejectReason})") elif msg.type == 'BusinessMessageReject': log.error(f"Business reject: {msg.Text} (Reason: {msg.BusinessRejectReason})") elif msg.type == 'ExecutionReport' and msg.ExecType == 'Rejected': log.error(f"Order rejected: {msg.Text} (Reason: {msg.OrdRejReason})") ### [​](https://docs.kalshi.com/fix/error-handling#2-retry-strategies) 2\. Retry Strategies | Error Type | Retry Strategy | | --- | --- | | Session errors | Fix protocol issue before retry | | Rate limit | Exponential backoff | | Exchange closed | Wait for market open | | Insufficient funds | Check balance before retry | | Unknown symbol | Verify symbol, don’t retry | ### [​](https://docs.kalshi.com/fix/error-handling#3-graceful-degradation) 3\. Graceful Degradation 1 [](https://docs.kalshi.com/fix/error-handling#) Identify Error Type Distinguish between recoverable and non-recoverable errors 2 [](https://docs.kalshi.com/fix/error-handling#) Apply Appropriate Action * Recoverable: Implement retry with backoff * Non-recoverable: Alert and halt 3 [](https://docs.kalshi.com/fix/error-handling#) Monitor and Alert Track error rates and patterns for system health [​](https://docs.kalshi.com/fix/error-handling#specific-error-conditions) Specific Error Conditions ------------------------------------------------------------------------------------------------------ ### [​](https://docs.kalshi.com/fix/error-handling#authentication-errors) Authentication Errors | Symptom | Likely Cause | Resolution | | --- | --- | --- | | Logon rejected | Invalid signature | Check RSA key and signature algorithm | | CompID problem | Wrong API key | Verify SenderCompID matches API key | | Time accuracy | Clock skew | Sync system time with NTP | ### [​](https://docs.kalshi.com/fix/error-handling#order-entry-errors) Order Entry Errors | Error | Check | Action | | --- | --- | --- | | Unknown symbol | Symbol format | Use exact ticker from market data | | Order exceeds limit | Position limits | Query current position | | Duplicate ClOrdID | ID generation | Ensure UUID uniqueness | | Invalid price | Price range | Ensure (0, 100) cents with valid tick interval | ### [​](https://docs.kalshi.com/fix/error-handling#connection-errors) Connection Errors Connection errors often manifest as: * Heartbeat timeout * Sequence number gaps * Socket disconnection Always implement reconnection logic with appropriate delays. [​](https://docs.kalshi.com/fix/error-handling#error-response-patterns) Error Response Patterns -------------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/error-handling#synchronous-errors) Synchronous Errors Immediate response to invalid request: Report incorrect code Copy Ask AI Request → Validation → Immediate Error Response ### [​](https://docs.kalshi.com/fix/error-handling#asynchronous-errors) Asynchronous Errors Delayed errors during processing: Report incorrect code Copy Ask AI Request → Initial Accept → Processing → Later Error Report [Market Settlement](https://docs.kalshi.com/fix/market-settlement) [Subpenny Pricing](https://docs.kalshi.com/fix/subpenny-pricing) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Session Management - API Documentation [Skip to main content](https://docs.kalshi.com/fix/session-management#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Session Management [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Session Management](https://docs.kalshi.com/fix/session-management#session-management) * [Creating FIX API Keys](https://docs.kalshi.com/fix/session-management#creating-fix-api-keys) * [Generate RSA Key Pair](https://docs.kalshi.com/fix/session-management#generate-rsa-key-pair) * [Create API Key](https://docs.kalshi.com/fix/session-management#create-api-key) * [Logon Process](https://docs.kalshi.com/fix/session-management#logon-process) * [Logon Message (35=A)](https://docs.kalshi.com/fix/session-management#logon-message-35%3Da) * [Required Fields](https://docs.kalshi.com/fix/session-management#required-fields) * [Optional Fields](https://docs.kalshi.com/fix/session-management#optional-fields) * [Signature Generation](https://docs.kalshi.com/fix/session-management#signature-generation) * [Session Maintenance](https://docs.kalshi.com/fix/session-management#session-maintenance) * [Heartbeat Protocol](https://docs.kalshi.com/fix/session-management#heartbeat-protocol) * [Message Sequence Numbers](https://docs.kalshi.com/fix/session-management#message-sequence-numbers) * [Sequence Number Rules](https://docs.kalshi.com/fix/session-management#sequence-number-rules) * [Reconnection Procedure](https://docs.kalshi.com/fix/session-management#reconnection-procedure) * [ResendRequest (35=2)](https://docs.kalshi.com/fix/session-management#resendrequest-35%3D2) * [Limitations](https://docs.kalshi.com/fix/session-management#limitations) * [Error Handling](https://docs.kalshi.com/fix/session-management#error-handling) * [Reject (35=3)](https://docs.kalshi.com/fix/session-management#reject-35%3D3) * [BusinessMessageReject (35=j)](https://docs.kalshi.com/fix/session-management#businessmessagereject-35%3Dj) * [Session Termination](https://docs.kalshi.com/fix/session-management#session-termination) * [Logout (35=5)](https://docs.kalshi.com/fix/session-management#logout-35%3D5) * [Message Headers](https://docs.kalshi.com/fix/session-management#message-headers) * [Message Trailers](https://docs.kalshi.com/fix/session-management#message-trailers) * [Best Practices](https://docs.kalshi.com/fix/session-management#best-practices) [​](https://docs.kalshi.com/fix/session-management#session-management) Session Management ============================================================================================ [​](https://docs.kalshi.com/fix/session-management#creating-fix-api-keys) Creating FIX API Keys -------------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/session-management#generate-rsa-key-pair) Generate RSA Key Pair First, generate a 2048 bit RSA PKCS#8 key pair: Report incorrect code Copy Ask AI openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out kalshi-fix.key openssl rsa -in kalshi-fix.key -pubout -out kalshi-fix.pub This creates two files: * **kalshi-fix.key**: Your private key (keep secure, never share) * **kalshi-fix.pub**: Your public key (share with Kalshi) ### [​](https://docs.kalshi.com/fix/session-management#create-api-key) Create API Key 1. Navigate to [https://demo.kalshi.co/account/profile](https://demo.kalshi.co/account/profile) 2. Click the “Create key” button 3. Name your API Key 4. Copy and paste the contents of `kalshi-fix.pub` into the “RSA public key” field 5. Click “Create” 6. Copy the generated FIX API Key (UUID format) Store your private key securely. It is equivalent to your username + password and should never be sent to anyone, including Kalshi employees. [​](https://docs.kalshi.com/fix/session-management#logon-process) Logon Process ---------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/session-management#logon-message-35=a) Logon Message (35=A) The initiator must send a Logon message to establish a session. The acceptor will either: * Respond with a Logon message acknowledging successful logon * Respond with a Logout (35=5) message if the logon fails ### [​](https://docs.kalshi.com/fix/session-management#required-fields) Required Fields | Tag | Name | Description | Value | | --- | --- | --- | --- | | 98 | EncryptMethod | Method of encryption | None<0> | | 96 | RawData | Client logon message signature | Base64 encoded signature | | 108 | HeartbeatInt | Heartbeat interval (seconds) | N > 3 | | 1137 | DefaultApplVerID | Default application version | FIX50SP2<9> | ### [​](https://docs.kalshi.com/fix/session-management#optional-fields) Optional Fields | Tag | Name | Description | Default | | --- | --- | --- | --- | | 141 | ResetSeqNumFlag | Reset sequence numbers on logon. **Must be Y for KalshiNR, KalshiDC, KalshiPT.** | N | | 108 | HeartbeatInt | Heartbeat <0> interval (seconds) | 30 | | 8013 | CancelOrdersOnDisconnect | Cancel orders on any disconnection (including graceful logout) | N | | 20126 | ListenerSession | Listen-only session (KalshiNR/RT only, requires SkipPendingExecReports=Y) | N | | 20127 | ReceiveSettlementReports | Receive settlement reports (KalshiRT only) | N | | 20200 | MessageRetentionPeriod | How long session messages will be store for retransmission (KalshiRT and KalshiRFQ only), max of 72. | 24 | | 21011 | SkipPendingExecReports | Skip PENDING\_{NEW\|REPLACE\|CANCEL} execution reports | N | | 21012 | UseExpiredOrdStatus | Emit Expired (150/39) for expiry-style system cancellations (CloseCancel and OrderExpiryCancel) instead of Canceled<4> | N | | 21007 | EnableIocCancelReport | Partially filled IOC orders produce a cancel report | N | | 21008 | PreserveOriginalOrderQty | OrderQty tag 38 always reflects original order quantity across all states | N | ### [​](https://docs.kalshi.com/fix/session-management#signature-generation) Signature Generation The RawData field must contain a PSS RSA signature of the pre-hash string: Report incorrect code Copy Ask AI PreHashString = SendingTime + SOH + MsgType + SOH + MsgSeqNum + SOH + SenderCompID + SOH + TargetCompID **Critical: SendingTime in Signature**The SendingTime in the PreHashString must match **exactly** the value in field 52 of your logon message. * **Using a FIX library:** Most libraries auto-add SendingTime. Use that exact value (don’t manually add a timestamp) when generating the signature. * **Building the message yourself:** Include SendingTime in your message and use that same value in the PreHashString. Format: `YYYYMMDD-HH:MM:SS.mmm` Python Report incorrect code Copy Ask AI from base64 import b64encode from Cryptodome.Signature import pss from Cryptodome.Hash import SHA256 from Cryptodome.PublicKey import RSA # Load private key private_key = RSA.import_key(open('kalshi-fix.key').read().encode('utf-8')) # Build message string # IMPORTANT: Use the EXACT SendingTime that will appear in field 52 # If constructing the message yourself: generate SendingTime and use it here # If using a library: use the SendingTime value that your library will set sending_time = "20230809-05:28:18.035" msg_type = "A" msg_seq_num = "1" sender_comp_id = "your-fix-api-key-uuid" target_comp_id = "Kalshi" # Or appropriate TargetCompID msg_string = chr(1).join([\ sending_time, msg_type, msg_seq_num,\ sender_comp_id, target_comp_id\ ]) # Generate signature msg_hash = SHA256.new(msg_string.encode('utf-8')) signature = pss.new(private_key).sign(msg_hash) raw_data_value = b64encode(signature).decode('utf-8') [​](https://docs.kalshi.com/fix/session-management#session-maintenance) Session Maintenance ---------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/session-management#heartbeat-protocol) Heartbeat Protocol * Default interval: 30 seconds * Both sides must respond to TestRequest messages * Connection terminates if heartbeat response not received within interval ### [​](https://docs.kalshi.com/fix/session-management#message-sequence-numbers) Message Sequence Numbers #### [​](https://docs.kalshi.com/fix/session-management#sequence-number-rules) Sequence Number Rules 1. Must be unique and increase by one for each message 2. Empty MsgSeqNum results in session termination 3. Lower than expected = serious failure, connection terminated 4. Higher than expected = recoverable with ResendRequest (if supported) ### [​](https://docs.kalshi.com/fix/session-management#reconnection-procedure) Reconnection Procedure For unexpected sequence numbers: 1. Document the issue with logs for out-of-band communication 2. Check order status via REST API or UI 3. Establish new session with reset sequence numbers [​](https://docs.kalshi.com/fix/session-management#resendrequest-35=2) ResendRequest (35=2) ---------------------------------------------------------------------------------------------- Only available on Order Entry with Retransmission (KalshiRT) sessions. ### [​](https://docs.kalshi.com/fix/session-management#limitations) Limitations * Lookback window limited to 24 hours (or up to 72 hours if MessageRetentionPeriod was set on Logon request) * If you provide a BeginSeqNo that is beyond the lookback window, you will receive a Reject message | Tag | Name | Description | | --- | --- | --- | | 7 | BeginSeqNo | Lower bound (inclusive) | | 16 | EndSeqNo | Upper bound (inclusive) | [​](https://docs.kalshi.com/fix/session-management#error-handling) Error Handling ------------------------------------------------------------------------------------ ### [​](https://docs.kalshi.com/fix/session-management#reject-35=3) Reject (35=3) Sent when a message cannot be processed due to session-level rule violations. | Tag | Name | Description | Required | | --- | --- | --- | --- | | 45 | RefSeqNum | Sequence number of rejected message | Yes | | 58 | Text | Human-readable error description | No | | 371 | RefTagID | Tag number that caused reject | No | | 372 | RefMsgType | MsgType of referenced message | No | | 373 | SessionRejectReason | Rejection reason code | No | Reject indicates serious errors that may result from faulty logic. Log and investigate these errors. ### [​](https://docs.kalshi.com/fix/session-management#businessmessagereject-35=j) BusinessMessageReject (35=j) Sent for business logic violations rather than session-level errors. | Tag | Name | Description | Required | | --- | --- | --- | --- | | 45 | RefSeqNum | Sequence number of rejected message | Yes | | 58 | Text | Human-readable error description | No | | 371 | RefTagID | Tag number that caused reject | No | | 372 | RefMsgType | MsgType of referenced message | No | | 379 | BusinessRejectRefID | Business-level ID of rejected message | No | | 380 | BusinessRejectReason | Business rejection reason code | Yes | [​](https://docs.kalshi.com/fix/session-management#session-termination) Session Termination ---------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/fix/session-management#logout-35=5) Logout (35=5) Graceful session termination: 1. Initiator sends Logout message 2. Acceptor responds with Logout (empty Text field) 3. Transport layer connection terminated | Tag | Name | Description | | --- | --- | --- | | 58 | Text | Error description (if any) | If `CancelOrdersOnDisconnect=Y`, all orders are canceled even on graceful logout. [​](https://docs.kalshi.com/fix/session-management#message-headers) Message Headers -------------------------------------------------------------------------------------- All messages must include standard FIX headers: | Tag | Name | Description | Requirements | | --- | --- | --- | --- | | 8 | BeginString | Protocol version | FIXT.1.1 (must be first) | | 9 | BodyLength | Message length in bytes | Must be second | | 34 | MsgSeqNum | Message sequence number | Unique, incrementing | | 35 | MsgType | Message type | Must be third | | 52 | SendingTime | UTC timestamp | Within 120 seconds of server time | ### [​](https://docs.kalshi.com/fix/session-management#message-trailers) Message Trailers | Tag | Name | Description | | | --- | --- | --- | --- | | 10 | CheckSum | Standard FIX checksum | Must be last field | CheckSum is calculated by summing ASCII values of all characters (except checksum field) modulo 256. [​](https://docs.kalshi.com/fix/session-management#best-practices) Best Practices ------------------------------------------------------------------------------------ 1. **Session Configuration** * Use unique ClOrdIDs across all message types * Implement proper heartbeat handling * Monitor sequence numbers carefully 2. **Error Recovery** * Implement automatic reconnection logic * Store order state locally for recovery * Use drop copy session for missed messages 3. **Security** * Rotate API keys periodically * Monitor for unauthorized access * Use secure storage for private keys [Connectivity](https://docs.kalshi.com/fix/connectivity) [Order Entry Messages](https://docs.kalshi.com/fix/order-entry) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Quick Start: Authenticated Requests (No SDK) - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Quick Start: Authenticated Requests (No SDK) [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Step 1: Get Your API Keys](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#step-1-get-your-api-keys) * [Step 2: Set Up Your Request](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#step-2-set-up-your-request) * [How to Create the Signature](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#how-to-create-the-signature) * [Step 3: Get Your Balance](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#step-3-get-your-balance) * [Complete Working Example](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#complete-working-example) * [Common Issues](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#common-issues) * [Next Steps](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#next-steps) This guide shows you how to make authenticated requests to the Kalshi API in three simple steps. [​](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#step-1-get-your-api-keys) Step 1: Get Your API Keys ------------------------------------------------------------------------------------------------------------------------------------- 1. Log in to your Kalshi account ([demo](https://demo.kalshi.com/) or [production](https://kalshi.com/) ) 2. Navigate to **Account & security** → **API Keys** 3. Click **Create Key** 4. Save both: * **Private Key**: Downloaded as a `.key` file * **API Key ID**: Displayed on screen (looks like `a952bcbe-ec3b-4b5b-b8f9-11dae589608c`) Your private key cannot be retrieved after this page is closed. Store it securely! [​](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#step-2-set-up-your-request) Step 2: Set Up Your Request ----------------------------------------------------------------------------------------------------------------------------------------- Every authenticated request to Kalshi requires three headers: | Header | Description | Example | | --- | --- | --- | | `KALSHI-ACCESS-KEY` | Your API Key ID | `a952bcbe-ec3b-4b5b-b8f9-11dae589608c` | | `KALSHI-ACCESS-TIMESTAMP` | Current time in milliseconds | `1703123456789` | | `KALSHI-ACCESS-SIGNATURE` | Request signature (see below) | `base64_encoded_signature` | ### [​](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#how-to-create-the-signature) How to Create the Signature The signature proves you own the private key. Here’s how it works: 1. **Create a message string**: Concatenate `timestamp + HTTP_METHOD + path` * Example: `1703123456789GET/trade-api/v2/portfolio/balance` * **Important**: Use the path **without query parameters**. For `/portfolio/orders?limit=5`, sign only `/trade-api/v2/portfolio/orders` 2. **Sign with your private key**: Use RSA-PSS with SHA256 3. **Encode as base64**: Convert the signature to base64 string Here’s the signing process in Python: Report incorrect code Copy Ask AI import base64 from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding def sign_request(private_key, timestamp, method, path): # Strip query parameters from path before signing path_without_query = path.split('?')[0] # Create the message to sign message = f"{timestamp}{method}{path_without_query}".encode('utf-8') # Sign with RSA-PSS signature = private_key.sign( message, padding.PSS( mgf=padding.MGF1(hashes.SHA256()), salt_length=padding.PSS.DIGEST_LENGTH ), hashes.SHA256() ) # Return base64 encoded return base64.b64encode(signature).decode('utf-8') [​](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#step-3-get-your-balance) Step 3: Get Your Balance ----------------------------------------------------------------------------------------------------------------------------------- Now let’s make your first authenticated request to get your account balance: Report incorrect code Copy Ask AI import requests import datetime # Set up the request timestamp = str(int(datetime.datetime.now().timestamp() * 1000)) method = "GET" path = "/trade-api/v2/portfolio/balance" # Create signature (using function from Step 2) signature = sign_request(private_key, timestamp, method, path) # Make the request headers = { 'KALSHI-ACCESS-KEY': 'your-api-key-id', 'KALSHI-ACCESS-SIGNATURE': signature, 'KALSHI-ACCESS-TIMESTAMP': timestamp } response = requests.get('https://demo-api.kalshi.co' + path, headers=headers) balance = response.json() print(f"Your balance: ${balance['balance'] / 100:.2f}") [​](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#complete-working-example) Complete Working Example ------------------------------------------------------------------------------------------------------------------------------------ Here’s the minimal code to get your balance: Report incorrect code Copy Ask AI import requests import datetime import base64 from urllib.parse import urlparse from cryptography.hazmat.primitives import serialization, hashes from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import padding # Configuration API_KEY_ID = 'your-api-key-id-here' PRIVATE_KEY_PATH = 'path/to/your/kalshi-key.key' BASE_URL = 'https://demo-api.kalshi.co/trade-api/v2' # or 'https://api.elections.kalshi.com/trade-api/v2' for production def load_private_key(key_path): with open(key_path, "rb") as f: return serialization.load_pem_private_key(f.read(), password=None, backend=default_backend()) def create_signature(private_key, timestamp, method, path): """Create the request signature.""" # Strip query parameters before signing path_without_query = path.split('?')[0] message = f"{timestamp}{method}{path_without_query}".encode('utf-8') signature = private_key.sign( message, padding.PSS(mgf=padding.MGF1(hashes.SHA256()), salt_length=padding.PSS.DIGEST_LENGTH), hashes.SHA256() ) return base64.b64encode(signature).decode('utf-8') def get(private_key, api_key_id, path, base_url=BASE_URL): """Make an authenticated GET request to the Kalshi API.""" timestamp = str(int(datetime.datetime.now().timestamp() * 1000)) # Signing requires the full URL path from root (e.g. /trade-api/v2/portfolio/balance) sign_path = urlparse(base_url + path).path signature = create_signature(private_key, timestamp, "GET", sign_path) headers = { 'KALSHI-ACCESS-KEY': api_key_id, 'KALSHI-ACCESS-SIGNATURE': signature, 'KALSHI-ACCESS-TIMESTAMP': timestamp } return requests.get(base_url + path, headers=headers) # Load private key private_key = load_private_key(PRIVATE_KEY_PATH) # Get balance response = get(private_key, API_KEY_ID, "/portfolio/balance") print(f"Your balance: ${response.json()['balance'] / 100:.2f}") [​](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#common-issues) Common Issues -------------------------------------------------------------------------------------------------------------- | Problem | Solution | | --- | --- | | 401 Unauthorized | Check your API Key ID and private key file path | | Signature error | Ensure timestamp is in milliseconds (not seconds) | | Path not found | Path includes `/trade-api/v2`, pass only the endpoint path (e.g. `/portfolio/balance`, not `/trade-api/v2/portfolio/balance`) | | Signature error with query params | Strip query parameters before signing (use `path.split('?')[0]`) | [​](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests#next-steps) Next Steps -------------------------------------------------------------------------------------------------------- Now you can make authenticated requests! Try these endpoints (relative to `BASE_URL`): * `/portfolio/positions` - Get your positions * `/portfolio/orders` - View your orders * `/markets` - Browse available markets For more details, see the [Complete Order Lifecycle](https://docs.kalshi.com/getting_started/quick_start_create_order) guide or explore the [API Reference](https://docs.kalshi.com/api-reference) . [Quick Start: Market Data (No SDK)](https://docs.kalshi.com/getting_started/quick_start_market_data) [Quick Start: Create your first order (No SDK)](https://docs.kalshi.com/getting_started/quick_start_create_order) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # API Keys - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/api_keys#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Keys [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Generating an API Key](https://docs.kalshi.com/getting_started/api_keys#generating-an-api-key) * [Access the Account Settings Page:](https://docs.kalshi.com/getting_started/api_keys#access-the-account-settings-page) * [Generate a New API Key](https://docs.kalshi.com/getting_started/api_keys#generate-a-new-api-key) * [Store Your API Key and Key ID:](https://docs.kalshi.com/getting_started/api_keys#store-your-api-key-and-key-id) * [Using a API Key](https://docs.kalshi.com/getting_started/api_keys#using-a-api-key) * [Python](https://docs.kalshi.com/getting_started/api_keys#python) * [Javascript](https://docs.kalshi.com/getting_started/api_keys#javascript) This process is the same for the demo or production environment. [​](https://docs.kalshi.com/getting_started/api_keys#generating-an-api-key) Generating an API Key ---------------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/getting_started/api_keys#access-the-account-settings-page) Access the Account Settings Page: Log in to your account and navigate to the “Account Settings” page. You can typically find this option by clicking on your profile picture or account icon in the top-right corner of the application. ### [​](https://docs.kalshi.com/getting_started/api_keys#generate-a-new-api-key) Generate a New API Key In the “Profile Settings” page [https://kalshi.com/account/profile](https://kalshi.com/account/profile) , locate the “API Keys” section. Click on the “Create New API Key” button. This action will generate a new API key in the RSA\_PRIVATE\_KEY format. ### [​](https://docs.kalshi.com/getting_started/api_keys#store-your-api-key-and-key-id) Store Your API Key and Key ID: After generating the key, you will be presented with: • Private Key: This is your secret key in RSA\_PRIVATE\_KEY format. • Key ID: This is a unique identifier associated with your private key. **Important**: For security reasons, the private key will not be stored by our service, and you will not be able to retrieve it again once this page is closed. Please make sure to securely copy and save the private key immediately. The key will also be downloaded as txt file with the name provided. [​](https://docs.kalshi.com/getting_started/api_keys#using-a-api-key) Using a API Key ---------------------------------------------------------------------------------------- Each request to Kalshi trading api will need to be signed with the private key generated above. The following header values will need to be provided with each request: `KALSHI-ACCESS-KEY`\- the Key ID `KALSHI-ACCESS-TIMESTAMP` - the request timestamp in ms `KALSHI-ACCESS-SIGNATURE`\- request hash signed with private key The above signature is generated by signing a concatenation of the timestamp, the HTTP method and the path. **Important**: When signing requests, use the path **without query parameters**. For example, if your request is to `/trade-api/v2/portfolio/orders?limit=5`, sign only `/trade-api/v2/portfolio/orders` (strip the `?` and everything after it). Sample code for generating the required headers is below. For end-to-end examples, see [Quick Start: Authenticated Requests (No SDK)](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests) . ### [​](https://docs.kalshi.com/getting_started/api_keys#python) Python Load the private key stored in a file Report incorrect code Copy Ask AI from cryptography.hazmat.primitives import serialization from cryptography.hazmat.backends import default_backend def load_private_key_from_file(file_path): with open(file_path, "rb") as key_file: private_key = serialization.load_pem_private_key( key_file.read(), password=None, # or provide a password if your key is encrypted backend=default_backend() ) return private_key Sign text with private key Report incorrect code Copy Ask AI import base64 from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding, rsa from cryptography.exceptions import InvalidSignature def sign_pss_text(private_key: rsa.RSAPrivateKey, text: str) -> str: message = text.encode('utf-8') try: signature = private_key.sign( message, padding.PSS( mgf=padding.MGF1(hashes.SHA256()), salt_length=padding.PSS.DIGEST_LENGTH ), hashes.SHA256() ) return base64.b64encode(signature).decode('utf-8') except InvalidSignature as e: raise ValueError("RSA sign PSS failed") from e Send a request to Kalshi API with signed header Report incorrect code Copy Ask AI import requests import datetime current_time = datetime.datetime.now() timestamp = current_time.timestamp() current_time_milliseconds = int(timestamp * 1000) timestampt_str = str(current_time_milliseconds) private_key = load_private_key_from_file('kalshi-key-2.key') method = "GET" base_url = 'https://demo-api.kalshi.co' path='/trade-api/v2/portfolio/balance' # Strip query parameters from path before signing path_without_query = path.split('?')[0] msg_string = timestampt_str + method + path_without_query sig = sign_pss_text(private_key, msg_string) headers = { 'KALSHI-ACCESS-KEY': 'a952bcbe-ec3b-4b5b-b8f9-11dae589608c', 'KALSHI-ACCESS-SIGNATURE': sig, 'KALSHI-ACCESS-TIMESTAMP': timestampt_str } response = requests.get(base_url + path, headers=headers) print(response.text) ### [​](https://docs.kalshi.com/getting_started/api_keys#javascript) Javascript Load the private key stored in a file Report incorrect code Copy Ask AI const fs = require('fs'); const path = require('path'); function loadPrivateKeyFromFile(filePath) { const absolutePath = path.resolve(filePath); const privateKeyPem = fs.readFileSync(absolutePath, 'utf8'); return privateKeyPem; } Sign text with private key Report incorrect code Copy Ask AI const crypto = require('crypto'); function signPssText(privateKeyPem, text) { const sign = crypto.createSign('RSA-SHA256'); sign.update(text); sign.end(); const signature = sign.sign({ key: privateKeyPem, padding: crypto.constants.RSA_PKCS1_PSS_PADDING, saltLength: crypto.constants.RSA_PSS_SALTLEN_DIGEST, }); return signature.toString('base64'); } Send a request to Kalshi API with signed header Report incorrect code Copy Ask AI const axios = require('axios'); const currentTimeMilliseconds = Date.now(); const timestampStr = currentTimeMilliseconds.toString(); const privateKeyPem = loadPrivateKeyFromFile('path/to/your/private-key.pem'); const method = "GET"; const baseUrl = 'https://demo-api.kalshi.co'; const path = '/trade-api/v2/portfolio/balance'; // Strip query parameters from path before signing const pathWithoutQuery = path.split('?')[0]; const msgString = timestampStr + method + pathWithoutQuery; const sig = signPssText(privateKeyPem, msgString); const headers = { 'KALSHI-ACCESS-KEY': 'your-api-key-id', 'KALSHI-ACCESS-SIGNATURE': sig, 'KALSHI-ACCESS-TIMESTAMP': timestampStr }; axios.get(baseUrl + path, { headers }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); }); [Test In The Demo Environment](https://docs.kalshi.com/getting_started/demo_env) [Rate Limits and Tiers](https://docs.kalshi.com/getting_started/rate_limits) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Order Group Updates - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/order-group-updates#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Order Group Updates [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Order Group Updates { "type": "order_group_updates", "sid": 21, "seq": 7, "msg": { "event_type": "limit_updated", "order_group_id": "og_123", "contracts_limit_fp": "150.00" }} WSS order\_group\_updates Messages Order Group Updates { "type": "order_group_updates", "sid": 21, "seq": 7, "msg": { "event_type": "limit_updated", "order_group_id": "og_123", "contracts_limit_fp": "150.00" }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive Order Group Updates type:object show 4 properties Order group lifecycle and limit updates for authenticated user [Communications](https://docs.kalshi.com/websockets/communications) [User Orders](https://docs.kalshi.com/websockets/user-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Market Positions - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/market-positions#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Market Positions [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Market Position Update { "type": "market_position", "sid": 14, "msg": { "user_id": "user123", "market_ticker": "FED-23DEC-T3.00", "position": 100, "position_fp": "100.00", "position_cost": 500000, "position_cost_dollars": "50.0000", "realized_pnl": 100000, "realized_pnl_dollars": "10.0000", "fees_paid": 10000, "fees_paid_dollars": "1.0000", "position_fee_cost": 5000, "position_fee_cost_dollars": "0.5000", "volume": 15, "volume_fp": "15.00" }} WSS market\_positions Messages Market Position Update { "type": "market_position", "sid": 14, "msg": { "user_id": "user123", "market_ticker": "FED-23DEC-T3.00", "position": 100, "position_fp": "100.00", "position_cost": 500000, "position_cost_dollars": "50.0000", "realized_pnl": 100000, "realized_pnl_dollars": "10.0000", "fees_paid": 10000, "fees_paid_dollars": "1.0000", "position_fee_cost": 5000, "position_fee_cost_dollars": "0.5000", "volume": 15, "volume_fp": "15.00" }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive Market Position Update type:object show 3 properties Real-time position updates for authenticated user [User Fills](https://docs.kalshi.com/websockets/user-fills) [Market & Event Lifecycle](https://docs.kalshi.com/websockets/market-&-event-lifecycle) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Multivariate Lookups - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/multivariate-lookups#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Multivariate Lookups [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Multivariate Lookup { "type": "multivariate_lookup", "sid": 13, "msg": { "collection_ticker": "KXOSCARWINNERS-25", "event_ticker": "KXOSCARWINNERS-25C0CE5", "market_ticker": "KXOSCARWINNERS-25C0CE5-36353", "selected_markets": [ { "event_ticker": "KXOSCARACTO-25", "market_ticker": "KXOSCARACTO-25-AB", "side": "yes" }, { "event_ticker": "KXOSCARACTR-25", "market_ticker": "KXOSCARACTR-25-DM", "side": "yes" } ] }} WSS multivariate Messages Multivariate Lookup { "type": "multivariate_lookup", "sid": 13, "msg": { "collection_ticker": "KXOSCARWINNERS-25", "event_ticker": "KXOSCARWINNERS-25C0CE5", "market_ticker": "KXOSCARWINNERS-25C0CE5-36353", "selected_markets": [ { "event_ticker": "KXOSCARACTO-25", "market_ticker": "KXOSCARACTO-25-AB", "side": "yes" }, { "event_ticker": "KXOSCARACTR-25", "market_ticker": "KXOSCARACTR-25-DM", "side": "yes" } ] }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive Multivariate Lookup type:object show 3 properties Multivariate collection lookup notification [Market & Event Lifecycle](https://docs.kalshi.com/websockets/market-&-event-lifecycle) [Communications](https://docs.kalshi.com/websockets/communications) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Market & Event Lifecycle - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/market-&-event-lifecycle#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Market & Event Lifecycle [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Market Lifecycle V2 { "type": "market_lifecycle_v2", "sid": 13, "msg": { "market_ticker": "INXD-23SEP14-B4487", "event_type": "created", "open_ts": 1694635200, "close_ts": 1694721600, "additional_metadata": { "name": "S&P 500 daily return on Sep 14", "title": "S&P 500 closes up by 0.02% or more", "yes_sub_title": "S&P 500 closes up 0.02%+", "no_sub_title": "S&P 500 closes up <0.02%", "rules_primary": "The S&P 500 index level at 4:00 PM ET...", "rules_secondary": "", "can_close_early": true, "event_ticker": "INXD-23SEP14", "expected_expiration_ts": 1694721600, "strike_type": "greater", "floor_strike": 4487 } }} Event Lifecycle { "type": "event_lifecycle", "sid": 5, "msg": { "event_ticker": "KXQUICKSETTLE-26JAN25H2150", "title": "What will 1+1 equal on Jan 25 at 21:50?", "subtitle": "Jan 25 at 21:50", "collateral_return_type": "MECNET", "series_ticker": "KXQUICKSETTLE" }} WSS market\_lifecycle\_v2 Messages Market Lifecycle V2 { "type": "market_lifecycle_v2", "sid": 13, "msg": { "market_ticker": "INXD-23SEP14-B4487", "event_type": "created", "open_ts": 1694635200, "close_ts": 1694721600, "additional_metadata": { "name": "S&P 500 daily return on Sep 14", "title": "S&P 500 closes up by 0.02% or more", "yes_sub_title": "S&P 500 closes up 0.02%+", "no_sub_title": "S&P 500 closes up <0.02%", "rules_primary": "The S&P 500 index level at 4:00 PM ET...", "rules_secondary": "", "can_close_early": true, "event_ticker": "INXD-23SEP14", "expected_expiration_ts": 1694721600, "strike_type": "greater", "floor_strike": 4487 } }} Event Lifecycle { "type": "event_lifecycle", "sid": 5, "msg": { "event_ticker": "KXQUICKSETTLE-26JAN25H2150", "title": "What will 1+1 equal on Jan 25 at 21:50?", "subtitle": "Jan 25 at 21:50", "collateral_return_type": "MECNET", "series_ticker": "KXQUICKSETTLE" }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive Market Lifecycle V2 type:object show 3 properties Market lifecycle events (created, activated, deactivated, close\_date\_updated, determined, settled) Event Lifecycle type:object show 3 properties Event creation notification [Market Positions](https://docs.kalshi.com/websockets/market-positions) [Multivariate Lookups](https://docs.kalshi.com/websockets/multivariate-lookups) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Connection Keep-Alive - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/connection-keep-alive#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Connection Keep-Alive [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Ping "" Pong "" Ping "heartbeat" Pong "" WSS Messages Ping "" Pong "" Ping "heartbeat" Pong "" Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Send Ping type:string Client sends Ping frame (0x9) to elicit Pong from Kalshi Pong type:string Client replies to Ping with Pong Frame (0xA) Receive Ping type:string Kalshi sends Ping (0x9) with body 'heartbeat' to elicit Pong from client Pong type:string Kalshi responds to client Ping with Pong frame (0xA) [WebSocket Connection](https://docs.kalshi.com/websockets/websocket-connection) [Orderbook Updates](https://docs.kalshi.com/websockets/orderbook-updates) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # ApiKeys - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes ApiKeys [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [createApiKey](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#createapikey) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-response-details) * [deleteApiKey](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#deleteapikey) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-response-details-2) * [generateApiKey](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#generateapikey) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#parameters-3) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#return-type-3) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#authorization-3) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-request-headers-3) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-response-details-3) * [getApiKeys](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#getapikeys) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#parameters-4) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#return-type-4) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#authorization-4) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-request-headers-4) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-response-details-4) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**createApiKey**](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#createapikey) | **POST** /api\_keys | Create API Key | | [**deleteApiKey**](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#deleteapikey) | **DELETE** /api\_keys/ | Delete API Key | | [**generateApiKey**](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#generateapikey) | **POST** /api\_keys/generate | Generate API Key | | [**getApiKeys**](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#getapikeys) | **GET** /api\_keys | Get API Keys | [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#createapikey) **createApiKey** =========================================================================================== > CreateApiKeyResponse createApiKey(createApiKeyRequest) Endpoint for creating a new API key with a user-provided public key. This endpoint allows users with Premier or Market Maker API usage levels to create API keys by providing their own RSA public key. The platform will use this public key to verify signatures on API requests. ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **createApiKeyRequest** | **CreateApiKeyRequest** | | | ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#return-type) Return type **CreateApiKeyResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#authorization) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-request-headers) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **201** | API key created successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized | \- | | **403** | Forbidden - insufficient API usage level | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#deleteapikey) **deleteApiKey** =========================================================================================== > deleteApiKey() Endpoint for deleting an existing API key. This endpoint permanently deletes an API key. Once deleted, the key can no longer be used for authentication. This action cannot be undone. ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **apiKey** | \[**string**\] | API key ID to delete | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#return-type-2) Return type void (empty response body) ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#authorization-2) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: Not defined ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **204** | API key successfully deleted | \- | | **400** | Bad request - invalid API key ID | \- | | **401** | Unauthorized | \- | | **404** | API key not found | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#generateapikey) **generateApiKey** =============================================================================================== > GenerateApiKeyResponse generateApiKey(generateApiKeyRequest) Endpoint for generating a new API key with an automatically created key pair. This endpoint generates both a public and private RSA key pair. The public key is stored on the platform, while the private key is returned to the user and must be stored securely. The private key cannot be retrieved again. ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **generateApiKeyRequest** | **GenerateApiKeyRequest** | | | ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#return-type-3) Return type **GenerateApiKeyResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#authorization-3) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-request-headers-3) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-response-details-3) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **201** | API key generated successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#getapikeys) **getApiKeys** ======================================================================================= > GetApiKeysResponse getApiKeys() Endpoint for retrieving all API keys associated with the authenticated user. API keys allow programmatic access to the platform without requiring username/password authentication. Each key has a unique identifier and name. ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#parameters-4) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#return-type-4) Return type **GetApiKeysResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#authorization-4) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-request-headers-4) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi#http-response-details-4) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | List of API keys retrieved successfully | \- | | **401** | Unauthorized | \- | | **500** | Internal server error | \- | [Exchange](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Market Ticker - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/market-ticker#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Market Ticker [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Ticker Update { "type": "ticker", "sid": 11, "msg": { "market_ticker": "FED-23DEC-T3.00", "market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1", "price": 48, "yes_bid": 45, "yes_ask": 53, "price_dollars": "0.480", "yes_bid_dollars": "0.450", "yes_ask_dollars": "0.530", "volume": 33896, "volume_fp": "33896.00", "open_interest": 20422, "open_interest_fp": "20422.00", "dollar_volume": 16948, "dollar_open_interest": 10211, "ts": 1669149841, "time": "2022-11-22T20:44:01Z" }} WSS ticker Messages Ticker Update { "type": "ticker", "sid": 11, "msg": { "market_ticker": "FED-23DEC-T3.00", "market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1", "price": 48, "yes_bid": 45, "yes_ask": 53, "price_dollars": "0.480", "yes_bid_dollars": "0.450", "yes_ask_dollars": "0.530", "volume": 33896, "volume_fp": "33896.00", "open_interest": 20422, "open_interest_fp": "20422.00", "dollar_volume": 16948, "dollar_open_interest": 10211, "ts": 1669149841, "time": "2022-11-22T20:44:01Z" }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive Ticker Update type:object show 3 properties Market price ticker information [Orderbook Updates](https://docs.kalshi.com/websockets/orderbook-updates) [Public Trades](https://docs.kalshi.com/websockets/public-trades) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Public Trades - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/public-trades#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Public Trades [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Trade Update { "type": "trade", "sid": 11, "msg": { "trade_id": "d91bc706-ee49-470d-82d8-11418bda6fed", "market_ticker": "HIGHNY-22DEC23-B53.5", "yes_price": 36, "yes_price_dollars": "0.360", "no_price": 64, "no_price_dollars": "0.640", "count": 136, "count_fp": "136.00", "taker_side": "no", "ts": 1669149841 }} WSS trade Messages Trade Update { "type": "trade", "sid": 11, "msg": { "trade_id": "d91bc706-ee49-470d-82d8-11418bda6fed", "market_ticker": "HIGHNY-22DEC23-B53.5", "yes_price": 36, "yes_price_dollars": "0.360", "no_price": 64, "no_price_dollars": "0.640", "count": 136, "count_fp": "136.00", "taker_side": "no", "ts": 1669149841 }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive Trade Update type:object show 3 properties Public trade information [Market Ticker](https://docs.kalshi.com/websockets/market-ticker) [User Fills](https://docs.kalshi.com/websockets/user-fills) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # StructuredTargets - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes StructuredTargets [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [getStructuredTarget](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#getstructuredtarget) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#http-response-details) * [getStructuredTargets](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#getstructuredtargets) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#http-response-details-2) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**getStructuredTarget**](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#getstructuredtarget) | **GET** /structured\_targets/ | Get Structured Target | | [**getStructuredTargets**](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#getstructuredtargets) | **GET** /structured\_targets | Get Structured Targets | [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#getstructuredtarget) **getStructuredTarget** =================================================================================================================== > GetStructuredTargetResponse getStructuredTarget() Endpoint for getting data about a specific structured target by its ID. ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **structuredTargetId** | \[**string**\] | Structured target ID | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#return-type) Return type **GetStructuredTargetResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#authorization) Authorization No authorization required ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#http-request-headers) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Structured target retrieved successfully | \- | | **401** | Unauthorized | \- | | **404** | Not found | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#getstructuredtargets) **getStructuredTargets** ===================================================================================================================== > GetStructuredTargetsResponse getStructuredTargets() Page size (min: 1, max: 2000) ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **type** | \[**string**\] | Filter by structured target type | (optional) defaults to undefined | | **competition** | \[**string**\] | Filter by competition | (optional) defaults to undefined | | **pageSize** | \[**number**\] | Number of items per page (min 1, max 2000, default 100) | (optional) defaults to 100 | | **cursor** | \[**string**\] | Pagination cursor | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#return-type-2) Return type **GetStructuredTargetsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#authorization-2) Authorization No authorization required ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Structured targets retrieved successfully | \- | | **401** | Unauthorized | \- | | **500** | Internal server error | \- | [MultivariateCollections](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi) [Exchange](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Exchange - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Exchange [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [getExchangeAnnouncements](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangeannouncements) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details) * [getExchangeSchedule](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangeschedule) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details-2) * [getExchangeStatus](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangestatus) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters-3) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type-3) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization-3) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers-3) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details-3) * [getSeriesFeeChanges](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getseriesfeechanges) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters-4) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type-4) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization-4) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers-4) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details-4) * [getUserDataTimestamp](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getuserdatatimestamp) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters-5) * [Return type](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type-5) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization-5) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers-5) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details-5) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**getExchangeAnnouncements**](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangeannouncements) | **GET** /exchange/announcements | Get Exchange Announcements | | [**getExchangeSchedule**](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangeschedule) | **GET** /exchange/schedule | Get Exchange Schedule | | [**getExchangeStatus**](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangestatus) | **GET** /exchange/status | Get Exchange Status | | [**getSeriesFeeChanges**](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getseriesfeechanges) | **GET** /series/fee\_changes | Get Series Fee Changes | | [**getUserDataTimestamp**](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getuserdatatimestamp) | **GET** /exchange/user\_data\_timestamp | Get User Data Timestamp | [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangeannouncements) **getExchangeAnnouncements** ==================================================================================================================== > GetExchangeAnnouncementsResponse getExchangeAnnouncements() Endpoint for getting all exchange-wide announcements. ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type) Return type **GetExchangeAnnouncementsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization) Authorization No authorization required ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Exchange announcements retrieved successfully | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangeschedule) **getExchangeSchedule** ========================================================================================================== > GetExchangeScheduleResponse getExchangeSchedule() Endpoint for getting the exchange schedule. ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters-2) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type-2) Return type **GetExchangeScheduleResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization-2) Authorization No authorization required ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Exchange schedule retrieved successfully | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getexchangestatus) **getExchangeStatus** ====================================================================================================== > ExchangeStatus getExchangeStatus() Endpoint for getting the exchange status. ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters-3) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type-3) Return type **ExchangeStatus** ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization-3) Authorization No authorization required ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers-3) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details-3) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Exchange status retrieved successfully | \- | | **500** | Internal server error | \- | | **503** | Service unavailable | \- | | **504** | Gateway timeout | \- | [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getseriesfeechanges) **getSeriesFeeChanges** ========================================================================================================== > GetSeriesFeeChangesResponse getSeriesFeeChanges() ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **seriesTicker** | \[**string**\] | | (optional) defaults to undefined | | **showHistorical** | \[**boolean**\] | | (optional) defaults to false | ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type-4) Return type **GetSeriesFeeChangesResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization-4) Authorization No authorization required ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers-4) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details-4) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Series fee changes retrieved successfully | \- | | **400** | Bad request - invalid input | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#getuserdatatimestamp) **getUserDataTimestamp** ============================================================================================================ > GetUserDataTimestampResponse getUserDataTimestamp() There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible, combine API responses to PUT/POST/DELETE requests with websocket data to obtain the most accurate view of the exchange state. This endpoint provides an approximate indication of when the data from the following endpoints was last validated: GetBalance, GetOrder(s), GetFills, GetPositions ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#parameters-5) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#return-type-5) Return type **GetUserDataTimestampResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#authorization-5) Authorization No authorization required ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-request-headers-5) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/ExchangeApi#http-response-details-5) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | User data timestamp retrieved successfully | \- | | **500** | Internal server error | \- | [StructuredTargets](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi) [ApiKeys](https://docs.kalshi.com/typescript-sdk/api/ApiKeysApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Orderbook Updates - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/orderbook-updates#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Orderbook Updates [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Orderbook Snapshot { "type": "orderbook_snapshot", "sid": 2, "seq": 2, "msg": { "market_ticker": "FED-23DEC-T3.00", "market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1", "yes": [ [ 8, 300 ], [ 22, 333 ] ], "yes_dollars": [ [ "0.080", 300 ], [ "0.220", 333 ] ], "yes_dollars_fp": [ [ "0.0800", "300.00" ], [ "0.2200", "333.00" ] ], "no": [ [ 54, 20 ], [ 56, 146 ] ], "no_dollars": [ [ "0.540", 20 ], [ "0.560", 146 ] ], "no_dollars_fp": [ [ "0.5400", "20.00" ], [ "0.5600", "146.00" ] ] }} Orderbook Delta { "type": "orderbook_delta", "sid": 2, "seq": 3, "msg": { "market_ticker": "FED-23DEC-T3.00", "market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1", "price": 96, "price_dollars": "0.960", "delta": -54, "delta_fp": "-54.00", "side": "yes", "ts": "2022-11-22T20:44:01Z" }} WSS orderbook\_delta Messages Orderbook Snapshot { "type": "orderbook_snapshot", "sid": 2, "seq": 2, "msg": { "market_ticker": "FED-23DEC-T3.00", "market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1", "yes": [ [ 8, 300 ], [ 22, 333 ] ], "yes_dollars": [ [ "0.080", 300 ], [ "0.220", 333 ] ], "yes_dollars_fp": [ [ "0.0800", "300.00" ], [ "0.2200", "333.00" ] ], "no": [ [ 54, 20 ], [ 56, 146 ] ], "no_dollars": [ [ "0.540", 20 ], [ "0.560", 146 ] ], "no_dollars_fp": [ [ "0.5400", "20.00" ], [ "0.5600", "146.00" ] ] }} Orderbook Delta { "type": "orderbook_delta", "sid": 2, "seq": 3, "msg": { "market_ticker": "FED-23DEC-T3.00", "market_id": "9b0f6b43-5b68-4f9f-9f02-9a2d1b8ac1a1", "price": 96, "price_dollars": "0.960", "delta": -54, "delta_fp": "-54.00", "side": "yes", "ts": "2022-11-22T20:44:01Z" }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive Orderbook Snapshot type:object show 4 properties Complete view of the order book's aggregated price levels Orderbook Delta type:object show 4 properties Update to be applied to the current order book view [Connection Keep-Alive](https://docs.kalshi.com/websockets/connection-keep-alive) [Market Ticker](https://docs.kalshi.com/websockets/market-ticker) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # User Fills - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/user-fills#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets User Fills [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Fill Update { "type": "fill", "sid": 13, "msg": { "trade_id": "d91bc706-ee49-470d-82d8-11418bda6fed", "order_id": "ee587a1c-8b87-4dcf-b721-9f6f790619fa", "market_ticker": "HIGHNY-22DEC23-B53.5", "is_taker": true, "side": "yes", "yes_price": 75, "yes_price_dollars": "0.750", "count": 278, "count_fp": "278.00", "action": "buy", "ts": 1671899397, "post_position": 500, "post_position_fp": "500.00", "purchased_side": "yes", "subaccount": 3 }} WSS fill Messages Fill Update { "type": "fill", "sid": 13, "msg": { "trade_id": "d91bc706-ee49-470d-82d8-11418bda6fed", "order_id": "ee587a1c-8b87-4dcf-b721-9f6f790619fa", "market_ticker": "HIGHNY-22DEC23-B53.5", "is_taker": true, "side": "yes", "yes_price": 75, "yes_price_dollars": "0.750", "count": 278, "count_fp": "278.00", "action": "buy", "ts": 1671899397, "post_position": 500, "post_position_fp": "500.00", "purchased_side": "yes", "subaccount": 3 }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive Fill Update type:object show 3 properties Private fill information for authenticated user [Public Trades](https://docs.kalshi.com/websockets/public-trades) [Market Positions](https://docs.kalshi.com/websockets/market-positions) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # User Orders - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/user-orders#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets User Orders [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages User Order Update { "type": "user_order", "sid": 22, "msg": { "order_id": "ee587a1c-8b87-4dcf-b721-9f6f790619fa", "user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "ticker": "FED-23DEC-T3.00", "status": "resting", "side": "yes", "is_yes": true, "yes_price_dollars": "0.3500", "fill_count_fp": "0.00", "remaining_count_fp": "10.00", "initial_count_fp": "10.00", "taker_fill_cost_dollars": "0.0000", "maker_fill_cost_dollars": "0.0000", "client_order_id": "my-order-1", "order_group_id": "og_123", "self_trade_prevention_type": "taker_at_cross", "created_time": "2024-12-01T10:00:00Z", "expiration_time": "2024-12-01T11:00:00Z", "subaccount_number": 0 }} WSS user\_orders Messages User Order Update { "type": "user_order", "sid": 22, "msg": { "order_id": "ee587a1c-8b87-4dcf-b721-9f6f790619fa", "user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "ticker": "FED-23DEC-T3.00", "status": "resting", "side": "yes", "is_yes": true, "yes_price_dollars": "0.3500", "fill_count_fp": "0.00", "remaining_count_fp": "10.00", "initial_count_fp": "10.00", "taker_fill_cost_dollars": "0.0000", "maker_fill_cost_dollars": "0.0000", "client_order_id": "my-order-1", "order_group_id": "og_123", "self_trade_prevention_type": "taker_at_cross", "created_time": "2024-12-01T10:00:00Z", "expiration_time": "2024-12-01T11:00:00Z", "subaccount_number": 0 }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive User Order Update type:object show 3 properties Real-time order updates for authenticated user [Order Group Updates](https://docs.kalshi.com/websockets/order-group-updates) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Communications - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/communications#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets Communications [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages RFQ Created { "type": "rfq_created", "sid": 15, "msg": { "id": "rfq_123", "creator_id": "", "market_ticker": "FED-23DEC-T3.00", "event_ticker": "FED-23DEC", "contracts": 100, "contracts_fp": "100.00", "target_cost": 3500, "target_cost_dollars": "0.35", "created_ts": "2024-12-01T10:00:00Z" }} RFQ Deleted { "type": "rfq_deleted", "sid": 15, "msg": { "id": "rfq_123", "creator_id": "comm_abc123", "market_ticker": "FED-23DEC-T3.00", "event_ticker": "FED-23DEC", "contracts": 100, "contracts_fp": "100.00", "target_cost": 3500, "target_cost_dollars": "0.35", "deleted_ts": "2024-12-01T10:05:00Z" }} Quote Created { "type": "quote_created", "sid": 15, "msg": { "quote_id": "quote_456", "rfq_id": "rfq_123", "quote_creator_id": "comm_def456", "market_ticker": "FED-23DEC-T3.00", "event_ticker": "FED-23DEC", "yes_bid": 35, "no_bid": 65, "yes_bid_dollars": "0.35", "no_bid_dollars": "0.65", "yes_contracts_offered": 100, "no_contracts_offered": 200, "yes_contracts_offered_fp": "100.00", "no_contracts_offered_fp": "200.00", "rfq_target_cost": 3500, "rfq_target_cost_dollars": "0.35", "created_ts": "2024-12-01T10:02:00Z" }} Quote Accepted { "type": "quote_accepted", "sid": 15, "msg": { "quote_id": "quote_456", "rfq_id": "rfq_123", "quote_creator_id": "comm_def456", "market_ticker": "FED-23DEC-T3.00", "event_ticker": "FED-23DEC", "yes_bid": 35, "no_bid": 65, "yes_bid_dollars": "0.35", "no_bid_dollars": "0.65", "accepted_side": "yes", "contracts_accepted": 50, "contracts_accepted_fp": "50.00", "yes_contracts_offered": 100, "no_contracts_offered": 200, "yes_contracts_offered_fp": "100.00", "no_contracts_offered_fp": "200.00", "rfq_target_cost": 3500, "rfq_target_cost_dollars": "0.35" }} Quote Executed { "type": "quote_executed", "sid": 15, "msg": { "quote_id": "quote_456", "rfq_id": "rfq_123", "quote_creator_id": "a1b2c3d4e5f6...", "rfq_creator_id": "f6e5d4c3b2a1...", "order_id": "order_789", "client_order_id": "my_client_order_123", "market_ticker": "FED-23DEC-T3.00", "executed_ts": "2024-12-01T10:05:00Z" }} WSS communications Messages RFQ Created { "type": "rfq_created", "sid": 15, "msg": { "id": "rfq_123", "creator_id": "", "market_ticker": "FED-23DEC-T3.00", "event_ticker": "FED-23DEC", "contracts": 100, "contracts_fp": "100.00", "target_cost": 3500, "target_cost_dollars": "0.35", "created_ts": "2024-12-01T10:00:00Z" }} RFQ Deleted { "type": "rfq_deleted", "sid": 15, "msg": { "id": "rfq_123", "creator_id": "comm_abc123", "market_ticker": "FED-23DEC-T3.00", "event_ticker": "FED-23DEC", "contracts": 100, "contracts_fp": "100.00", "target_cost": 3500, "target_cost_dollars": "0.35", "deleted_ts": "2024-12-01T10:05:00Z" }} Quote Created { "type": "quote_created", "sid": 15, "msg": { "quote_id": "quote_456", "rfq_id": "rfq_123", "quote_creator_id": "comm_def456", "market_ticker": "FED-23DEC-T3.00", "event_ticker": "FED-23DEC", "yes_bid": 35, "no_bid": 65, "yes_bid_dollars": "0.35", "no_bid_dollars": "0.65", "yes_contracts_offered": 100, "no_contracts_offered": 200, "yes_contracts_offered_fp": "100.00", "no_contracts_offered_fp": "200.00", "rfq_target_cost": 3500, "rfq_target_cost_dollars": "0.35", "created_ts": "2024-12-01T10:02:00Z" }} Quote Accepted { "type": "quote_accepted", "sid": 15, "msg": { "quote_id": "quote_456", "rfq_id": "rfq_123", "quote_creator_id": "comm_def456", "market_ticker": "FED-23DEC-T3.00", "event_ticker": "FED-23DEC", "yes_bid": 35, "no_bid": 65, "yes_bid_dollars": "0.35", "no_bid_dollars": "0.65", "accepted_side": "yes", "contracts_accepted": 50, "contracts_accepted_fp": "50.00", "yes_contracts_offered": 100, "no_contracts_offered": 200, "yes_contracts_offered_fp": "100.00", "no_contracts_offered_fp": "200.00", "rfq_target_cost": 3500, "rfq_target_cost_dollars": "0.35" }} Quote Executed { "type": "quote_executed", "sid": 15, "msg": { "quote_id": "quote_456", "rfq_id": "rfq_123", "quote_creator_id": "a1b2c3d4e5f6...", "rfq_creator_id": "f6e5d4c3b2a1...", "order_id": "order_789", "client_order_id": "my_client_order_123", "market_ticker": "FED-23DEC-T3.00", "executed_ts": "2024-12-01T10:05:00Z" }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Receive RFQ Created type:object show 3 properties Notification when an RFQ is created RFQ Deleted type:object show 3 properties Notification when an RFQ is deleted Quote Created type:object show 3 properties Notification when a quote is created on an RFQ Quote Accepted type:object show 3 properties Notification when a quote is accepted Quote Executed type:object show 3 properties Notification when a quote is executed and orders are placed [Multivariate Lookups](https://docs.kalshi.com/websockets/multivariate-lookups) [Order Group Updates](https://docs.kalshi.com/websockets/order-group-updates) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Milestones - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Milestones [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [getMilestone](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#getmilestone) * [Example](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#example) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#http-response-details) * [getMilestones](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#getmilestones) * [Example](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#example-2) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#http-response-details-2) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**getMilestone**](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#getmilestone) | **GET** /milestones/ | Get Milestone | | [**getMilestones**](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#getmilestones) | **GET** /milestones | Get Milestones | [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#getmilestone) **getMilestone** ============================================================================================== > GetMilestoneResponse getMilestone() Get a single milestone by ID ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#example) Example Report incorrect code Copy Ask AI import { MilestonesApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MilestonesApi(configuration); let milestoneId: string; //Milestone ID (default to undefined) const { status, data } = await apiInstance.getMilestone( milestoneId ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **milestoneId** | \[**string**\] | Milestone ID | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#return-type) Return type **GetMilestoneResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#authorization) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#http-request-headers) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Milestone retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#getmilestones) **getMilestones** ================================================================================================ > GetMilestonesResponse getMilestones() Get all milestones ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#example-2) Example Report incorrect code Copy Ask AI import { MilestonesApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MilestonesApi(configuration); let status: string; //Filter by milestone status (optional) (default to undefined) let limit: number; //Number of items per page (minimum 1, maximum 500) (optional) (default to 100) const { status, data } = await apiInstance.getMilestones( status, limit ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **status** | \[**string**\] | Filter by milestone status | (optional) defaults to undefined | | **limit** | \[**number**\] | Number of items per page (minimum 1, maximum 500) | (optional) defaults to 100 | ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#return-type-2) Return type **GetMilestonesResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#authorization-2) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Milestones retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [Series](https://docs.kalshi.com/typescript-sdk/api/SeriesApi) [MultivariateCollections](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Orderbook Responses - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/orderbook_responses#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Orderbook Responses [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Getting Orderbook Data](https://docs.kalshi.com/getting_started/orderbook_responses#getting-orderbook-data) * [Request Format](https://docs.kalshi.com/getting_started/orderbook_responses#request-format) * [Example Request](https://docs.kalshi.com/getting_started/orderbook_responses#example-request) * [Response Structure](https://docs.kalshi.com/getting_started/orderbook_responses#response-structure) * [Example Response](https://docs.kalshi.com/getting_started/orderbook_responses#example-response) * [Understanding the Arrays](https://docs.kalshi.com/getting_started/orderbook_responses#understanding-the-arrays) * [Why Only Bids?](https://docs.kalshi.com/getting_started/orderbook_responses#why-only-bids) * [The Reciprocal Relationship](https://docs.kalshi.com/getting_started/orderbook_responses#the-reciprocal-relationship) * [Calculating Spreads](https://docs.kalshi.com/getting_started/orderbook_responses#calculating-spreads) * [Example Calculation](https://docs.kalshi.com/getting_started/orderbook_responses#example-calculation) * [Working with Orderbook Data](https://docs.kalshi.com/getting_started/orderbook_responses#working-with-orderbook-data) * [Display Best Prices](https://docs.kalshi.com/getting_started/orderbook_responses#display-best-prices) * [Calculate Market Depth](https://docs.kalshi.com/getting_started/orderbook_responses#calculate-market-depth) * [Next Steps](https://docs.kalshi.com/getting_started/orderbook_responses#next-steps) [​](https://docs.kalshi.com/getting_started/orderbook_responses#getting-orderbook-data) Getting Orderbook Data ----------------------------------------------------------------------------------------------------------------- The [Get Market Orderbook](https://docs.kalshi.com/api-reference/market/get-market-order-book) endpoint returns the current state of bids for a specific market. ### [​](https://docs.kalshi.com/getting_started/orderbook_responses#request-format) Request Format Report incorrect code Copy Ask AI GET /markets/{ticker}/orderbook No authentication is required for this endpoint. ### [​](https://docs.kalshi.com/getting_started/orderbook_responses#example-request) Example Request Python JavaScript cURL Report incorrect code Copy Ask AI import requests # Get orderbook for a specific market market_ticker = "KXHIGHNY-24JAN01-T60" url = f"https://api.elections.kalshi.com/trade-api/v2/markets/{market_ticker}/orderbook" response = requests.get(url) orderbook_data = response.json() [​](https://docs.kalshi.com/getting_started/orderbook_responses#response-structure) Response Structure --------------------------------------------------------------------------------------------------------- The orderbook response contains two arrays of bids - one for YES positions and one for NO positions. Each bid is represented as a two-element array: `[price, quantity]`. ### [​](https://docs.kalshi.com/getting_started/orderbook_responses#example-response) Example Response Report incorrect code Copy Ask AI { "orderbook": { "yes": [\ [1, 200], // 200 contracts bid at 1¢\ [15, 100], // 100 contracts bid at 15¢\ [20, 50], // 50 contracts bid at 20¢\ [25, 20], // 20 contracts bid at 25¢\ [30, 11], // 11 contracts bid at 30¢\ [31, 10], // 10 contracts bid at 31¢\ [32, 10], // 10 contracts bid at 32¢\ [33, 11], // 11 contracts bid at 33¢\ [34, 9], // 9 contracts bid at 34¢\ [35, 11], // 11 contracts bid at 35¢\ [41, 10], // 10 contracts bid at 41¢\ [42, 13] // 13 contracts bid at 42¢\ ], "no": [\ [1, 100], // 100 contracts bid at 1¢\ [16, 3], // 3 contracts bid at 16¢\ [25, 50], // 50 contracts bid at 25¢\ [28, 19], // 19 contracts bid at 28¢\ [36, 5], // 5 contracts bid at 36¢\ [37, 50], // 50 contracts bid at 37¢\ [38, 300], // 300 contracts bid at 38¢\ [44, 29], // 29 contracts bid at 44¢\ [45, 20], // 20 contracts bid at 45¢\ [56, 17] // 17 contracts bid at 56¢\ ] } } ### [​](https://docs.kalshi.com/getting_started/orderbook_responses#understanding-the-arrays) Understanding the Arrays * **First element**: Price in cents (1-99) * **Second element**: Number of contracts available at that price * Arrays are sorted by price in **ascending order** * The **highest** bid (best bid) is the **last** element in each array [​](https://docs.kalshi.com/getting_started/orderbook_responses#why-only-bids) Why Only Bids? ------------------------------------------------------------------------------------------------ **Important**: Kalshi’s orderbook only returns bids, not asks. This is because in binary prediction markets, there’s a reciprocal relationship between YES and NO positions. In binary prediction markets, every position has a complementary opposite: * A **YES BID** at price X is equivalent to a **NO ASK** at price (100 - X) * A **NO BID** at price Y is equivalent to a **YES ASK** at price (100 - Y) ### [​](https://docs.kalshi.com/getting_started/orderbook_responses#the-reciprocal-relationship) The Reciprocal Relationship Since binary markets must sum to 100¢, these relationships always hold: | Action | Equivalent To | Why | | --- | --- | --- | | YES BID at 60¢ | NO ASK at 40¢ | Willing to pay 60¢ for YES = Willing to receive 40¢ to take NO | | NO BID at 30¢ | YES ASK at 70¢ | Willing to pay 30¢ for NO = Willing to receive 70¢ to take YES | This reciprocal nature means that by showing only bids, the orderbook provides complete market information while avoiding redundancy. [​](https://docs.kalshi.com/getting_started/orderbook_responses#calculating-spreads) Calculating Spreads ----------------------------------------------------------------------------------------------------------- To find the bid-ask spread for a market: 1. **YES spread**: * Best YES bid: Highest price in the `yes` array * Best YES ask: 100 - (Highest price in the `no` array) * Spread = Best YES ask - Best YES bid 2. **NO spread**: * Best NO bid: Highest price in the `no` array * Best NO ask: 100 - (Highest price in the `yes` array) * Spread = Best NO ask - Best NO bid ### [​](https://docs.kalshi.com/getting_started/orderbook_responses#example-calculation) Example Calculation Report incorrect code Copy Ask AI # Using the example orderbook above best_yes_bid = 42 # Highest YES bid (last in array) best_yes_ask = 100 - 56 # 100 - highest NO bid = 44 spread = best_yes_ask - best_yes_bid # 44 - 42 = 2 # The spread is 2¢ # You can buy YES at 44¢ (implied ask) and sell at 42¢ (bid) [​](https://docs.kalshi.com/getting_started/orderbook_responses#working-with-orderbook-data) Working with Orderbook Data --------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.kalshi.com/getting_started/orderbook_responses#display-best-prices) Display Best Prices Python JavaScript Report incorrect code Copy Ask AI def display_best_prices(orderbook_data): """Display the best bid prices and implied asks""" orderbook = orderbook_data['orderbook'] # Best bids (if any exist) if orderbook['yes']: best_yes_bid = orderbook['yes'][-1][0] # Last element is highest print(f"Best YES Bid: {best_yes_bid}¢") if orderbook['no']: best_no_bid = orderbook['no'][-1][0] # Last element is highest best_yes_ask = 100 - best_no_bid print(f"Best YES Ask: {best_yes_ask}¢ (implied from NO bid)") print() if orderbook['no']: best_no_bid = orderbook['no'][-1][0] # Last element is highest print(f"Best NO Bid: {best_no_bid}¢") if orderbook['yes']: best_yes_bid = orderbook['yes'][-1][0] # Last element is highest best_no_ask = 100 - best_yes_bid print(f"Best NO Ask: {best_no_ask}¢ (implied from YES bid)") ### [​](https://docs.kalshi.com/getting_started/orderbook_responses#calculate-market-depth) Calculate Market Depth Report incorrect code Copy Ask AI def calculate_depth(orderbook_data, depth_cents=5): """Calculate total volume within X cents of best bid""" orderbook = orderbook_data['orderbook'] yes_depth = 0 no_depth = 0 # YES side depth (iterate backwards from best bid) if orderbook['yes']: best_yes = orderbook['yes'][-1][0] # Last element is highest for price, quantity in reversed(orderbook['yes']): if best_yes - price <= depth_cents: yes_depth += quantity else: break # NO side depth (iterate backwards from best bid) if orderbook['no']: best_no = orderbook['no'][-1][0] # Last element is highest for price, quantity in reversed(orderbook['no']): if best_no - price <= depth_cents: no_depth += quantity else: break return {"yes_depth": yes_depth, "no_depth": no_depth} [​](https://docs.kalshi.com/getting_started/orderbook_responses#next-steps) Next Steps ----------------------------------------------------------------------------------------- * Learn about [making authenticated requests](https://docs.kalshi.com/getting_started/api_keys) to place orders * Explore [WebSocket connections](https://docs.kalshi.com/websockets/orderbook-updates) for real-time orderbook updates * Read about [market mechanics](https://kalshi.com/learn) on the Kalshi website [Understanding Pagination](https://docs.kalshi.com/getting_started/pagination) [Fixed-Point Migration](https://docs.kalshi.com/getting_started/fixed_point_migration) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Events - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/EventsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Events [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [getEvent](https://docs.kalshi.com/typescript-sdk/api/EventsApi#getevent) * [Example](https://docs.kalshi.com/typescript-sdk/api/EventsApi#example) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/EventsApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/EventsApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/EventsApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-response-details) * [getEventMetadata](https://docs.kalshi.com/typescript-sdk/api/EventsApi#geteventmetadata) * [Example](https://docs.kalshi.com/typescript-sdk/api/EventsApi#example-2) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/EventsApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/EventsApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/EventsApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-response-details-2) * [getEvents](https://docs.kalshi.com/typescript-sdk/api/EventsApi#getevents) * [Example](https://docs.kalshi.com/typescript-sdk/api/EventsApi#example-3) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/EventsApi#parameters-3) * [Return type](https://docs.kalshi.com/typescript-sdk/api/EventsApi#return-type-3) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/EventsApi#authorization-3) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-request-headers-3) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-response-details-3) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**getEvent**](https://docs.kalshi.com/typescript-sdk/api/EventsApi#getevent) | **GET** /events/ | Get Event | | [**getEventMetadata**](https://docs.kalshi.com/typescript-sdk/api/EventsApi#geteventmetadata) | **GET** /events//metadata | Get Event Metadata | | [**getEvents**](https://docs.kalshi.com/typescript-sdk/api/EventsApi#getevents) | **GET** /events | Get Events | [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#getevent) **getEvent** ================================================================================== > GetEventResponse getEvent() Get data about an event by its ticker. An event represents a real-world occurrence that can be traded on, such as an election, sports game, or economic indicator release. Events contain one or more markets where users can place trades on different outcomes. ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#example) Example Report incorrect code Copy Ask AI import { EventsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new EventsApi(configuration); let eventTicker: string; //Event ticker (default to undefined) let withNestedMarkets: boolean; //If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. (optional) (default to false) const { status, data } = await apiInstance.getEvent( eventTicker, withNestedMarkets ); ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **eventTicker** | \[**string**\] | Event ticker | defaults to undefined | | **withNestedMarkets** | \[**boolean**\] | If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. | (optional) defaults to false | ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#return-type) Return type **GetEventResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#authorization) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-request-headers) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Event retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/EventsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#geteventmetadata) **getEventMetadata** ================================================================================================== > GetEventMetadataResponse getEventMetadata() Get metadata about an event by its ticker ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#example-2) Example Report incorrect code Copy Ask AI import { EventsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new EventsApi(configuration); let eventTicker: string; //Event ticker (default to undefined) const { status, data } = await apiInstance.getEventMetadata( eventTicker ); ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **eventTicker** | \[**string**\] | Event ticker | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#return-type-2) Return type **GetEventMetadataResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#authorization-2) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Event metadata retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/EventsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#getevents) **getEvents** ==================================================================================== > GetEventsResponse getEvents() Get data about all events. An event represents a real-world occurrence that can be traded on, such as an election, sports game, or economic indicator release. Events contain one or more markets where users can place trades on different outcomes. This endpoint returns a paginated response. Use the ‘limit’ parameter to control page size (1-200, defaults to 100). The response includes a ‘cursor’ field - pass this value in the ‘cursor’ parameter of your next request to get the next page. An empty cursor indicates no more pages are available. ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#example-3) Example Report incorrect code Copy Ask AI import { EventsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new EventsApi(configuration); let limit: number; //Number of results per page. Defaults to 100. Maximum value is 200. (optional) (default to 100) let cursor: string; //Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. (optional) (default to undefined) let withNestedMarkets: boolean; //If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. (optional) (default to false) let status: string; //Filter by status. Possible values depend on the endpoint. (optional) (default to undefined) let seriesTicker: string; //Filter by series ticker (optional) (default to undefined) let minCloseTs: number; //Filter items that close after this Unix timestamp (optional) (default to undefined) const { status, data } = await apiInstance.getEvents( limit, cursor, withNestedMarkets, status, seriesTicker, minCloseTs ); ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | \[**number**\] | Number of results per page. Defaults to 100. Maximum value is 200. | (optional) defaults to 100 | | **cursor** | \[**string**\] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined | | **withNestedMarkets** | \[**boolean**\] | If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. | (optional) defaults to false | | **status** | \[**string**\] | Filter by status. Possible values depend on the endpoint. | (optional) defaults to undefined | | **seriesTicker** | \[**string**\] | Filter by series ticker | (optional) defaults to undefined | | **minCloseTs** | \[**number**\] | Filter items that close after this Unix timestamp | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#return-type-3) Return type **GetEventsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#authorization-3) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-request-headers-3) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/EventsApi#http-response-details-3) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Events retrieved successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/EventsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [Communications](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi) [Series](https://docs.kalshi.com/typescript-sdk/api/SeriesApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # MultivariateCollections - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes MultivariateCollections [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [getMultivariateEventCollection](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#getmultivariateeventcollection) * [Example](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#example) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-response-details) * [getMultivariateEventCollections](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#getmultivariateeventcollections) * [Example](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#example-2) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-response-details-2) * [lookupMultivariateEventCollectionBundle](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#lookupmultivariateeventcollectionbundle) * [Example](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#example-3) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#parameters-3) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#return-type-3) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#authorization-3) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-request-headers-3) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-response-details-3) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**getMultivariateEventCollection**](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#getmultivariateeventcollection) | **GET** /multivariate\_event\_collections/ | Get Multivariate Event Collection | | [**getMultivariateEventCollections**](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#getmultivariateeventcollections) | **GET** /multivariate\_event\_collections | Get Multivariate Event Collections | | [**lookupMultivariateEventCollectionBundle**](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#lookupmultivariateeventcollectionbundle) | **POST** /multivariate\_event\_collections//lookup | Lookup Multivariate Event Collection Bundle | [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#getmultivariateeventcollection) **getMultivariateEventCollection** =============================================================================================================================================== > GetMultivariateEventCollectionResponse getMultivariateEventCollection() Get a single multivariate event collection by ticker ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#example) Example Report incorrect code Copy Ask AI import { MultivariateCollectionsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MultivariateCollectionsApi(configuration); let collectionTicker: string; //Collection ticker (default to undefined) const { status, data } = await apiInstance.getMultivariateEventCollection( collectionTicker ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **collectionTicker** | \[**string**\] | Collection ticker | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#return-type) Return type **GetMultivariateEventCollectionResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#authorization) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-request-headers) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Collection retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#getmultivariateeventcollections) **getMultivariateEventCollections** ================================================================================================================================================= > GetMultivariateEventCollectionsResponse getMultivariateEventCollections() Get all multivariate event collections ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#example-2) Example Report incorrect code Copy Ask AI import { MultivariateCollectionsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MultivariateCollectionsApi(configuration); let status: string; //Filter by multivariate collection status (optional) (default to undefined) const { status, data } = await apiInstance.getMultivariateEventCollections( status ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **status** | \[**string**\] | Filter by multivariate collection status | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#return-type-2) Return type **GetMultivariateEventCollectionsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#authorization-2) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Collections retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#lookupmultivariateeventcollectionbundle) **lookupMultivariateEventCollectionBundle** ================================================================================================================================================================= > LookupBundleResponse lookupMultivariateEventCollectionBundle(lookupBundleRequest) Lookup a bundle in a multivariate event collection ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#example-3) Example Report incorrect code Copy Ask AI import { MultivariateCollectionsApi, Configuration, LookupBundleRequest } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MultivariateCollectionsApi(configuration); let collectionTicker: string; //Collection ticker (default to undefined) let lookupBundleRequest: LookupBundleRequest; // const { status, data } = await apiInstance.lookupMultivariateEventCollectionBundle( collectionTicker, lookupBundleRequest ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **lookupBundleRequest** | **LookupBundleRequest** | | | | **collectionTicker** | \[**string**\] | Collection ticker | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#return-type-3) Return type **LookupBundleResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#authorization-3) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-request-headers-3) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#http-response-details-3) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Bundle lookup successful | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MultivariateCollectionsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [Milestones](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi) [StructuredTargets](https://docs.kalshi.com/typescript-sdk/api/StructuredTargetsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Communications - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Communications [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [acceptQuote](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#acceptquote) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details) * [confirmQuote](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#confirmquote) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-2) * [createQuote](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#createquote) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-3) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-3) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-3) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-3) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-3) * [createRFQ](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#createrfq) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-4) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-4) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-4) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-4) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-4) * [deleteQuote](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#deletequote) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-5) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-5) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-5) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-5) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-5) * [deleteRFQ](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#deleterfq) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-6) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-6) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-6) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-6) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-6) * [getCommunicationsID](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getcommunicationsid) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-7) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-7) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-7) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-7) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-7) * [getQuote](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getquote) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-8) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-8) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-8) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-8) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-8) * [getQuotes](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getquotes) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-9) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-9) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-9) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-9) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-9) * [getRFQ](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getrfq) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-10) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-10) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-10) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-10) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-10) * [getRFQs](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getrfqs) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-11) * [Return type](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-11) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-11) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-11) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-11) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**acceptQuote**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#acceptquote) | **PUT** /communications/quotes//accept | Accept Quote | | [**confirmQuote**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#confirmquote) | **PUT** /communications/quotes//confirm | Confirm Quote | | [**createQuote**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#createquote) | **POST** /communications/quotes | Create Quote | | [**createRFQ**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#createrfq) | **POST** /communications/rfqs | Create RFQ | | [**deleteQuote**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#deletequote) | **DELETE** /communications/quotes/ | Delete Quote | | [**deleteRFQ**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#deleterfq) | **DELETE** /communications/rfqs/ | Delete RFQ | | [**getCommunicationsID**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getcommunicationsid) | **GET** /communications/id | Get Communications ID | | [**getQuote**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getquote) | **GET** /communications/quotes/ | Get Quote | | [**getQuotes**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getquotes) | **GET** /communications/quotes | Get Quotes | | [**getRFQ**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getrfq) | **GET** /communications/rfqs/ | Get RFQ | | [**getRFQs**](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getrfqs) | **GET** /communications/rfqs | Get RFQs | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#acceptquote) **acceptQuote** ================================================================================================ > acceptQuote(acceptQuoteRequest) Endpoint for accepting a quote. This will require the quoter to confirm ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **acceptQuoteRequest** | **AcceptQuoteRequest** | | | | **quoteId** | \[**string**\] | Quote ID | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type) Return type void (empty response body) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **204** | Quote accepted successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#confirmquote) **confirmQuote** ================================================================================================== > confirmQuote() Endpoint for confirming a quote. This will start a timer for order execution ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **body** | **object** | | | | **quoteId** | \[**string**\] | Quote ID | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-2) Return type void (empty response body) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-2) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-2) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **204** | Quote confirmed successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#createquote) **createQuote** ================================================================================================ > CreateQuoteResponse createQuote(createQuoteRequest) Endpoint for creating a quote in response to an RFQ ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **createQuoteRequest** | **CreateQuoteRequest** | | | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-3) Return type **CreateQuoteResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-3) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-3) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-3) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **201** | Quote created successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#createrfq) **createRFQ** ============================================================================================ > CreateRFQResponse createRFQ(createRFQRequest) Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **createRFQRequest** | **CreateRFQRequest** | | | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-4) Return type **CreateRFQResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-4) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-4) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-4) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **201** | RFQ created successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **409** | Conflict - resource already exists or cannot be modified | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#deletequote) **deleteQuote** ================================================================================================ > deleteQuote() Endpoint for deleting a quote, which means it can no longer be accepted. ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-5) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **quoteId** | \[**string**\] | Quote ID | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-5) Return type void (empty response body) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-5) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-5) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-5) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **204** | Quote deleted successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#deleterfq) **deleteRFQ** ============================================================================================ > deleteRFQ() Endpoint for deleting an RFQ by ID ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-6) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **rfqId** | \[**string**\] | RFQ ID | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-6) Return type void (empty response body) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-6) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-6) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-6) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **204** | RFQ deleted successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getcommunicationsid) **getCommunicationsID** ================================================================================================================ > GetCommunicationsIDResponse getCommunicationsID() Endpoint for getting the communications ID of the logged-in user. ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-7) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-7) Return type **GetCommunicationsIDResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-7) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-7) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-7) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Communications ID retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getquote) **getQuote** ========================================================================================== > GetQuoteResponse getQuote() Endpoint for getting a particular quote ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-8) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **quoteId** | \[**string**\] | Quote ID | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-8) Return type **GetQuoteResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-8) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-8) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-8) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Quote retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getquotes) **getQuotes** ============================================================================================ > GetQuotesResponse getQuotes() Endpoint for getting quotes ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-9) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **cursor** | \[**string**\] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined | | **eventTicker** | \[**string**\] | Event ticker to filter by. Only a single event ticker is supported. | (optional) defaults to undefined | | **marketTicker** | \[**string**\] | Filter by market ticker | (optional) defaults to undefined | | **limit** | \[**number**\] | Parameter to specify the number of results per page. Defaults to 500. | (optional) defaults to 500 | | **status** | \[**string**\] | Filter quotes by status | (optional) defaults to undefined | | **quoteCreatorUserId** | \[**string**\] | Filter quotes by quote creator user ID | (optional) defaults to undefined | | **rfqCreatorUserId** | \[**string**\] | Filter quotes by RFQ creator user ID | (optional) defaults to undefined | | **rfqCreatorSubtraderId** | \[**string**\] | Filter quotes by RFQ creator subtrader ID (FCM members only) | (optional) defaults to undefined | | **rfqId** | \[**string**\] | Filter quotes by RFQ ID | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-9) Return type **GetQuotesResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-9) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-9) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-9) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Quotes retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getrfq) **getRFQ** ====================================================================================== > GetRFQResponse getRFQ() Endpoint for getting a single RFQ by id ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-10) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **rfqId** | \[**string**\] | RFQ ID | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-10) Return type **GetRFQResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-10) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-10) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-10) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | RFQ retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#getrfqs) **getRFQs** ======================================================================================== > GetRFQsResponse getRFQs() Endpoint for getting RFQs ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#parameters-11) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **cursor** | \[**string**\] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined | | **eventTicker** | \[**string**\] | Event ticker to filter by. Only a single event ticker is supported. | (optional) defaults to undefined | | **marketTicker** | \[**string**\] | Filter by market ticker | (optional) defaults to undefined | | **subaccount** | \[**number**\] | Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. | (optional) defaults to undefined | | **limit** | \[**number**\] | Parameter to specify the number of results per page. Defaults to 100. | (optional) defaults to 100 | | **status** | \[**string**\] | Filter RFQs by status | (optional) defaults to undefined | | **creatorUserId** | \[**string**\] | Filter RFQs by creator user ID | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#return-type-11) Return type **GetRFQsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#authorization-11) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-request-headers-11) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi#http-response-details-11) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | RFQs retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [Markets](https://docs.kalshi.com/typescript-sdk/api/MarketsApi) [Events](https://docs.kalshi.com/typescript-sdk/api/EventsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Quick Start: Market Data (No SDK) - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/quick_start_market_data#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Quick Start: Market Data (No SDK) [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Making Unauthenticated Requests](https://docs.kalshi.com/getting_started/quick_start_market_data#making-unauthenticated-requests) * [Step 1: Get Series Information](https://docs.kalshi.com/getting_started/quick_start_market_data#step-1-get-series-information) * [Step 2: Get Today’s Events and Markets](https://docs.kalshi.com/getting_started/quick_start_market_data#step-2-get-today%E2%80%99s-events-and-markets) * [Step 3: Get Orderbook Data](https://docs.kalshi.com/getting_started/quick_start_market_data#step-3-get-orderbook-data) * [Working with Large Datasets](https://docs.kalshi.com/getting_started/quick_start_market_data#working-with-large-datasets) * [Understanding Orderbook Responses](https://docs.kalshi.com/getting_started/quick_start_market_data#understanding-orderbook-responses) * [Next Steps](https://docs.kalshi.com/getting_started/quick_start_market_data#next-steps) This guide will walk you through accessing Kalshi’s public market data endpoints without authentication. You’ll learn how to retrieve series information, events, markets, and orderbook data for the popular “Who will have a higher net approval” market. [​](https://docs.kalshi.com/getting_started/quick_start_market_data#making-unauthenticated-requests) Making Unauthenticated Requests --------------------------------------------------------------------------------------------------------------------------------------- Kalshi provides several public endpoints that don’t require API keys. These endpoints allow you to access market data directly from our production servers at `https://api.elections.kalshi.com/trade-api/v2`. **Note about the API URL**: Despite the “elections” subdomain, `api.elections.kalshi.com` provides access to ALL Kalshi markets - not just election-related ones. This includes markets on economics, climate, technology, entertainment, and more. No authentication headers are required for the endpoints in this guide. You can start making requests immediately! [​](https://docs.kalshi.com/getting_started/quick_start_market_data#step-1-get-series-information) Step 1: Get Series Information ------------------------------------------------------------------------------------------------------------------------------------ Let’s start by fetching information about the KXHIGHNY series ([Highest temperature in NYC today?](https://kalshi.com/markets/kxhighny/highest-temperature-in-nyc) ). This series tracks the highest temperature recorded in Central Park, New York on a given day. We’ll use the [Get Series](https://docs.kalshi.com/api-reference/market/get-series) endpoint. Python JavaScript cURL Report incorrect code Copy Ask AI import requests # Get series information for KXHIGHNY url = "https://api.elections.kalshi.com/trade-api/v2/series/KXHIGHNY" response = requests.get(url) series_data = response.json() print(f"Series Title: {series_data['series']['title']}") print(f"Frequency: {series_data['series']['frequency']}") print(f"Category: {series_data['series']['category']}") [​](https://docs.kalshi.com/getting_started/quick_start_market_data#step-2-get-today%E2%80%99s-events-and-markets) Step 2: Get Today’s Events and Markets ------------------------------------------------------------------------------------------------------------------------------------------------------------ Now that we have the series information, let’s get the markets for this series. We’ll use the [Get Markets](https://docs.kalshi.com/api-reference/market/get-markets) endpoint with the series ticker filter to find all active markets. If there are no open markets today, remove `status=open` or use `status=all` to see the full series history. Python JavaScript Report incorrect code Copy Ask AI # Get all open markets for the KXHIGHNY series markets_url = f"https://api.elections.kalshi.com/trade-api/v2/markets?series_ticker=KXHIGHNY&status=open" markets_response = requests.get(markets_url) markets_data = markets_response.json() print(f"\nActive markets in KXHIGHNY series:") for market in markets_data['markets']: print(f"- {market['ticker']}: {market['title']}") print(f" Event: {market['event_ticker']}") print(f" Yes Price: {market['yes_price']}¢ | Volume: {market['volume']}") print() # Get details for a specific event if you have its ticker if markets_data['markets']: # Let's get details for the first market's event event_ticker = markets_data['markets'][0]['event_ticker'] event_url = f"https://api.elections.kalshi.com/trade-api/v2/events/{event_ticker}" event_response = requests.get(event_url) event_data = event_response.json() print(f"Event Details:") print(f"Title: {event_data['event']['title']}") print(f"Category: {event_data['event']['category']}") You can view these markets in the Kalshi UI at: [https://kalshi.com/markets/kxhighny](https://kalshi.com/markets/kxhighny) [​](https://docs.kalshi.com/getting_started/quick_start_market_data#step-3-get-orderbook-data) Step 3: Get Orderbook Data ---------------------------------------------------------------------------------------------------------------------------- Now let’s fetch the orderbook for a specific market to see the current bids and asks using the [Get Market Orderbook](https://docs.kalshi.com/api-reference/market/get-market-order-book) endpoint. This snippet assumes you still have the `markets_data` from the previous step. If `markets_data['markets']` is empty, pick a market from a different series or remove the `status=open` filter. Python JavaScript Report incorrect code Copy Ask AI # Get orderbook for a specific market # Replace with an actual market ticker from the markets list if not markets_data['markets']: raise ValueError("No open markets found. Try removing status=open or choose another series.") market_ticker = markets_data['markets'][0]['ticker'] orderbook_url = f"https://api.elections.kalshi.com/trade-api/v2/markets/{market_ticker}/orderbook" orderbook_response = requests.get(orderbook_url) orderbook_data = orderbook_response.json() print(f"\nOrderbook for {market_ticker}:") print("YES BIDS:") for bid in orderbook_data['orderbook']['yes'][:5]: # Show top 5 print(f" Price: {bid[0]}¢, Quantity: {bid[1]}") print("\nNO BIDS:") for bid in orderbook_data['orderbook']['no'][:5]: # Show top 5 print(f" Price: {bid[0]}¢, Quantity: {bid[1]}") [​](https://docs.kalshi.com/getting_started/quick_start_market_data#working-with-large-datasets) Working with Large Datasets ------------------------------------------------------------------------------------------------------------------------------- The Kalshi API uses cursor-based pagination to handle large datasets efficiently. To learn more about navigating through paginated responses, see our [Understanding Pagination](https://docs.kalshi.com/getting_started/pagination) guide. [​](https://docs.kalshi.com/getting_started/quick_start_market_data#understanding-orderbook-responses) Understanding Orderbook Responses ------------------------------------------------------------------------------------------------------------------------------------------- Kalshi’s orderbook structure is unique due to the nature of binary prediction markets. The API only returns bids (not asks) because of the reciprocal relationship between YES and NO positions. To learn more about orderbook responses and why they work this way, see our [Orderbook Responses](https://docs.kalshi.com/getting_started/orderbook_responses) guide. [​](https://docs.kalshi.com/getting_started/quick_start_market_data#next-steps) Next Steps --------------------------------------------------------------------------------------------- Now that you understand how to access market data without authentication, you can: 1. Explore other public series and events 2. Build real-time market monitoring tools 3. Create market analysis dashboards 4. Set up a WebSocket connection for live updates (requires authentication) For authenticated endpoints that allow trading and portfolio management, check out our [API Keys guide](https://docs.kalshi.com/getting_started/api_keys) . [Quick Start: Authenticated Requests (No SDK)](https://docs.kalshi.com/getting_started/quick_start_authenticated_requests) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Portfolio - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Portfolio [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [applySubaccountTransfer](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#applysubaccounttransfer) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details) * [createSubaccount](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#createsubaccount) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-2) * [getBalance](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getbalance) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-3) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-3) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-3) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-3) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-3) * [getFills](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getfills) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-4) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-4) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-4) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-4) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-4) * [getPortfolioRestingOrderTotalValue](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getportfoliorestingordertotalvalue) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-5) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-5) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-5) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-5) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-5) * [getPositions](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getpositions) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-6) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-6) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-6) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-6) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-6) * [getSettlements](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsettlements) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-7) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-7) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-7) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-7) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-7) * [getSubaccountBalances](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccountbalances) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-8) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-8) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-8) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-8) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-8) * [getSubaccountNetting](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccountnetting) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-9) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-9) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-9) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-9) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-9) * [getSubaccountTransfers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccounttransfers) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-10) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-10) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-10) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-10) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-10) * [updateSubaccountNetting](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#updatesubaccountnetting) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-11) * [Return type](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-11) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-11) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-11) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-11) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**applySubaccountTransfer**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#applysubaccounttransfer) | **POST** /portfolio/subaccounts/transfer | Transfer Between Subaccounts | | [**createSubaccount**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#createsubaccount) | **POST** /portfolio/subaccounts | Create Subaccount | | [**getBalance**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getbalance) | **GET** /portfolio/balance | Get Balance | | [**getFills**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getfills) | **GET** /portfolio/fills | Get Fills | | [**getPortfolioRestingOrderTotalValue**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getportfoliorestingordertotalvalue) | **GET** /portfolio/summary/total\_resting\_order\_value | Get Total Resting Order Value | | [**getPositions**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getpositions) | **GET** /portfolio/positions | Get Positions | | [**getSettlements**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsettlements) | **GET** /portfolio/settlements | Get Settlements | | [**getSubaccountBalances**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccountbalances) | **GET** /portfolio/subaccounts/balances | Get All Subaccount Balances | | [**getSubaccountNetting**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccountnetting) | **GET** /portfolio/subaccounts/netting | Get Subaccount Netting | | [**getSubaccountTransfers**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccounttransfers) | **GET** /portfolio/subaccounts/transfers | Get Subaccount Transfers | | [**updateSubaccountNetting**](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#updatesubaccountnetting) | **PUT** /portfolio/subaccounts/netting | Update Subaccount Netting | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#applysubaccounttransfer) **applySubaccountTransfer** =================================================================================================================== > object applySubaccountTransfer(applySubaccountTransferRequest) Transfers funds between the authenticated user’s subaccounts. Use 0 for the primary account, or 1-32 for numbered subaccounts. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **applySubaccountTransferRequest** | **ApplySubaccountTransferRequest** | | | ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type) Return type **object** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Transfer completed successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#createsubaccount) **createSubaccount** ===================================================================================================== > CreateSubaccountResponse createSubaccount() Creates a new subaccount for the authenticated user. Subaccounts are numbered sequentially starting from 1. Maximum 32 subaccounts per user. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-2) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-2) Return type **CreateSubaccountResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-2) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **201** | Subaccount created successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getbalance) **getBalance** ========================================================================================= > GetBalanceResponse getBalance() Endpoint for getting the balance and portfolio value of a member. Both values are returned in cents. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **subaccount** | \[**number**\] | Subaccount number (0 for primary, 1-32 for subaccounts). Defaults to 0. | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-3) Return type **GetBalanceResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-3) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-3) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-3) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Balance retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getfills) **getFills** ===================================================================================== > GetFillsResponse getFills() Endpoint for getting all fills for the member. A fill is when a trade you have is matched. Fills that occurred before the historical cutoff are only available via `GET /historical/fills`. See [Historical Data](https://kalshi.com/docs/getting_started/historical_data) for details. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | \[**string**\] | Filter by market ticker | (optional) defaults to undefined | | **orderId** | \[**string**\] | Filter by order ID | (optional) defaults to undefined | | **minTs** | \[**number**\] | Filter items after this Unix timestamp | (optional) defaults to undefined | | **maxTs** | \[**number**\] | Filter items before this Unix timestamp | (optional) defaults to undefined | | **limit** | \[**number**\] | Number of results per page. Defaults to 100. Maximum value is 200. | (optional) defaults to 100 | | **cursor** | \[**string**\] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined | | **subaccount** | \[**number**\] | Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-4) Return type **GetFillsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-4) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-4) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-4) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Fills retrieved successfully | \- | | **400** | Bad request | \- | | **401** | Unauthorized | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getportfoliorestingordertotalvalue) **getPortfolioRestingOrderTotalValue** ========================================================================================================================================= > GetPortfolioRestingOrderTotalValueResponse getPortfolioRestingOrderTotalValue() Endpoint for getting the total value, in cents, of resting orders. This endpoint is only intended for use by FCM members (rare). Note: If you’re uncertain about this endpoint, it likely does not apply to you. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-5) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-5) Return type **GetPortfolioRestingOrderTotalValueResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-5) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-5) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-5) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Total resting order value retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getpositions) **getPositions** ============================================================================================= > GetPositionsResponse getPositions() Restricts the positions to those with any of following fields with non-zero values, as a comma separated list. The following values are accepted: position, total\_traded ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-6) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **cursor** | \[**string**\] | The Cursor represents a pointer to the next page of records in the pagination. Use the value returned from the previous response to get the next page. | (optional) defaults to undefined | | **limit** | \[**number**\] | Parameter to specify the number of results per page. Defaults to 100. | (optional) defaults to 100 | | **countFilter** | \[**string**\] | Restricts the positions to those with any of following fields with non-zero values, as a comma separated list. The following values are accepted - position, total\_traded | (optional) defaults to undefined | | **ticker** | \[**string**\] | Filter by market ticker | (optional) defaults to undefined | | **eventTicker** | \[**string**\] | Event ticker to filter by. Only a single event ticker is supported. | (optional) defaults to undefined | | **subaccount** | \[**number**\] | Subaccount number (0 for primary, 1-32 for subaccounts). Defaults to 0. | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-6) Return type **GetPositionsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-6) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-6) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-6) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Positions retrieved successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsettlements) **getSettlements** ================================================================================================= > GetSettlementsResponse getSettlements() Endpoint for getting the member’s settlements historical track. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-7) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | \[**number**\] | Number of results per page. Defaults to 100. Maximum value is 200. | (optional) defaults to 100 | | **cursor** | \[**string**\] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined | | **ticker** | \[**string**\] | Filter by market ticker | (optional) defaults to undefined | | **eventTicker** | \[**string**\] | Event ticker to filter by. Only a single event ticker is supported. | (optional) defaults to undefined | | **minTs** | \[**number**\] | Filter items after this Unix timestamp | (optional) defaults to undefined | | **maxTs** | \[**number**\] | Filter items before this Unix timestamp | (optional) defaults to undefined | | **subaccount** | \[**number**\] | Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-7) Return type **GetSettlementsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-7) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-7) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-7) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Settlements retrieved successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccountbalances) **getSubaccountBalances** =============================================================================================================== > GetSubaccountBalancesResponse getSubaccountBalances() Gets balances for all subaccounts including the primary account. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-8) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-8) Return type **GetSubaccountBalancesResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-8) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-8) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-8) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Balances retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccountnetting) **getSubaccountNetting** ============================================================================================================= > GetSubaccountNettingResponse getSubaccountNetting() Gets the netting enabled settings for all subaccounts. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-9) Parameters This endpoint does not have any parameters. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-9) Return type **GetSubaccountNettingResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-9) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-9) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-9) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Netting settings retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#getsubaccounttransfers) **getSubaccountTransfers** ================================================================================================================= > GetSubaccountTransfersResponse getSubaccountTransfers() Gets a paginated list of all transfers between subaccounts for the authenticated user. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-10) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | \[**number**\] | Number of results per page. Defaults to 100. Maximum value is 200. | (optional) defaults to 100 | | **cursor** | \[**string**\] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-10) Return type **GetSubaccountTransfersResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-10) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-10) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-10) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Transfers retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#updatesubaccountnetting) **updateSubaccountNetting** =================================================================================================================== > updateSubaccountNetting(updateSubaccountNettingRequest) Updates the netting enabled setting for a specific subaccount. Use 0 for the primary account, or 1-32 for numbered subaccounts. ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#parameters-11) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **updateSubaccountNettingRequest** | **UpdateSubaccountNettingRequest** | | | ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#return-type-11) Return type void (empty response body) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#authorization-11) Authorization [kalshiAccessSignature](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessSignature) , [kalshiAccessKey](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessKey) , [kalshiAccessTimestamp](https://docs.kalshi.com/typescript-sdk/README.md#kalshiAccessTimestamp) ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-request-headers-11) HTTP request headers * **Content-Type**: application/json * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi#http-response-details-11) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Netting setting updated successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [TypeScript SDK Quick Start](https://docs.kalshi.com/sdks/typescript/quickstart) [Markets](https://docs.kalshi.com/typescript-sdk/api/MarketsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # WebSocket Connection - API Documentation [Skip to main content](https://docs.kalshi.com/websockets/websocket-connection#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Websockets WebSocket Connection [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Messages Subscribe Command { "id": 1, "cmd": "subscribe", "params": { "channels": [ "orderbook_delta" ], "market_ticker": "CPI-22DEC-TN0.1" }} Unsubscribe Command { "id": 124, "cmd": "unsubscribe", "params": { "sids": [ 1, 2 ] }} List Subscriptions Command { "id": 3, "cmd": "list_subscriptions"} Update Subscription - Add Markets { "id": 124, "cmd": "update_subscription", "params": { "sids": [ 456 ], "market_tickers": [ "NEW-MARKET-1", "NEW-MARKET-2" ], "action": "add_markets" }} Update Subscription - Delete Markets { "id": 125, "cmd": "update_subscription", "params": { "sids": [ 456 ], "market_tickers": [ "MARKET-TO-REMOVE-1", "MARKET-TO-REMOVE-2" ], "action": "delete_markets" }} Update Subscription - Single SID Format { "id": 126, "cmd": "update_subscription", "params": { "sid": 456, "market_tickers": [ "NEW-MARKET-3", "NEW-MARKET-4" ], "action": "add_markets" }} Subscribed Response { "id": 1, "type": "subscribed", "msg": { "channel": "orderbook_delta", "sid": 1 }} Unsubscribed Response { "id": 102, "sid": 2, "seq": 7, "type": "unsubscribed"} OK Response { "id": 123, "sid": 456, "seq": 222, "type": "ok", "msg": { "market_tickers": [ "MARKET-1", "MARKET-2", "MARKET-3" ] }} List Subscriptions Response { "id": 3, "type": "ok", "msg": [ { "channel": "orderbook_delta", "sid": 1 }, { "channel": "ticker", "sid": 2 }, { "channel": "fill", "sid": 3 } ]} Error Response { "id": 123, "type": "error", "msg": { "code": 6, "msg": "Already subscribed" }} WSS Messages Subscribe Command { "id": 1, "cmd": "subscribe", "params": { "channels": [ "orderbook_delta" ], "market_ticker": "CPI-22DEC-TN0.1" }} Unsubscribe Command { "id": 124, "cmd": "unsubscribe", "params": { "sids": [ 1, 2 ] }} List Subscriptions Command { "id": 3, "cmd": "list_subscriptions"} Update Subscription - Add Markets { "id": 124, "cmd": "update_subscription", "params": { "sids": [ 456 ], "market_tickers": [ "NEW-MARKET-1", "NEW-MARKET-2" ], "action": "add_markets" }} Update Subscription - Delete Markets { "id": 125, "cmd": "update_subscription", "params": { "sids": [ 456 ], "market_tickers": [ "MARKET-TO-REMOVE-1", "MARKET-TO-REMOVE-2" ], "action": "delete_markets" }} Update Subscription - Single SID Format { "id": 126, "cmd": "update_subscription", "params": { "sid": 456, "market_tickers": [ "NEW-MARKET-3", "NEW-MARKET-4" ], "action": "add_markets" }} Subscribed Response { "id": 1, "type": "subscribed", "msg": { "channel": "orderbook_delta", "sid": 1 }} Unsubscribed Response { "id": 102, "sid": 2, "seq": 7, "type": "unsubscribed"} OK Response { "id": 123, "sid": 456, "seq": 222, "type": "ok", "msg": { "market_tickers": [ "MARKET-1", "MARKET-2", "MARKET-3" ] }} List Subscriptions Response { "id": 3, "type": "ok", "msg": [ { "channel": "orderbook_delta", "sid": 1 }, { "channel": "ticker", "sid": 2 }, { "channel": "fill", "sid": 3 } ]} Error Response { "id": 123, "type": "error", "msg": { "code": 6, "msg": "Already subscribed" }} Security Schemes apiKey type:apiKey API key authentication required for WebSocket connections. The API key should be provided during the WebSocket handshake. Bindings method type:string GET Send Subscribe Command type:object show 3 properties Subscribe to one or more channels Unsubscribe Command type:object show 3 properties Cancel one or more subscriptions List Subscriptions Command type:object show 2 properties List all active subscriptions Update Subscription - Add Markets type:object show 3 properties Add markets to an existing subscription Update Subscription - Delete Markets type:object show 3 properties Remove markets from an existing subscription Update Subscription - Single SID Format type:object show 3 properties Update subscription using sid parameter instead of sids array Receive Subscribed Response type:object show 3 properties Confirmation that subscription was successful Unsubscribed Response type:object show 4 properties Confirmation that unsubscription was successful OK Response type:object show 5 properties Successful update operation response List Subscriptions Response type:object show 3 properties Response containing all active subscriptions Error Response type:object show 3 properties Error response for failed operations [Connection Keep-Alive](https://docs.kalshi.com/websockets/connection-keep-alive) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Introduction - API Documentation [Skip to main content](https://docs.kalshi.com/welcome#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Introduction [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Welcome to Kalshi’s API Documentation ===================================== This documentation covers the Kalshi Exchange API for real-time market data and trade execution By continuing to use or access Kalshi’s API, you are agreeing to be bound to our [Developer Agreement](https://kalshi.com/developer-agreement) [Making Your First Request\ -------------------------\ \ Make your first API call and start trading on Kalshi.](https://docs.kalshi.com/getting_started/making_your_first_request) [OpenAPI Specification\ ---------------------\ \ Download the OpenAPI specification for API integration.](https://docs.kalshi.com/openapi.yaml) [Demo Environment\ ----------------\ \ Test your integration in our safe demo environment.](https://docs.kalshi.com/getting_started/demo_env) [Rate Limits\ -----------\ \ Understand API rate limits and best practices.](https://docs.kalshi.com/getting_started/rate_limits) [API Reference\ -------------\ \ Explore our complete API documentation.](https://docs.kalshi.com/api-reference) [Changelog\ ---------\ \ Stay updated with the latest API changes.](https://docs.kalshi.com/changelog) [Kalshi Glossary\ ---------------\ \ Learn key terms and concepts used in the Kalshi exchange.](https://docs.kalshi.com/getting_started/terms) [WebSocket API\ -------------\ \ Learn about real-time data streaming via WebSockets.](https://docs.kalshi.com/getting_started/quick_start_websockets) [Market Data\ -----------\ \ Quick start guide for accessing market data.](https://docs.kalshi.com/getting_started/quick_start_market_data) Learn more about Kalshi ----------------------- [API Keys\ --------\ \ Learn how to generate and manage your API credentials.](https://docs.kalshi.com/getting_started/api_keys) [AsyncAPI Specification\ ----------------------\ \ Download the AsyncAPI specification for WebSocket integration.](https://docs.kalshi.com/asyncapi.yaml) [Trading Console\ ---------------\ \ Access the Kalshi trading platform.](https://kalshi.com/) [Kalshi Academy\ --------------\ \ Explore educational resources and tutorials.](https://help.kalshi.com/) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Series - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Series [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [getSeries](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#getseries) * [Example](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#example) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#http-response-details) * [getSeriesByTicker](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#getseriesbyticker) * [Example](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#example-2) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#http-response-details-2) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**getSeries**](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#getseries) | **GET** /series | Get Series | | [**getSeriesByTicker**](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#getseriesbyticker) | **GET** /series/ | Get Series by Ticker | [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#getseries) **getSeries** ==================================================================================== > GetSeriesResponse getSeries() Get all market series ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#example) Example Report incorrect code Copy Ask AI import { SeriesApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new SeriesApi(configuration); let status: string; //Filter by series status (optional) (default to undefined) const { status, data } = await apiInstance.getSeries( status ); ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **status** | \[**string**\] | Filter by series status | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#return-type) Return type **GetSeriesResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#authorization) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#http-request-headers) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Series retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#getseriesbyticker) **getSeriesByTicker** ==================================================================================================== > GetSeriesByTickerResponse getSeriesByTicker() Get a single series by its ticker ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#example-2) Example Report incorrect code Copy Ask AI import { SeriesApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new SeriesApi(configuration); let ticker: string; //The series ticker (default to undefined) const { status, data } = await apiInstance.getSeriesByTicker( ticker ); ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | \[**string**\] | The series ticker | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#return-type-2) Return type **GetSeriesByTickerResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#authorization-2) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Series retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/SeriesApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [Events](https://docs.kalshi.com/typescript-sdk/api/EventsApi) [Milestones](https://docs.kalshi.com/typescript-sdk/api/MilestonesApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Quick Start: WebSockets (No SDK) - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/quick_start_websockets#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Quick Start: WebSockets (No SDK) [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Overview](https://docs.kalshi.com/getting_started/quick_start_websockets#overview) * [Connection URL](https://docs.kalshi.com/getting_started/quick_start_websockets#connection-url) * [Authentication](https://docs.kalshi.com/getting_started/quick_start_websockets#authentication) * [Required Headers](https://docs.kalshi.com/getting_started/quick_start_websockets#required-headers) * [Signing the WebSocket Request](https://docs.kalshi.com/getting_started/quick_start_websockets#signing-the-websocket-request) * [Establishing a Connection](https://docs.kalshi.com/getting_started/quick_start_websockets#establishing-a-connection) * [Subscribing to Data](https://docs.kalshi.com/getting_started/quick_start_websockets#subscribing-to-data) * [Processing Messages](https://docs.kalshi.com/getting_started/quick_start_websockets#processing-messages) * [Connection Keep-Alive](https://docs.kalshi.com/getting_started/quick_start_websockets#connection-keep-alive) * [Subscribing to Channels](https://docs.kalshi.com/getting_started/quick_start_websockets#subscribing-to-channels) * [Subscribe to Ticker Updates](https://docs.kalshi.com/getting_started/quick_start_websockets#subscribe-to-ticker-updates) * [Subscribe to Specific Markets](https://docs.kalshi.com/getting_started/quick_start_websockets#subscribe-to-specific-markets) * [Connection Lifecycle](https://docs.kalshi.com/getting_started/quick_start_websockets#connection-lifecycle) * [Error Handling](https://docs.kalshi.com/getting_started/quick_start_websockets#error-handling) * [WebSocket Error Codes](https://docs.kalshi.com/getting_started/quick_start_websockets#websocket-error-codes) * [Best Practices](https://docs.kalshi.com/getting_started/quick_start_websockets#best-practices) * [Complete Example](https://docs.kalshi.com/getting_started/quick_start_websockets#complete-example) * [Next Steps](https://docs.kalshi.com/getting_started/quick_start_websockets#next-steps) [​](https://docs.kalshi.com/getting_started/quick_start_websockets#overview) Overview ---------------------------------------------------------------------------------------- Kalshi’s WebSocket API provides real-time updates for: * Order book changes * Trade executions * Market status updates * Fill notifications [​](https://docs.kalshi.com/getting_started/quick_start_websockets#connection-url) Connection URL ---------------------------------------------------------------------------------------------------- Connect to the WebSocket endpoint at: Report incorrect code Copy Ask AI wss://api.elections.kalshi.com/trade-api/ws/v2 For the demo environment, use: Report incorrect code Copy Ask AI wss://demo-api.kalshi.co/trade-api/ws/v2 [​](https://docs.kalshi.com/getting_started/quick_start_websockets#authentication) Authentication ---------------------------------------------------------------------------------------------------- WebSocket connections support both authenticated and unauthenticated usage: * **Private channels (auth required):** `orderbook_delta`, `fill`, `market_positions`, `communications`, `order_group_updates` * **Public channels (no auth required):** `ticker`, `trade`, `market_lifecycle_v2`, `multivariate` You can still authenticate for public channels; the headers are only required if you subscribe to private channels. For detailed information about API key generation and request signing, see our [API Keys documentation](https://docs.kalshi.com/getting_started/api_keys) . ### [​](https://docs.kalshi.com/getting_started/quick_start_websockets#required-headers) Required Headers When establishing the WebSocket connection, include these headers: Report incorrect code Copy Ask AI KALSHI-ACCESS-KEY: your_api_key_id KALSHI-ACCESS-SIGNATURE: request_signature KALSHI-ACCESS-TIMESTAMP: unix_timestamp_in_milliseconds ### [​](https://docs.kalshi.com/getting_started/quick_start_websockets#signing-the-websocket-request) Signing the WebSocket Request The signature for WebSocket connections follows the same pattern as REST API requests: 1. **Create the message to sign:** Report incorrect code Copy Ask AI timestamp + "GET" + "/trade-api/ws/v2" 2. **Generate the signature** using your private key (see [API Keys documentation](https://docs.kalshi.com/getting_started/api_keys) ) 3. **Include the headers** when opening the WebSocket connection [​](https://docs.kalshi.com/getting_started/quick_start_websockets#establishing-a-connection) Establishing a Connection -------------------------------------------------------------------------------------------------------------------------- To connect to the WebSocket API, you need to: 1. Generate authentication headers (same as REST API) 2. Create a WebSocket connection with those headers 3. Handle the connection lifecycle Here’s how to establish an authenticated connection: Report incorrect code Copy Ask AI import websockets import asyncio # WebSocket URL ws_url = "wss://demo-api.kalshi.co/trade-api/ws/v2" # Demo environment # Generate authentication headers (see API Keys documentation) auth_headers = { "KALSHI-ACCESS-KEY": "your_api_key_id", "KALSHI-ACCESS-SIGNATURE": "generated_signature", "KALSHI-ACCESS-TIMESTAMP": "timestamp_in_milliseconds" } # Connect with authentication async def connect(): async with websockets.connect(ws_url, additional_headers=auth_headers) as websocket: print("Connected to Kalshi WebSocket") # Connection is now established # You can start sending and receiving messages # Listen for messages async for message in websocket: print(f"Received: {message}") # Run the connection asyncio.run(connect()) [​](https://docs.kalshi.com/getting_started/quick_start_websockets#subscribing-to-data) Subscribing to Data -------------------------------------------------------------------------------------------------------------- Once connected, subscribe to channels by sending a subscription command: Report incorrect code Copy Ask AI import json async def subscribe_to_ticker(websocket): """Subscribe to ticker updates""" subscription = { "id": 1, "cmd": "subscribe", "params": { "channels": ["ticker"] } } await websocket.send(json.dumps(subscription)) async def subscribe_to_orderbook(websocket, market_tickers): """Subscribe to orderbook updates for specific markets""" subscription = { "id": 2, "cmd": "subscribe", "params": { "channels": ["orderbook_delta"], "market_tickers": market_tickers } } await websocket.send(json.dumps(subscription)) [​](https://docs.kalshi.com/getting_started/quick_start_websockets#processing-messages) Processing Messages -------------------------------------------------------------------------------------------------------------- Handle incoming messages based on their type: Report incorrect code Copy Ask AI async def process_message(message): """Process incoming WebSocket messages""" data = json.loads(message) msg_type = data.get("type") if msg_type == "ticker": # Handle ticker update market = data["msg"]["market_ticker"] bid = data["msg"]["yes_bid"] ask = data["msg"]["yes_ask"] print(f"{market}: Yes Bid {bid}¢, Yes Ask {ask}¢") elif msg_type == "orderbook_snapshot": # Handle full orderbook state print(f"Orderbook snapshot for {data['msg']['market_ticker']}") elif msg_type == "orderbook_delta": # Handle orderbook changes print(f"Orderbook update for {data['msg']['market_ticker']}") # Note: client_order_id field is optional - present only when you caused this change if 'client_order_id' in data['msg']: print(f" Your order {data['msg']['client_order_id']} caused this change") elif msg_type == "error": error_code = data.get("msg", {}).get("code") error_msg = data.get("msg", {}).get("msg") print(f"Error {error_code}: {error_msg}") [​](https://docs.kalshi.com/getting_started/quick_start_websockets#connection-keep-alive) Connection Keep-Alive ------------------------------------------------------------------------------------------------------------------ The Python `websockets` library automatically handles WebSocket ping/pong frames to keep connections alive. No manual heartbeat handling is required. Learn more about [automatic keepalive in the websockets documentation](https://websockets.readthedocs.io/en/stable/topics/design.html#keepalive) .Other WebSocket libraries may require manual ping/pong implementation. [​](https://docs.kalshi.com/getting_started/quick_start_websockets#subscribing-to-channels) Subscribing to Channels ---------------------------------------------------------------------------------------------------------------------- Once connected, subscribe to specific data channels: ### [​](https://docs.kalshi.com/getting_started/quick_start_websockets#subscribe-to-ticker-updates) Subscribe to Ticker Updates To receive real-time ticker updates for all markets: Report incorrect code Copy Ask AI async def subscribe_to_tickers(self): """Subscribe to ticker updates for all markets""" subscription_message = { "id": self.message_id, "cmd": "subscribe", "params": { "channels": ["ticker"] } } await self.ws.send(json.dumps(subscription_message)) self.message_id += 1 ### [​](https://docs.kalshi.com/getting_started/quick_start_websockets#subscribe-to-specific-markets) Subscribe to Specific Markets To subscribe to orderbook or trade updates for specific markets: Report incorrect code Copy Ask AI async def subscribe_to_markets(self, channels, market_tickers): """Subscribe to specific channels and markets""" subscription_message = { "id": self.message_id, "cmd": "subscribe", "params": { "channels": channels, "market_tickers": market_tickers } } await self.ws.send(json.dumps(subscription_message)) self.message_id += 1 # Example usage: # Subscribe to orderbook updates await subscribe_to_markets(["orderbook_delta"], ["KXFUT24-LSV", "KXHARRIS24-LSV"]) # Subscribe to trade feed await subscribe_to_markets(["trade"], ["KXFUT24-LSV"]) [​](https://docs.kalshi.com/getting_started/quick_start_websockets#connection-lifecycle) Connection Lifecycle ---------------------------------------------------------------------------------------------------------------- 1. **Initial Connection**: Establish WebSocket with authentication headers 2. **Subscribe**: Send subscription commands for desired channels 3. **Receive Updates**: Process incoming messages based on their type 4. **Handle Disconnects**: Implement reconnection logic with exponential backoff [​](https://docs.kalshi.com/getting_started/quick_start_websockets#error-handling) Error Handling ---------------------------------------------------------------------------------------------------- The server sends error messages in this format: Report incorrect code Copy Ask AI { "id": 123, "type": "error", "msg": { "code": 2, "msg": "Params required" } } ### [​](https://docs.kalshi.com/getting_started/quick_start_websockets#websocket-error-codes) WebSocket Error Codes | Code | Error | Description | | --- | --- | --- | | 1 | Unable to process message | General processing error | | 2 | Params required | Missing params object in command | | 3 | Channels required | Missing channels array in subscribe | | 4 | Subscription IDs required | Missing sids in unsubscribe | | 5 | Unknown command | Invalid command name | | 6 | Already subscribed | Duplicate subscription attempt | | 7 | Unknown subscription ID | Subscription ID not found | | 8 | Unknown channel name | Invalid channel in subscribe | | 9 | Authentication required | Private channel without auth | | 10 | Channel error | Channel-specific error | | 11 | Invalid parameter | Malformed parameter value | | 12 | Exactly one subscription ID is required | For update\_subscription | | 13 | Unsupported action | Invalid action for update\_subscription | | 14 | Market Ticker required | Missing market specification (market\_ticker or market\_id) | | 15 | Action required | Missing action in update\_subscription | | 16 | Market not found | Invalid market\_ticker or market\_id | | 17 | Internal error | Server-side processing error | | 18 | Command timeout | Server timed out while processing command | | 19 | shard\_factor must be > 0 | Invalid shard\_factor | | 20 | shard\_factor is required when shard\_key is set | Missing shard\_factor when shard\_key is set | | 21 | shard\_key must be >= 0 and < shard\_factor | Invalid shard\_key | | 22 | shard\_factor must be <= 100 | shard\_factor too large | [​](https://docs.kalshi.com/getting_started/quick_start_websockets#best-practices) Best Practices ---------------------------------------------------------------------------------------------------- Connection Management --------------------- * Implement automatic reconnection with exponential backoff * Handle network interruptions gracefully * Use the websockets library’s built-in keepalive Data Handling ------------- * Process messages asynchronously to avoid blocking * Implement proper error handling for malformed messages * Cache initial orderbook state before applying updates Security -------- * Never expose your private key in client-side code * Rotate API keys regularly * Use secure key storage practices Performance ----------- * Subscribe only to markets you need * Implement message buffering for high-frequency updates * Consider using connection pooling for multiple subscriptions [​](https://docs.kalshi.com/getting_started/quick_start_websockets#complete-example) Complete Example -------------------------------------------------------------------------------------------------------- Here’s a complete, runnable example that connects to the WebSocket API and subscribes to orderbook updates: Report incorrect code Copy Ask AI import asyncio import base64 import json import time import websockets from cryptography.hazmat.primitives import serialization, hashes from cryptography.hazmat.primitives.asymmetric import padding # Configuration KEY_ID = "your_api_key_id" PRIVATE_KEY_PATH = "path/to/private_key.pem" MARKET_TICKER = "KXHARRIS24-LSV" # Replace with any open market WS_URL = "wss://demo-api.kalshi.co/trade-api/ws/v2" def sign_pss_text(private_key, text: str) -> str: """Sign message using RSA-PSS""" message = text.encode('utf-8') signature = private_key.sign( message, padding.PSS( mgf=padding.MGF1(hashes.SHA256()), salt_length=padding.PSS.DIGEST_LENGTH ), hashes.SHA256() ) return base64.b64encode(signature).decode('utf-8') def create_headers(private_key, method: str, path: str) -> dict: """Create authentication headers""" timestamp = str(int(time.time() * 1000)) msg_string = timestamp + method + path.split('?')[0] signature = sign_pss_text(private_key, msg_string) return { "Content-Type": "application/json", "KALSHI-ACCESS-KEY": KEY_ID, "KALSHI-ACCESS-SIGNATURE": signature, "KALSHI-ACCESS-TIMESTAMP": timestamp, } async def orderbook_websocket(): """Connect to WebSocket and subscribe to orderbook""" # Load private key with open(PRIVATE_KEY_PATH, 'rb') as f: private_key = serialization.load_pem_private_key( f.read(), password=None ) # Create WebSocket headers ws_headers = create_headers(private_key, "GET", "/trade-api/ws/v2") async with websockets.connect(WS_URL, additional_headers=ws_headers) as websocket: print(f"Connected! Subscribing to orderbook for {MARKET_TICKER}") # Subscribe to orderbook subscribe_msg = { "id": 1, "cmd": "subscribe", "params": { "channels": ["orderbook_delta"], "market_ticker": MARKET_TICKER } } await websocket.send(json.dumps(subscribe_msg)) # Process messages async for message in websocket: data = json.loads(message) msg_type = data.get("type") if msg_type == "subscribed": print(f"Subscribed: {data}") elif msg_type == "orderbook_snapshot": print(f"Orderbook snapshot: {data}") elif msg_type == "orderbook_delta": # The client_order_id field is optional - only present when you caused the change if 'client_order_id' in data.get('msg', {}): print(f"Orderbook update (your order {data['msg']['client_order_id']}): {data}") else: print(f"Orderbook update: {data}") elif msg_type == "error": print(f"Error: {data}") # Run the example if __name__ == "__main__": asyncio.run(orderbook_websocket()) This example: * Establishes an authenticated WebSocket connection * Subscribes to orderbook updates for the specified market * Processes both the initial snapshot and incremental updates * Displays orderbook changes in real-time To run this example: 1. Replace `KEY_ID` with your API key ID 2. Replace `PRIVATE_KEY_PATH` with the path to your private key file 3. Replace `MARKET_TICKER` with any open market ticker 4. Run with Python 3.7+ [​](https://docs.kalshi.com/getting_started/quick_start_websockets#next-steps) Next Steps -------------------------------------------------------------------------------------------- * Review the [WebSocket API Reference](https://docs.kalshi.com/websockets) for detailed message specifications * Explore [Market Data Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) for REST API integration * Check out our [Demo Environment](https://docs.kalshi.com/getting_started/demo_env) for testing [Quick Start: Create your first order (No SDK)](https://docs.kalshi.com/getting_started/quick_start_create_order) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # StructuredTargets - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes StructuredTargets [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [get\_structured\_target](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#get-structured-target) * [Parameters](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#http-response-details) * [get\_structured\_targets](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#get-structured-targets) * [Parameters](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#http-response-details-2) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**get\_structured\_target**](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#get-structured-target) | **GET** /structured\_targets/ | Get Structured Target | | [**get\_structured\_targets**](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#get-structured-targets) | **GET** /structured\_targets | Get Structured Targets | [​](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#get-structured-target) **get\_structured\_target** ===================================================================================================================== > GetStructuredTargetResponse get\_structured\_target(structured\_target\_id) Get Structured Target Endpoint for getting data about a specific structured target by its ID. ### [​](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **structured\_target\_id** | **str** | Structured target ID | | ### [​](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#return-type) Return type [**GetStructuredTargetResponse**](https://docs.kalshi.com/python-sdk/models/GetStructuredTargetResponse) ### [​](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **200** | Structured target retrieved successfully | | **401** | Unauthorized | | **404** | Not found | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#get-structured-targets) **get\_structured\_targets** ======================================================================================================================= > GetStructuredTargetsResponse get\_structured\_targets(type=type, competition=competition, page\_size=page\_size, cursor=cursor) Get Structured Targets Page size (min: 1, max: 2000) ### [​](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **type** | **str** | Filter by structured target type | \[optional\] | | **competition** | **str** | Filter by competition | \[optional\] | | **page\_size** | **int** | Number of items per page (min 1, max 2000, default 100) | \[optional\] \[default to 100\] | | **cursor** | **str** | Pagination cursor | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#return-type-2) Return type [**GetStructuredTargetsResponse**](https://docs.kalshi.com/python-sdk/models/GetStructuredTargetsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **200** | Structured targets retrieved successfully | | **401** | Unauthorized | | **500** | Internal server error | [MultivariateCollections](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi) [Exchange](https://docs.kalshi.com/python-sdk/api/ExchangeApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Markets - API Documentation [Skip to main content](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Markets [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [getMarket](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarket) * [Example](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details) * [getMarketCandlesticks](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarketcandlesticks) * [Example](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example-2) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters-2) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type-2) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization-2) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers-2) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details-2) * [getMarketOrderbook](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarketorderbook) * [Example](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example-3) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters-3) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type-3) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization-3) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers-3) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details-3) * [getMarkets](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarkets) * [Example](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example-4) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters-4) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type-4) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization-4) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers-4) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details-4) * [getTrades](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#gettrades) * [Example](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example-5) * [Parameters](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters-5) * [Return type](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type-5) * [Authorization](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization-5) * [HTTP request headers](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers-5) * [HTTP response details](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details-5) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**getMarket**](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarket) | **GET** /markets/ | Get Market | | [**getMarketCandlesticks**](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarketcandlesticks) | **GET** /series//markets//candlesticks | Get Market Candlesticks | | [**getMarketOrderbook**](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarketorderbook) | **GET** /markets//orderbook | Get Market Orderbook | | [**getMarkets**](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarkets) | **GET** /markets | Get Markets | | [**getTrades**](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#gettrades) | **GET** /markets/trades | Get Trades | [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarket) **getMarket** ===================================================================================== > GetMarketResponse getMarket() Get a single market by its ticker. A market represents a specific binary outcome within an event that users can trade on (e.g., “Will candidate X win?”). Markets have yes/no positions, current prices, volume, and settlement rules. ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example) Example Report incorrect code Copy Ask AI import { MarketsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MarketsApi(configuration); let ticker: string; //Market ticker (default to undefined) const { status, data } = await apiInstance.getMarket( ticker ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | \[**string**\] | Market ticker | defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type) Return type **GetMarketResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Market retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarketcandlesticks) **getMarketCandlesticks** ============================================================================================================= > GetMarketCandlesticksResponse getMarketCandlesticks() Get candlestick data for a market within a series ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example-2) Example Report incorrect code Copy Ask AI import { MarketsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MarketsApi(configuration); let ticker: string; //The series ticker (default to undefined) let marketTicker: string; //The market ticker (default to undefined) let startTs: number; //Start timestamp for the range (optional) (default to undefined) let endTs: number; //End timestamp for the range (optional) (default to undefined) let periodInterval: string; //Period interval for candlesticks (e.g., 1m, 5m, 1h, 1d) (optional) (default to undefined) const { status, data } = await apiInstance.getMarketCandlesticks( ticker, marketTicker, startTs, endTs, periodInterval ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | \[**string**\] | The series ticker | defaults to undefined | | **marketTicker** | \[**string**\] | The market ticker | defaults to undefined | | **startTs** | \[**number**\] | Start timestamp for the range | (optional) defaults to undefined | | **endTs** | \[**number**\] | End timestamp for the range | (optional) defaults to undefined | | **periodInterval** | \[**string**\] | Period interval for candlesticks (e.g., 1m, 5m, 1h, 1d) | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type-2) Return type **GetMarketCandlesticksResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization-2) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers-2) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details-2) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Candlesticks retrieved successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarketorderbook) **getMarketOrderbook** ======================================================================================================= > GetMarketOrderbookResponse getMarketOrderbook() Get the orderbook for a market ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example-3) Example Report incorrect code Copy Ask AI import { MarketsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MarketsApi(configuration); let ticker: string; //Market ticker (default to undefined) let depth: number; //Depth of the orderbook to retrieve (optional) (default to 10) const { status, data } = await apiInstance.getMarketOrderbook( ticker, depth ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | \[**string**\] | Market ticker | defaults to undefined | | **depth** | \[**number**\] | Depth of the orderbook to retrieve | (optional) defaults to 10 | ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type-3) Return type **GetMarketOrderbookResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization-3) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers-3) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details-3) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Orderbook retrieved successfully | \- | | **401** | Unauthorized - authentication required | \- | | **404** | Resource not found | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#getmarkets) **getMarkets** ======================================================================================= > GetMarketsResponse getMarkets() List and discover markets on Kalshi. A market represents a specific binary outcome within an event that users can trade on (e.g., “Will candidate X win?”). Markets have yes/no positions, current prices, volume, and settlement rules. This endpoint returns a paginated response. Use the ‘limit’ parameter to control page size (1-1000, defaults to 100). The response includes a ‘cursor’ field - pass this value in the ‘cursor’ parameter of your next request to get the next page. An empty cursor indicates no more pages are available. ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example-4) Example Report incorrect code Copy Ask AI import { MarketsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MarketsApi(configuration); let limit: number; //Number of results per page. Defaults to 100. Maximum value is 1000. (optional) (default to 100) let cursor: string; //Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. (optional) (default to undefined) let eventTicker: string; //Filter by event ticker (optional) (default to undefined) let seriesTicker: string; //Filter by series ticker (optional) (default to undefined) let maxCloseTs: number; //Filter items that close before this Unix timestamp (optional) (default to undefined) let minCloseTs: number; //Filter items that close after this Unix timestamp (optional) (default to undefined) let status: string; //Filter by market status. Comma-separated list. Possible values are \'initialized\', \'open\', \'closed\', \'settled\', \'determined\'. Note that the API accepts \'open\' for filtering but returns \'active\' in the response. Leave empty to return markets with any status. (optional) (default to undefined) let tickers: string; //Filter by specific market tickers. Comma-separated list of market tickers to retrieve. (optional) (default to undefined) const { status, data } = await apiInstance.getMarkets( limit, cursor, eventTicker, seriesTicker, maxCloseTs, minCloseTs, status, tickers ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | \[**number**\] | Number of results per page. Defaults to 100. Maximum value is 1000. | (optional) defaults to 100 | | **cursor** | \[**string**\] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined | | **eventTicker** | \[**string**\] | Filter by event ticker | (optional) defaults to undefined | | **seriesTicker** | \[**string**\] | Filter by series ticker | (optional) defaults to undefined | | **maxCloseTs** | \[**number**\] | Filter items that close before this Unix timestamp | (optional) defaults to undefined | | **minCloseTs** | \[**number**\] | Filter items that close after this Unix timestamp | (optional) defaults to undefined | | **status** | \[**string**\] | Filter by market status. Comma-separated list. Possible values are 'initialized', 'open', 'closed', 'settled', 'determined'. Note that the API accepts 'open' for filtering but returns 'active' in the response. Leave empty to return markets with any status. | (optional) defaults to undefined | | **tickers** | \[**string**\] | Filter by specific market tickers. Comma-separated list of market tickers to retrieve. | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type-4) Return type **GetMarketsResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization-4) Authorization [bearerAuth](https://docs.kalshi.com/typescript-sdk/README.md#bearerAuth) ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers-4) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details-4) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Markets retrieved successfully | \- | | **400** | Bad request - invalid input | \- | | **401** | Unauthorized - authentication required | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#gettrades) **getTrades** ===================================================================================== > GetTradesResponse getTrades() Get all trades for all markets. A trade represents a completed transaction between two users on a specific market. Each trade includes the market ticker, price, quantity, and timestamp information. This endpoint returns a paginated response. Use the ‘limit’ parameter to control page size (1-1000, defaults to 100). The response includes a ‘cursor’ field - pass this value in the ‘cursor’ parameter of your next request to get the next page. An empty cursor indicates no more pages are available. ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#example-5) Example Report incorrect code Copy Ask AI import { MarketsApi, Configuration } from 'kalshi-typescript'; const configuration = new Configuration({ apiKey: 'your-api-key-id', privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string' }); const apiInstance = new MarketsApi(configuration); let limit: number; //Number of results per page. Defaults to 100. Maximum value is 1000. (optional) (default to 100) let cursor: string; //Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. (optional) (default to undefined) let ticker: string; //Filter by market ticker (optional) (default to undefined) let minTs: number; //Filter items after this Unix timestamp (optional) (default to undefined) let maxTs: number; //Filter items before this Unix timestamp (optional) (default to undefined) const { status, data } = await apiInstance.getTrades( limit, cursor, ticker, minTs, maxTs ); ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#parameters-5) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | \[**number**\] | Number of results per page. Defaults to 100. Maximum value is 1000. | (optional) defaults to 100 | | **cursor** | \[**string**\] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined | | **ticker** | \[**string**\] | Filter by market ticker | (optional) defaults to undefined | | **minTs** | \[**number**\] | Filter items after this Unix timestamp | (optional) defaults to undefined | | **maxTs** | \[**number**\] | Filter items before this Unix timestamp | (optional) defaults to undefined | ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#return-type-5) Return type **GetTradesResponse** ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#authorization-5) Authorization No authorization required ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-request-headers-5) HTTP request headers * **Content-Type**: Not defined * **Accept**: application/json ### [​](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#http-response-details-5) HTTP response details | Status code | Description | Response headers | | --- | --- | --- | | **200** | Trades retrieved successfully | \- | | **400** | Bad request - invalid input | \- | | **500** | Internal server error | \- | [\[Back to top\]](https://docs.kalshi.com/typescript-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-api-endpoints) [\[Back to Model list\]](https://docs.kalshi.com/typescript-sdk/README.md#documentation-for-models) [\[Back to README\]](https://docs.kalshi.com/typescript-sdk/README.md) [Portfolio](https://docs.kalshi.com/typescript-sdk/api/PortfolioApi) [Communications](https://docs.kalshi.com/typescript-sdk/api/CommunicationsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # API Changelog - API Documentation [Skip to main content](https://docs.kalshi.com/changelog#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Changelog [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) FiltersClear UpcomingReleasedNew FeatureChangeBreaking ChangeBug FixDocumentationBreakingFeatureBreaking changeSDK You can subscribe to the RSS changelog at `/changelog/rss.xml` if you’d like to stay ahead of breaking changes. You can reference the pending API spec under the “version” dropdown menu at the top left. When the actual API is upgraded to this new version, you will see the version marked as “Stable” in the drop-down menu and become the new default on the landing page. This changelog is a work in progress. As always, we welcome any feedback in our Discord #dev channel! [​](https://docs.kalshi.com/changelog#recent-updates) Recent Updates ----------------------------------------------------------------------- [​](https://docs.kalshi.com/changelog#mar-7-2026) Mar 7, 2026 ChangeUpcoming Selected portfolio response `_dollars` fields now emit up to `6` decimal places, using micro\_cent source values from upstream portfolio protos.**Affected endpoints:** * `GET /portfolio/orders` * `GET /portfolio/orders/{order_id}` * `GET /portfolio/fills` * `GET /portfolio/positions` [​](https://docs.kalshi.com/changelog#mar-6-2026) Mar 6, 2026 New FeatureUpcoming Added `GET /historical/trades` — a public endpoint for querying all trades archived to the historical database. Supports the same filters as `GET /markets/trades`.Use this endpoint for trades that occurred before the `trades_created_ts` cutoff returned by `GET /historical/cutoff`. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details. [​](https://docs.kalshi.com/changelog#mar-5-2026) Mar 5, 2026 ChangeUpcoming * Added `is_yes` (boolean) to the `user_orders` WebSocket channel * `side` (string `"yes"`/`"no"`) remains available for compatibility [​](https://docs.kalshi.com/changelog#mar-3-2026) Mar 3, 2026 ChangeUpcoming * Legacy integer count fields (with `_fp` equivalents) and integer cents price fields (with `_dollars` equivalents) will be removed on **March 12, 2026** * Fractional trading will roll out per-market starting the week of **March 9, 2026**; check `fractional_trading_enabled` on Market responses * On fractional-enabled markets, legacy integer fields may be truncated; migrate to `_fp` and `_dollars` to avoid data loss Docs: [Fixed-Point Migration](https://docs.kalshi.com/getting_started/fixed_point_migration) and [Fee Rounding](https://docs.kalshi.com/getting_started/fee_rounding) . [​](https://docs.kalshi.com/changelog#feb-24-2026) Feb 24, 2026 New FeatureUpcoming Market responses now include: * `yes_bid_size_fp`: total contract size of orders to buy yes at the best bid price * `yes_ask_size_fp`: total contract size of orders to sell yes at the best ask price Affected endpoints: * `GET /markets` * `GET /markets/{ticker}` [​](https://docs.kalshi.com/changelog#feb-23-2026) Feb 23, 2026 New FeatureUpcoming New endpoints for managing netting settings on individual subaccounts: * **`GET /portfolio/subaccounts/netting`**: returns the netting enabled status for all subaccounts * **`PUT /portfolio/subaccounts/netting`**: updates the netting enabled status for a specific subaccount (pass `subaccount_number` and `enabled` in the request body) Use `subaccount_number=0` for the primary account or `1`–`32` for numbered subaccounts. New subaccounts inherit the primary account’s netting setting at creation time. [​](https://docs.kalshi.com/changelog#feb-21-2026) Feb 21, 2026 ChangeUpcoming Fractional share trading is now available for testing in the demo environment on the following markets: * `KXUCL-26-ARS` * `KXUCL-26-AJA` Legacy fields will be deprecated on `March 5, 2026`: * Integer count fields with an `_fp` equivalent will no longer be returned. See [Fixed-Point Contracts](https://docs.kalshi.com/getting_started/fixed_point_contracts) for migration details. * Integer cents price fields (e.g., `yes_bid`, `no_ask`, `last_price`) will no longer be returned. Their `_dollars` equivalents are already available. See [Subpenny Pricing](https://docs.kalshi.com/getting_started/subpenny_pricing) for details. More information will be forthcoming on how fee rounding works with fractional contracts. [​](https://docs.kalshi.com/changelog#feb-19-2026) Feb 19, 2026 New FeatureUpcoming The `market_lifecycle_v2` WebSocket channel now includes a `settlement_value` field (fixed-point dollar string) on `market_determined` events, indicating the settlement price of the market.Expected release date: `February 26, 2026` [​](https://docs.kalshi.com/changelog#feb-17-2026) Feb 17, 2026 New FeatureUpcoming `GET /portfolio/balance` now accepts an optional `subaccount` query parameter, consistent with other portfolio endpoints (orders, fills, positions, settlements). * **Omitted or `subaccount=0`**: returns balance and portfolio value for the primary account (default) * **`subaccount=N`**: returns balance and portfolio value for that specific subaccount [​](https://docs.kalshi.com/changelog#feb-13-2026) Feb 13, 2026 ChangeUpcoming The `liquidity` and `liquidity_dollars` fields on Market responses are deprecated and will return 0.Affected endpoints: * `GET /markets` * `GET /markets/{ticker}` * `GET /events` * `GET /events/{ticker}` * `GET /events/multivariate` [​](https://docs.kalshi.com/changelog#feb-16-2026) Feb 16, 2026 ChangeUpcoming The deprecation timeline for non fixed-point count fields has been pushed back. Fields that have a `_fp` equivalent will continue to be returned via API until at least `February 26, 2026`.See [Fixed-Point Contracts](https://docs.kalshi.com/getting_started/fixed_point_contracts) for updated migration details. [​](https://docs.kalshi.com/changelog#feb-19-2026-2) Feb 19, 2026 New FeatureUpcoming Kalshi now partitions exchange data into **live** and **historical** tiers. Historical data must be accessed via the new historical API endpoints. The `GET /historical/cutoff` endpoint returns the cutoff timestamps that define this boundary.**Cutoff timestamps and what they mean:** * `market_settled_ts` — partitioned by **market settlement time**. Markets and their candlesticks that settled before this timestamp are only available via `GET /historical/markets` and `GET /historical/markets/{ticker}/candlesticks`. * `trades_created_ts` — partitioned by **trade fill time**. Fills that occurred before this timestamp are only available via `GET /historical/fills`. * `orders_updated_ts` — partitioned by **order cancellation or execution time**. Orders canceled or fully executed before this timestamp are only available via `GET /historical/orders`. **Resting (active) orders are unaffected** and always appear in `GET /portfolio/orders`. **New endpoints:** * `GET /historical/cutoff` — returns the market, trade, and order cutoff timestamps * `GET /historical/markets` — settled markets older than the cutoff * `GET /historical/markets/{ticker}` — single historical market by ticker * `GET /historical/markets/{ticker}/candlesticks` — candlestick data for historical markets * `GET /historical/fills` — trade fills older than the cutoff * `GET /historical/orders` — canceled/executed orders older than the cutoff **Impacted live endpoints:** * `GET /markets`, `GET /markets/{ticker}` — settled markets older than `market_settled_ts` will not appear * `GET /events` with `with_nested_markets=true` — nested markets older than `market_settled_ts` will not be included * `GET /series/{series_ticker}/markets/{ticker}/candlesticks`, `GET /markets/candlesticks` — candlestick data is tied to the market; historical markets’ candlesticks must be fetched from `GET /historical/markets/{ticker}/candlesticks` * `GET /markets/trades`, `GET /portfolio/fills` — fills older than `trades_created_ts` will not appear * `GET /portfolio/orders` — completed/canceled orders older than `orders_updated_ts` will not appear (resting orders are unaffected) [​](https://docs.kalshi.com/changelog#feb-11-2026) Feb 11, 2026 ChangeUpcoming `POST /portfolio/orders` removed `type`; `type=market` is no longer offered. [​](https://docs.kalshi.com/changelog#feb-12-2026) Feb 12, 2026 ChangeUpcoming The `market_lifecycle_v2` WebSocket channel no longer emits lifecycle messages for multivariate event (MVE) markets and events. All events and markets with `KXMVE` ticker prefix are now filtered from all lifecycle message types on this channel.**Affected channel:** * `market_lifecycle_v2` [​](https://docs.kalshi.com/changelog#feb-12-2026-2) Feb 12, 2026 ChangeUpcoming The `ticker_v2` WebSocket channel has been removed. This was an undocumented experimental channel intended as a v2 iteration of the ticker channel but was rolled back due to user feedback.Users should continue using the standard `ticker` channel for real-time market updates, which includes top-of-book prices, sizes, and last trade information.**Removed channel:** * `ticker_v2` [​](https://docs.kalshi.com/changelog#feb-11-2026-2) Feb 11, 2026 New FeatureUpcoming * `ticker` channel now provides high precision `time` field. * `skip_ticker_ack` subscription-level flag supports skipping market tickers sent in the OK message following a channel update. [​](https://docs.kalshi.com/changelog#feb-11-2026-3) Feb 11, 2026 ChangeUpcoming Market response payloads now include `fractional_trading_enabled` consistently across event and market data surfaces.**Affected endpoints:** * `GET /events` * `GET /events/{event_ticker}` * `GET /markets` * `GET /markets/{ticker}` [​](https://docs.kalshi.com/changelog#feb-5-2026) Feb 5, 2026 New FeatureUpcoming The `GET /incentive_programs` endpoint now returns a `market_id` field containing the market’s unique identifier for each incentive program.**Affected endpoint:** * `GET /incentive_programs` [​](https://docs.kalshi.com/changelog#feb-3-2026) Feb 3, 2026 New FeatureUpcoming Added `user_orders` WebSocket channel to stream real-time order updates (created, updated, canceled, executed) for the authenticated user. Supports optional `market_tickers` filter and dynamic `update_subscription` commands to add or remove markets.**New channel:** * `user_orders` [​](https://docs.kalshi.com/changelog#feb-3-2026-2) Feb 3, 2026 ChangeUpcoming `GET /portfolio/order_groups` and `GET /portfolio/order_groups/{order_group_id}` now accept an optional `subaccount` query parameter. When provided, results are filtered to that specific subaccount. When omitted, results are returned across all subaccounts.**Affected endpoints:** * `GET /portfolio/order_groups` * `GET /portfolio/order_groups/{order_group_id}` [​](https://docs.kalshi.com/changelog#feb-2-2026) Feb 2, 2026 UpcomingNew Feature The `POST /communications/rfqs` endpoint now accepts an optional `subaccount` parameter to create RFQs on behalf of a subaccount. The `GET /communications/rfqs` endpoint now accepts an optional `subaccount` query parameter to filter RFQs by subaccount.**Affected endpoints:** * `POST /communications/rfqs` * `GET /communications/rfqs` [​](https://docs.kalshi.com/changelog#jan-30-2026) Jan 30, 2026 UpcomingNew Feature Order queue position returns `queue_position_fp` representing the quantity of shares preceeeding the given order. Note: the new field is 0-indexed, e.g. the first order in the queue returns `0.00`.Affected endpoints: * `GET /portfolio/orders/queue_positions` * `GET /portfolio/orders/{order_id}/queue_position` [​](https://docs.kalshi.com/changelog#feb-12-2026-3) Feb 12, 2026 New FeatureUpcoming The `ticker` and `margin_ticker` WebSocket channels now include top-of-book sizes and last trade size: * `yes_bid_size_fp` / `bid_size_fp` — number of contracts at the best bid price * `yes_ask_size_fp` / `ask_size_fp` — number of contracts at the best ask price * `last_trade_size_fp` — number of contracts in the most recent trade Size changes (even without price changes) now trigger ticker updates. All size fields are fixed-point strings supporting fractional contracts.**Affected channels:** * `ticker` * `margin_ticker` [​](https://docs.kalshi.com/changelog#jan-29-2026) Jan 29, 2026 ChangeUpcoming Order responses now include `subaccount_number` (0 for primary, 1-32 for subaccounts) for direct users.**Affected endpoints:** * `GET /portfolio/orders` * `GET /portfolio/orders/{order_id}` [​](https://docs.kalshi.com/changelog#jan-29-2026-2) Jan 29, 2026 ChangeUpcoming The `subaccount` query parameter behavior has been updated for orders, fills, and settlements. When `subaccount` is omitted, results are returned across all subaccounts for the authenticated direct member. When `subaccount` is provided (including `0` for primary), results are filtered to that specific subaccount.**Affected endpoints:** * `GET /portfolio/orders` * `GET /portfolio/fills` * `GET /portfolio/settlements` [​](https://docs.kalshi.com/changelog#jan-29-2026-3) Jan 29, 2026 UpcomingBreaking Change See [Fixed-Point Contracts](https://docs.kalshi.com/getting_started/fixed_point_contracts) for updated migration details. [​](https://docs.kalshi.com/changelog#jan-29-2026-4) Jan 29, 2026 ChangeUpcoming Fill WebSocket messages now include `fee_cost` as a fixed-point dollars string.**Affected channel:** * `fill` [​](https://docs.kalshi.com/changelog#jan-28-2026) Jan 28, 2026 New FeatureUpcoming The following endpoints now accept an optional `subaccount` parameter:**Order operations:** * `DELETE /portfolio/orders/{order_id}` - Cancel order * `POST /portfolio/orders/{order_id}/amend` - Amend order * `POST /portfolio/orders/{order_id}/decrease` - Decrease order **Order group operations:** * `POST /portfolio/order_groups` - Create order group * `PUT /portfolio/order_groups/{order_group_id}/limit` - Update order group limit * `PUT /portfolio/order_groups/{order_group_id}/trigger` - Trigger order group * `DELETE /portfolio/order_groups/{order_group_id}` - Delete order group [​](https://docs.kalshi.com/changelog#jan-28-2026-2) Jan 28, 2026 New FeatureUpcoming Batch cancel now supports per-order subaccounts while remaining backwards compatible with the existing `ids` payload.**Batch cancel:** * `POST /portfolio/orders/batched/cancel` * New request shape: `orders: [{ order_id, subaccount? }]` (subaccount defaults to `0`) * Legacy `ids` array is still accepted and maps to subaccount `0` [​](https://docs.kalshi.com/changelog#jan-28-2026-3) Jan 28, 2026 New FeatureUpcoming Added `target_cost_dollars` (and `rfq_target_cost_dollars` on quotes) as a fixed-point dollar string to RFQ and Quote responses. The `CreateRFQ` endpoint now accepts `target_cost_dollars` as an alternative to `target_cost_centi_cents`.The `target_cost_centi_cents` and `rfq_target_cost_centi_cents` fields are now deprecated.**Affected endpoints:** * `POST /communications/rfqs` * `GET /communications/rfqs` * `GET /communications/rfqs/{rfq_id}` * `GET /communications/quotes` * `GET /communications/quotes/{quote_id}` [​](https://docs.kalshi.com/changelog#jan-27-2026) Jan 27, 2026 Breaking ChangeUpcoming The subaccount balance field will be represented as a fixed-point dollars string instead of a centicent integer.**Affected endpoint:** * `GET /portfolio/subaccounts/balances` [​](https://docs.kalshi.com/changelog#jan-27-2026-2) Jan 27, 2026 New FeatureUpcoming The exhange `fee_cost` will be made available on the Fills API starting `January 28, 2026`.**Affected endpoint:** * `GET /portfolio/fills` [​](https://docs.kalshi.com/changelog#jan-26-2026) Jan 26, 2026 New FeatureUpcoming Added more specific error codes for order validation failures. These replace the generic `invalid_order` response in certain cases:**New error codes:** * `invalid_order_size` - Order quantity is invalid * `available_balance_too_low` - Insufficient available balance for the order * `order_id_and_client_order_id_mismatch` - OrderID does not match ClOrdID on amend/cancel * `order_side_mismatch` - Order side mismatch on amend/cancel * `order_ticker_mismatch` - Market ticker mismatch on amend/cancel **Affected endpoints:** * `POST /portfolio/orders` * `POST /portfolio/orders/{order_id}/amend` * `DELETE /portfolio/orders/{order_id}` [​](https://docs.kalshi.com/changelog#jan-22-2026) Jan 22, 2026 New FeatureUpcoming The `POST /communications/quotes` endpoint now accepts an optional `subaccount` parameter to create quotes on behalf of a subaccount.**Affected endpoint:** * `POST /communications/quotes` [​](https://docs.kalshi.com/changelog#jan-22-2026-2) Jan 22, 2026 ChangeUpcoming New endpoint which provides authorized user their api tier and corresponding read and write limits.**New endpoint:** * `GET /account/limits` Release date: `January 28, 2026` [​](https://docs.kalshi.com/changelog#jan-22-2026-3) Jan 22, 2026 New FeatureUpcoming Added `order_group_updates` WebSocket channel to stream order group lifecycle updates (created, triggered, reset, deleted, limit\_updated). Payloads include `contracts_limit_fp` for created and limit\_updated events.**New channel:** * `order_group_updates` Release date: `January 29, 2026` [​](https://docs.kalshi.com/changelog#jan-21-2026) Jan 21, 2026 ChangeUpcoming The `client_order_id` and `updated_client_order_id` fields in amend order requests are now optional.**Behavior changes:** * You can now amend orders without providing `client_order_id` fields by using only the `order_id` from the URL path * If you provide an `updated_client_order_id`, the order can be found by the exchange and the `client_order_id` updated just on `order_id` alone **Affected endpoint:** * `POST /trade-api/v2/portfolio/orders/{order_id}/amend` **Example:** Report incorrect code Copy Ask AI { "ticker": "MARKET-TICKER", "side": "yes", "action": "buy", "count_fp": "50.00", "yes_price": 30 } This will amend the order identified by `order_id` without requiring `client_order_id` fields.Release date: `January 28, 2026` [​](https://docs.kalshi.com/changelog#jan-29-2026-5) Jan 29, 2026 Released Release date: `January 29, 2026` [​](https://docs.kalshi.com/changelog#jan-29-2026-6) Jan 29, 2026 New FeatureUpcoming Added an endpoint to update the contracts limit for an order group (rolling 15-second window). If the updated limit would immediately trigger the group, all orders in the group are canceled and the group is triggered.**New endpoint:** * `PUT /portfolio/order_groups/{order_group_id}/limit` **Response updates:** * `GET /portfolio/order_groups` * `GET /portfolio/order_groups/{order_group_id}` Both now include `contracts_limit` and `contracts_limit_fp`.Release date: `January 29, 2026` [​](https://docs.kalshi.com/changelog#jan-22-2026-4) Jan 22, 2026 DocumentationReleased Added `*_fp` fixed-point contract count fields in the WebSocket AsyncAPI spec and examples (orderbook, ticker, trades, fills, positions, communications). See the [WebSocket reference](https://docs.kalshi.com/websockets) .Release date: `January 22, 2026` [​](https://docs.kalshi.com/changelog#jan-21-2026-2) Jan 21, 2026 New FeatureUpcoming Added `updated_time` to Market responses and `min_updated_ts` filter to `GET /markets`, which filters for only markets updated later than the provided unix ts.Affected endpoints: * `GET /markets/{ticker}` * `GET /markets`. [​](https://docs.kalshi.com/changelog#jan-20-2026) Jan 20, 2026 ChangeUpcoming Currently, a market settled to a scalar result will return `""` in the `market_result` field. Starting in the next release, this value will read `"scalar"` instead.Affected endpoints: * `GET /markets/{ticker}` * `GET /markets` Release date: `January 28, 2026` [​](https://docs.kalshi.com/changelog#jan-21-2026-3) Jan 21, 2026 New FeatureUpcoming Added manual trigger support for order groups.**New endpoint:** * `PUT /portfolio/order_groups/{order_group_id}/trigger` Release date: `January 22, 2026` [​](https://docs.kalshi.com/changelog#jan-16-2026) Jan 16, 2026 ChangeUpcoming Maker RFQ client order IDs now use the format `quote::`, where `hash` is an 8-character hash segment and the maker’s quote ID is added as a suffix.Release date: `January 22, 2026` [​](https://docs.kalshi.com/changelog#jan-16-2026-2) Jan 16, 2026 New FeatureUpcoming Added `include_latest_before_start` parameter to the single market candlesticks endpoint for price continuity.When set to `true`, prepends a synthetic candlestick that: * Uses the close price from the most recent candlestick before `start_ts` * Sets `previous_price` to enable continuous price charting **Affected endpoint:** * `GET /series/{series_ticker}/markets/{ticker}/candlesticks` Release date: `January 22, 2026` [​](https://docs.kalshi.com/changelog#jan-15-2026) Jan 15, 2026 New FeatureUpcoming Added `*_fp` string fields for contract counts across REST API requests and responses.**Example order response:** Report incorrect code Copy Ask AI { "count": 10, "count_fp": "10.00", "fill_count": 5, "fill_count_fp": "5.00" } See [Fixed-Point Contracts](https://docs.kalshi.com/getting_started/fixed_point_contracts) for migration details.Release date: `Jan 22, 2026` [​](https://docs.kalshi.com/changelog#jan-13-2025) Jan 13, 2025 BreakingUpcoming RFQ creator IDs will be exposed only after the RFQ is closed/executes. Accordingly the RFQ creator ID is removed entirely from related websocket messages that are created before this point (RFQCreated, QuoteCreated).Release date: `Jan 15, 2025` [​](https://docs.kalshi.com/changelog#jan-13-2025-2) Jan 13, 2025 FeatureUpcoming Settlement value on component legs are now reported when pulling MVEs.Release date: `January 13, 2025` [​](https://docs.kalshi.com/changelog#jan-12-2026) Jan 12, 2026 New FeatureUpcoming Added sharding support to the `communications` WebSocket channel for high-throughput RFQ/quote consumers.**New subscription parameters:** * `shard_factor` (int): Number of shards to divide messages across (e.g., 4) * `shard_key` (int): Which shard this connection receives (0 to shard\_factor-1) Messages are sharded by `market_ticker` using consistent hashing. Clients can run multiple connections with different `shard_key` values to distribute load while ensuring complete coverage.**Validation:** * `shard_factor` must be > 0 when provided * `shard_key` must be >= 0 and < `shard_factor` * `shard_key` requires `shard_factor` to be set **Example subscription:** Report incorrect code Copy Ask AI { "id": 1, "cmd": "subscribe", "params": { "channels": ["communications"], "shard_factor": 4, "shard_key": 0 } } **No breaking changes:** When these parameters are omitted, all messages are received as before. Existing integrations are unaffected. [​](https://docs.kalshi.com/changelog#jan-9-2026) Jan 9, 2026 New FeatureUpcoming New endpoints for managing subaccounts within a user’s portfolio.**New endpoints:** * `POST /portfolio/subaccounts` - Create a new subaccount * `GET /portfolio/subaccounts/balances` - Get balances for all subaccounts * `POST /portfolio/subaccounts/transfer` - Transfer funds between subaccounts * `GET /portfolio/subaccounts/transfers` - Get paginated history of subaccount transfers **Note:** Transfers require a unique `client_transfer_id` for idempotency. [​](https://docs.kalshi.com/changelog#jan-9-2025) Jan 9, 2025 New FeatureUpcoming On `GET /markets`, responses may bear `is_provisional: true`, indicating that the market will be removed from the API if it has no activity by settlement time.Notes: * Historical and existing markets are unaffected, this change only applies going forward. * A market will never transition into the provisional state if it was not created as provisional. Expected release date: `January 9, 2025`. [​](https://docs.kalshi.com/changelog#jan-6-2026) Jan 6, 2026 New FeatureUpcoming Added optional `volume` field to Series responses showing total contracts traded across all events in the series.**Affected endpoints:** * `GET /series` - Added `include_volume` query parameter (default: `false`) * `GET /series/{series_ticker}` - Added `include_volume` query parameter (default: `false`) When `include_volume=true`, the response includes the `volume` field with the total contracts traded.Release date: `January 15, 2026` [​](https://docs.kalshi.com/changelog#jan-6-2026-2) Jan 6, 2026 Breaking ChangeUpcoming Cent-denominated price fields will be removed from Market responses.Affected endpoints: * `GET /markets` * `GET /markets/{ticker}` * `GET /events` * `GET /events/{ticker}` Fields to be removed: * `response_price_units`, `notional_value`, `yes_bid`, `yes_ask`, `no_bid`, `no_ask`, `last_price`, `previous_yes_bid`, `previous_yes_ask`, `previous_price`, `liquidity` → Use `*_dollars` equivalents (e.g., `yes_bid_dollars`) * `tick_size` → Use `price_level_structure` and `price_ranges` Release date: `January 15, 2026` [​](https://docs.kalshi.com/changelog#jan-5-2026) Jan 5, 2026 Breaking ChangeUpcoming The deprecated fields `category` and `risk_limit_cents` will be removed from Market responses.**Affected endpoints:** * `GET /markets` * `GET /markets/{ticker}` Release date: `January 8, 2026` [​](https://docs.kalshi.com/changelog#dec-22-2025) Dec 22, 2025 Bug FixReleased Search endpoints now accept lowercase query parameters for improved flexibility and consistency.Release date: `December 22, 2025` [​](https://docs.kalshi.com/changelog#dec-19-2025) Dec 19, 2025 New FeatureUpcoming Added `settlement_ts` field to `GET /markets` and `GET /markets/{ticker}` responses.Release date: `December 25, 2025` [​](https://docs.kalshi.com/changelog#dec-16-2025) Dec 16, 2025 DocumentationReleased The `Market` response object now documents all possible `status` values: `initialized`, `inactive`, `active`, `closed`, `determined`, `disputed`, `amended`, `finalized`. [​](https://docs.kalshi.com/changelog#dec-13-2025) Dec 13, 2025 Upcoming In `GET /markets`, markets that have been paused by an administrator will be available under new the `paused` status filter. [​](https://docs.kalshi.com/changelog#dec-11-2025) Dec 11, 2025 New FeatureUpcoming `GET /portfolio/settlements` will return each settled position’s Event Ticker. Release Date: `December 18, 2025` [​](https://docs.kalshi.com/changelog#dec-18-2025) Dec 18, 2025 New FeatureUpcoming API keys now support a `scopes` field. Valid scopes are `read` and `write`. Keys default to full access if not specified. All existing API keys will have both scopes.Release date: `December 18, 2025` [​](https://docs.kalshi.com/changelog#dec-5-2025) Dec 5, 2025 Breaking ChangeUpcoming `GET /portfolio/positions` will only return unsettled positions. For fetching settled market positions, switch to `GET /portfolio/settlements`.Release date: December 11, 2025 [​](https://docs.kalshi.com/changelog#dec-2-2025) Dec 2, 2025 Breaking ChangeUpcoming Breaking Change: `GET /events` excludes multivariate eventsRelease date: December 4, 2025 [​](https://docs.kalshi.com/changelog#dec-1-2025) Dec 1, 2025 Upcoming Release date: `December 4, 2025` [​](https://docs.kalshi.com/changelog#dec-1-2025-2) Dec 1, 2025 Upcoming `DELETE /portfolio/orders/batched` is now generally available. Advanced API access is no longer required. (The Nov 14th update only applied to `POST`.)Release date: `December 4, 2025` [​](https://docs.kalshi.com/changelog#nov-29-2025) Nov 29, 2025 Upcoming `GET /live_data/{type}/milestone/{milestone_id}` and `GET /live_data/batch` now returns `milestone_id` in the response.Release date: `December 4, 2025` [​](https://docs.kalshi.com/changelog#nov-23-2025) Nov 23, 2025 Upcoming Updates to filtering in `GET /markets` * Inactive markets during tradable hours will returned in the `open` selector. * Inactive markets during tradable hours no longer appear in the `closed` selector. * Restricting to a single status filter allowed per request (previously announced). Release date: `November 27, 2025` [​](https://docs.kalshi.com/changelog#nov-21-2025) Nov 21, 2025 Upcoming Subpenny fields `yes_bid_dollars` and `no_bid_dollars` available on the Get Quote API. Affected endpoints: * `GET /communications/quotes` * `GET /communications/quotes/{quote_id}` [​](https://docs.kalshi.com/changelog#nov-27-2025) Nov 27, 2025 New FeatureUpcoming Adds new endpoint `GET /markets/candlesticks`Retrieve candlestick data for multiple markets in a single API call. Supports up to 10,000 candlesticks total across all requested markets.Expected release: `November 27, 2025` [​](https://docs.kalshi.com/changelog#nov-21-2025-2) Nov 21, 2025 Breaking ChangeUpcoming **Breaking changes to order expiration and immediate-or-cancel (IoC) handling:** 1. **Past expiration timestamps now rejected**: Orders with `expiration_ts` in the past will be rejected with error “Expiration timestamp must be in the future” instead of being automatically converted to IoC orders. 2. **IoC + expiration\_ts combination rejected**: Orders cannot specify both `time_in_force: "immediate_or_cancel"` and `expiration_ts`. This will be rejected at the API level with error “Cannot specify both immediate\_or\_cancel and expiration\_ts”. 3. **IoC orders no longer support expiration**: The IoC order type is now independent and does not accept an expiration timestamp. **Migration guide**: If you were previously using past `expiration_ts` values to indicate IoC behavior, you must now explicitly set `time_in_force: "immediate_or_cancel"` instead.Expected release: `TBD` [​](https://docs.kalshi.com/changelog#nov-20-2025) Nov 20, 2025 Upcoming ‘Pending’ is being removed from the status enum on ordersExpected release: `November 27, 2025` [​](https://docs.kalshi.com/changelog#nov-14-2025) Nov 14, 2025 Upcoming `POST /portfolio/orders/batched` will now be generally available. Advanced API access is no longer a prerequisite.Release date: `November 20, 2025` [​](https://docs.kalshi.com/changelog#nov-14-2025-2) Nov 14, 2025 New FeatureUpcoming Added `created_time` to `GET /markets` && `GET /market` responses.Release date: `November 20, 2025` [​](https://docs.kalshi.com/changelog#nov-11-2025) Nov 11, 2025 Breaking ChangeReleased Breaking changes planned to `GET /markets` endpoint for performance reasons: Timestamp filters will be mutually exclusive from other timestamp filters and certain status filters. | Compatible Timestamp Filters | Additional Status Filters | | --- | --- | | min\_created\_ts, max\_created\_ts | `unopened`, `open`, _empty_ | | min\_close\_ts, max\_close\_ts | `closed`, _empty_ | | min\_settled\_ts, max\_settled\_ts | `settled`, _empty_ | [​](https://docs.kalshi.com/changelog#nov-11-2025-2) Nov 11, 2025 New FeatureReleased Added new timestamp filters for the `GET /markets` endpoint: * `min_created_ts` * `max_created_ts` * `min_settled_ts` * `max_settled_ts` [​](https://docs.kalshi.com/changelog#nov-7-2025) Nov 7, 2025 Breaking ChangeUpcoming * `GET /portfolio/positions` will no longer return `resting_orders_count` in both the `event_positions` and `market_positions` field. * The `resting_order_count` filter on `GET /portfolio/positions` will no longer be supported. Requests specifying this filter will return a 400 error. Expected release: `November 13, 2025` [​](https://docs.kalshi.com/changelog#nov-13-2025) Nov 13, 2025 Upcoming `GET /portfolio/settlements` now returns the sum of trade fees paid by the user on a settled market position. [​](https://docs.kalshi.com/changelog#nov-6-2025) Nov 6, 2025 Bug FixUpcoming Fixed two issues with the `GET /events` endpoint’s `limit` parameter: * **Default increased**: The default limit is now 200 (previously 100) to return more results per page * **Parameter**: Requests with `with_nested_markets=true` now properly respect `limit=200` instead of being capped at 100 [​](https://docs.kalshi.com/changelog#nov-6-2025-2) Nov 6, 2025 Upcoming The `GET /portfolio/positions` endpoint now includes `total_cost_shares`, which tracks the total number of shares traded on an event (including both YES and NO contracts). [​](https://docs.kalshi.com/changelog#nov-6-2025-3) Nov 6, 2025 New FeatureUpcoming Added comprehensive support for multivariate events (combos) with new API endpoints and enhanced filtering:**New Endpoint and deprecation of multivariate events in GetEvents endpoint** * `GET /events/multivariate` - Retrieve multivariate events with filtering by series and collection ticker. * `GET /events` will EXCLUDE multivariate events upon the next release (November 13th). Please use the new endpoint! **Enhanced Market Filtering:** * `GET /markets` now supports `mve_filter` parameter: * `"only"` - Returns only multivariate events * `"exclude"` - Excludes multivariate events * No parameter - Returns all events (default behavior) Expected release: `November 6th, 2025` [​](https://docs.kalshi.com/changelog#oct-24-2025) Oct 24, 2025 Bug FixUpcoming Fixed batch order creation to return proper error details when post-only orders cross the market. The response now includes: * Error code: `"invalid order"` * Error details: `"post only cross"` This makes the batch endpoint consistent with single order creation and provides clear feedback on why post-only orders were rejected. [​](https://docs.kalshi.com/changelog#oct-20-2025) Oct 20, 2025 Released The `GET /portfolio/orders` endpoint’s `event_ticker` parameter now supports filtering by multiple events using comma-separated values.**Example usage:** Report incorrect code Copy Ask AI GET /portfolio/orders?event_ticker=EVENT1,EVENT2,EVENT3 **Backward Compatible:** * Single event ticker queries continue to work as before * Multiple event tickers return orders from all specified events [​](https://docs.kalshi.com/changelog#oct-19-2025) Oct 19, 2025 Bug FixReleased Fixed missing fields in Quote responses: `rfq_target_cost_centi_cents`, `rfq_creator_order_id`, and `creator_order_id` are now properly included in all Quote-related endpoints. [​](https://docs.kalshi.com/changelog#oct-16-2025) Oct 16, 2025 Released The `GET /events` endpoint now supports an optional flag, `with_milestones`, that includes all milestones related to the returned events.Expected release: `October 16, 2025` [​](https://docs.kalshi.com/changelog#oct-14-2025) Oct 14, 2025 Released The order returned by create order is now the same model as the model returned by get order. [​](https://docs.kalshi.com/changelog#oct-13-2025) Oct 13, 2025 Released The `GET /v2/incentive_programs` and `GET /incentive_programs` endpoints now return a `series_ticker` field for each incentive program.Expected release: `October 13, 2025` [​](https://docs.kalshi.com/changelog#oct-10-2025) Oct 10, 2025 Breaking ChangeReleased The `price_level_structure` field has been moved from the event level to the market level. Each market now has its own `price_level_structure` field.**Affected endpoints:** * `GET /trade-api/v2/events` * `GET /trade-api/v2/events/:event_ticker` * `GET /trade-api/v2/markets` * `GET /trade-api/v2/markets/:ticker` **Note:** The `price_level_structure` field on event objects is now deprecated and will be removed. Please use the field on individual market objects instead.Expected release date: `Oct 15th, 2025` [​](https://docs.kalshi.com/changelog#oct-13-2025-2) Oct 13, 2025 Bug FixBreaking ChangeReleased Fixed the `GET /series` endpoint’s tags parameter to properly support tags containing spaces. Previously, the parameter would split on both commas AND spaces, breaking searches for tags like “Rotten Tomatoes”.**Breaking Change:** * The `tags` query parameter now **only** splits on commas (`,`), not spaces * Tags with spaces (e.g., “Rotten Tomatoes”) now work correctly * Multiple tags must be comma-separated: `?tags=Rotten Tomatoes,Television` **Before (broken):** Report incorrect code Copy Ask AI GET /series?tags=Rotten Tomatoes // Was incorrectly parsed as: ["Rotten", "Tomatoes"] // Result: No matches found **After (fixed):** Report incorrect code Copy Ask AI GET /series?tags=Rotten Tomatoes // Correctly parsed as: ["Rotten Tomatoes"] // Result: Returns series with the "Rotten Tomatoes" tag GET /series?tags=Rotten Tomatoes,Television // Correctly parsed as: ["Rotten Tomatoes", "Television"] // Result: Returns series with either tag This change may affect integrations that relied on space-separated tags. Please update to use comma-separated tags only. [​](https://docs.kalshi.com/changelog#oct-8-2025) Oct 8, 2025 Bug FixReleased Fixed routing inconsistency where certain collection endpoints required trailing slashes, causing unnecessary 301 redirects for requests without them.**Endpoints now returning 200 for requests without trailing slash** (previously returned 301): * `GET /milestones` * `GET /structured_targets` * `GET /multivariate_event_collections` * `GET /series` * `GET /api_keys` * `POST /api_keys` **Note:** Requests with trailing slashes (e.g., `/milestones/`) will now receive a 301 redirect to the version without the trailing slash, which is the opposite of the previous behavior. [​](https://docs.kalshi.com/changelog#oct-9-2025) Oct 9, 2025 Released Subpenny fields have been added to orders (`taker_fees_dollars`, `maker_fees_dollars`), as well as to public trades (`yes_price_dollars`, `no_price_dollars`).Endpoints affected: * `GET /trade-api/v2/portfolio/orders` * `GET /trade-api/v2/markets/trades` [​](https://docs.kalshi.com/changelog#oct-9-2025-2) Oct 9, 2025 Released Fields have been added to all RFQ and quote messages to support subpenny pricing via the dollar normalized price fields. For more info reference: * [Subpenny Pricing](https://docs.kalshi.com/getting_started/subpenny_pricing) * [Websocket Documentation](https://docs.kalshi.com/websockets) [​](https://docs.kalshi.com/changelog#oct-7-2025) Oct 7, 2025 Released Enhanced the existing `GET /portfolio/balance` endpoint to include a `portfolio_value` field that provides the total portfolio value (available balance plus current market value of all positions), both in cents. [​](https://docs.kalshi.com/changelog#oct-1-2025) Oct 1, 2025 Released The `GET /series/fee_changes` endpoint now returns user-facing fee type names (`quadratic`, `quadratic_with_maker_fees`, `flat`) instead of internal fee structure names. This change also applies to CustomerIO notifications for scheduled series fee updates.Expected release: `October 1, 2025` [​](https://docs.kalshi.com/changelog#sep-25-2025) Sep 25, 2025 Released Repeated subscriptions on the same websocket call will no longer error. If passing the same market tickers as before, no action will be taken. If passing new market tickers, they will be added to your existing subscription.Additionally, the user may supply WS Command `list_subscriptions` to view their existing subscriptions.Expected release: `October 1, 2025` [​](https://docs.kalshi.com/changelog#sep-25-2025-2) Sep 25, 2025 Released For optimization purposes, partial fills generated by self-crossing FoK orders are not rolled back. If a FoK order self-crosses, order execution proceeds based on `self_trade_prevention_type`: * `taker_at_cross`: the taker is canceled, execution stops. Any partial fills are executed. * `maker`: the maker is canceled, execution continues. After execution, remaining taker quantity is canceled. Any fills are executed. This fixes a bug where partially filled FoK orders with Maker STP entered into the book after self-crossing. Expected enforced date: `Oct 1, 2025`. [​](https://docs.kalshi.com/changelog#sep-22-2025) Sep 22, 2025 Released User seeking a simple way to determine the direction of their fill should reference purchased\_side. Both BUY YES or SELL NO result in purchased\_side = YES. The addition of this field is the first step in standardizing the fills websocket and REST endpoints, which have different conventions for the interpretation ‘side’ and ‘user\_action’.Expected Enforce Date: deprecation date for existing fields not yet scheduled. [​](https://docs.kalshi.com/changelog#sep-21-2025) Sep 21, 2025 Released Added new public API endpoint for getting all of a series’ scheduled fees: * `GET /series/fee_changes` - Get a series’ fee changes. If query string parameter show\_historical is set to true, ALL fee changes previous and upcoming will be shown. If set to false, only upcoming fee changes will be shown [​](https://docs.kalshi.com/changelog#sep-25-2025-3) Sep 25, 2025 Breaking ChangeReleased Specifying `order_type` is no longer required and only `limit` type orders will be supported. Price must be supplied based on the underlying market structure. Example usage: Report incorrect code Copy Ask AI {"yes_price": 99, "side: "yes"} // buy yes or sell no at market price {"no_price": 99, "side: "no"} // buy no or sell yes at market price Expected enforce date: `Sep 25, 2025` [​](https://docs.kalshi.com/changelog#sep-18-2025) Sep 18, 2025 Breaking changeReleased WebSocket connections per user are limited by usage tier. The default limit begins at 200 and increases based on API usage tier. [​](https://docs.kalshi.com/changelog#sep-18-2025-2) Sep 18, 2025 Released A new WS channel is being introduced for streaming information related to pre-trade communications (RFQs and quotes). [​](https://docs.kalshi.com/changelog#sep-15-2025) Sep 15, 2025 Released Additional metadata is being added to RFQs on multivarate events (MVEs) that break down their component parts explicitly. Market payloads are also being expanded with these new optional fields that are filled only for MVE markets. [​](https://docs.kalshi.com/changelog#sep-15-2025-2) Sep 15, 2025 Released Added new public API endpoint for event candlesticks: * `GET /candlesticks` - Get candlesticks for all markets associated with an event. If the # of candlesticks exceeds 5000, paginate the results and return an adjustedEndTs which should be used as the start\_ts for your next request. [​](https://docs.kalshi.com/changelog#sept-11-2025) Sept 11, 2025 SDKReleased The TypeScript SDK is now available through NPM! Install with `npm install kalshi-typescript`.Documentation and examples available at docs.kalshi.com [​](https://docs.kalshi.com/changelog#sep-11-2025) Sep 11, 2025 Released Added new public API endpoint for forecast percentiles history: * `GET /forecast_percentiles_history` - Get percentile history of a event forecast [​](https://docs.kalshi.com/changelog#sep-10-2025) Sep 10, 2025 Released Added new public API endpoint for incentive programs (not yet live): * `GET /incentive_programs` - List incentive programs with filtering options (by market ticker, active status, payout status) [​](https://docs.kalshi.com/changelog#sep-9-2025) Sep 9, 2025 Released Subpenny pricing fields have been added to websocket messages. Any message bearing price in cents will now also bear an equivalent fixed-point dollars field.For more info, see [Subpenny Pricing](https://docs.kalshi.com/getting_started/subpenny_pricing) . [​](https://docs.kalshi.com/changelog#sep-9-2025-2) Sep 9, 2025 Released Both the individual and batch `GET` events endpoints now also return `available_on_brokers` which indicates that they are available on intermediate platforms/ brokers. [​](https://docs.kalshi.com/changelog#sep-6-2025) Sep 6, 2025 Breaking ChangeReleased The python SDK is being generated from our OpenAPI spec and is available through pip with pip install kalshi-python. Docs for the new SDK are available on docs.kalshi.com/python-sdk. [​](https://docs.kalshi.com/changelog#aug-31-2025) Aug 31, 2025 Breaking ChangeReleased Subpenny pricing fields have been added to APIs involving price, fees, and money in general. E.g. next to a field called `"price": 12` (representing 12 cents), you will also see `"price_dollars": "0.1200"`, which is a string bearing a fixed-point representation of money accuate to at 4 decimal points.For now, this change is read-only, meaning that the minimum allowable tick size for orders is still 1c. Eventually, we will introduce sub-penny pricing on orders. For now, please prepare for an eventual migration to the higher granularity price representation.For more info, see [Subpenny Pricing](https://docs.kalshi.com/getting_started/subpenny_pricing) . [​](https://docs.kalshi.com/changelog#sep-2-2025) Sep 2, 2025 Released The market payload has been updated to include two new fields that describe markets which are part of Multivariate Events. [​](https://docs.kalshi.com/changelog#sep-2-2025-2) Sep 2, 2025 Released The market payload has been updated to include two new fields that describe markets which are part of Multivariate Events. [​](https://docs.kalshi.com/changelog#aug-21-2025) Aug 21, 2025 Released The MVE payload has been expanded to support more flexible structures. Several fields that are now redundant are deprecated, but not yet removed. [​](https://docs.kalshi.com/changelog#aug-21-2025-2) Aug 21, 2025 New FeatureReleased The Settlements API now includes the settlement value for a yes contract. [​](https://docs.kalshi.com/changelog#aug-21-2025-3) Aug 21, 2025 Bug FixReleased The get\_milestones endpoint now uses case-insensitive matching for the category parameter, resolving inconsistent filtering behavior between “Sports” and “sports”. [​](https://docs.kalshi.com/changelog#aug-14-2025) Aug 14, 2025 New FeatureReleased Filtering events by close ts and series by tags supported in the API. [​](https://docs.kalshi.com/changelog#aug-13-2025) Aug 13, 2025 Released The batch order endpoints are now available to all API users in the demo environment:**Affected Endpoints:** * `POST /portfolio/orders/batched` (BatchCreateOrders) * `DELETE /portfolio/orders/batched` (BatchCancelOrders) **Changes:** * Basic tier users can now access batch endpoints in demo environment * Production environment remains unchanged - Advanced tier or higher still required * Rate limits still apply based on user tier This change enables developers to test batch order functionality without needing Advanced tier access in the demo environment. [​](https://docs.kalshi.com/changelog#aug-13-2025-2) Aug 13, 2025 DocumentationReleased The error messages when an incorrect API signature is passed have been improved [​](https://docs.kalshi.com/changelog#aug-9-2025) Aug 9, 2025 DocumentationReleased The OpenAPI specification for the Kalshi API is now available at `https://docs.kalshi.com/openapi.yaml`. This allows developers to easily generate client libraries and integrate with the API using OpenAPI-compatible tools. [​](https://docs.kalshi.com/changelog#aug-8-2025) Aug 8, 2025 ReleasedNew Feature Added `client_order_id` field to orderbook delta WebSocket messages. This field appears only when you caused the orderbook change and contains the client\_order\_id of your order that triggered the delta.**WebSocket Message Enhancement:** * New field: `client_order_id` (string, optional) * Present only when the authenticated user’s order causes the orderbook change * Contains the client-provided order ID of the triggering order See the WebSocket documentation for implementation details. [​](https://docs.kalshi.com/changelog#aug-1-2025) Aug 1, 2025 ReleasedNew Feature Added `GET /portfolio/orders/queue_positions` endpoint for retrieving queue positions of multiple resting orders.**Request Parameters:** * `market_tickers` (optional): Array of market tickers to filter by * `event_ticker` (optional): Event ticker to filter by Note: You must specify one of `market_tickers` and `event_ticker` in the request. [​](https://docs.kalshi.com/changelog#july-31-2025) July 31, 2025 ReleasedBreaking ChangeDocumentation We are migrating our API documentation to a new platform: * **RSS feed moved** from `https://trading-api.readme.io/changelog.rss` to `https://docs.kalshi.com/changelog/rss.xml` * **Documentation site** `trading-api.readme.io` is now deprecated * **New documentation home**: `https://docs.kalshi.com` * Historical changelog entries will not be backfilled to the new RSS feed Please update your bookmarks and RSS subscriptions. [​](https://docs.kalshi.com/changelog#july-31-2025-2) July 31, 2025 Released The GetEventMetadata endpoint has been expanded to include settlement sources. [​](https://docs.kalshi.com/changelog#july-29-2025) July 29, 2025 ReleasedBreaking Change The GetApiVersion endpoint has been removed. API versioning will not be available for the time being. ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Understanding Pagination - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/pagination#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Understanding Pagination [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [How Pagination Works](https://docs.kalshi.com/getting_started/pagination#how-pagination-works) * [Using Cursors](https://docs.kalshi.com/getting_started/pagination#using-cursors) * [Example: Paginating Through Markets](https://docs.kalshi.com/getting_started/pagination#example-paginating-through-markets) * [Pagination Parameters](https://docs.kalshi.com/getting_started/pagination#pagination-parameters) * [Best Practices](https://docs.kalshi.com/getting_started/pagination#best-practices) * [Endpoints Supporting Pagination](https://docs.kalshi.com/getting_started/pagination#endpoints-supporting-pagination) * [Common Patterns](https://docs.kalshi.com/getting_started/pagination#common-patterns) * [Fetching Recent Items](https://docs.kalshi.com/getting_started/pagination#fetching-recent-items) * [Filtering While Paginating](https://docs.kalshi.com/getting_started/pagination#filtering-while-paginating) * [Detecting New Items](https://docs.kalshi.com/getting_started/pagination#detecting-new-items) * [Next Steps](https://docs.kalshi.com/getting_started/pagination#next-steps) The Kalshi API uses cursor-based pagination to help you efficiently navigate through large datasets. This guide explains how pagination works and provides examples for handling paginated responses. [​](https://docs.kalshi.com/getting_started/pagination#how-pagination-works) How Pagination Works ---------------------------------------------------------------------------------------------------- When making requests to list endpoints (like `/markets`, `/events`, or `/series`), the API returns results in pages to keep response sizes manageable. Each page contains: * **Data array**: The actual items for the current page (markets, events, etc.) * **Cursor field**: A token that points to the next page of results * **Limit**: The maximum number of items per page (default: 100) [​](https://docs.kalshi.com/getting_started/pagination#using-cursors) Using Cursors -------------------------------------------------------------------------------------- To paginate through results: 1. Make your initial request without a cursor 2. Check if the response includes a `cursor` field 3. If a cursor exists, make another request with `?cursor={cursor_value}` 4. Continue until the cursor is `null` (no more pages) [​](https://docs.kalshi.com/getting_started/pagination#example-paginating-through-markets) Example: Paginating Through Markets --------------------------------------------------------------------------------------------------------------------------------- Python JavaScript Report incorrect code Copy Ask AI import requests def get_all_markets(series_ticker): """Fetch all markets for a series, handling pagination""" all_markets = [] cursor = None base_url = "https://api.elections.kalshi.com/trade-api/v2/markets" while True: # Build URL with cursor if we have one url = f"{base_url}?series_ticker={series_ticker}&limit=100" if cursor: url += f"&cursor={cursor}" response = requests.get(url) data = response.json() # Add markets from this page all_markets.extend(data['markets']) # Check if there are more pages cursor = data.get('cursor') if not cursor: break print(f"Fetched {len(data['markets'])} markets, total: {len(all_markets)}") return all_markets # Example usage markets = get_all_markets("KXHIGHNY") print(f"Total markets found: {len(markets)}") [​](https://docs.kalshi.com/getting_started/pagination#pagination-parameters) Pagination Parameters ------------------------------------------------------------------------------------------------------ Most list endpoints support these pagination parameters: * **`cursor`**: Token from previous response to get the next page * **`limit`**: Number of items per page (typically 1-100, default: 100) [​](https://docs.kalshi.com/getting_started/pagination#best-practices) Best Practices ---------------------------------------------------------------------------------------- 1. **Handle rate limits**: When paginating through large datasets, be mindful of [rate limits](https://docs.kalshi.com/getting_started/rate_limits) 2. **Set appropriate limits**: Use smaller page sizes if you only need a few items 3. **Cache results**: Store paginated data locally to avoid repeated API calls 4. **Check for changes**: Data can change between requests, so consider implementing refresh logic [​](https://docs.kalshi.com/getting_started/pagination#endpoints-supporting-pagination) Endpoints Supporting Pagination -------------------------------------------------------------------------------------------------------------------------- The following endpoints support cursor-based pagination: * [Get Markets](https://docs.kalshi.com/api-reference/market/get-markets) - `/markets` * [Get Events](https://docs.kalshi.com/api-reference/market/get-events) - `/events` * [Get Series](https://docs.kalshi.com/api-reference/market/get-series) - `/series` * [Get Trades](https://docs.kalshi.com/api-reference/market/get-trades) - `/markets/trades` * [Get Portfolio History](https://docs.kalshi.com/api-reference/portfolio/get-portfolio-history) - `/portfolio/history` * [Get Fills](https://docs.kalshi.com/api-reference/portfolio/get-fills) - `/portfolio/fills` * [Get Orders](https://docs.kalshi.com/api-reference/portfolio/get-orders) - `/portfolio/orders` [​](https://docs.kalshi.com/getting_started/pagination#common-patterns) Common Patterns ------------------------------------------------------------------------------------------ ### [​](https://docs.kalshi.com/getting_started/pagination#fetching-recent-items) Fetching Recent Items If you only need recent items, you can limit results without pagination: Report incorrect code Copy Ask AI # Get just the 10 most recent markets url = "https://api.elections.kalshi.com/trade-api/v2/markets?limit=10&status=open" ### [​](https://docs.kalshi.com/getting_started/pagination#filtering-while-paginating) Filtering While Paginating You can combine filters with pagination: Report incorrect code Copy Ask AI # Get all open markets for a series url = f"{base_url}?series_ticker={ticker}&status=open&limit=100&cursor={cursor}" ### [​](https://docs.kalshi.com/getting_started/pagination#detecting-new-items) Detecting New Items To check for new items since your last fetch: 1. Store the first item’s ID or timestamp from your previous fetch 2. Paginate through results until you find that item 3. Everything before it is new [​](https://docs.kalshi.com/getting_started/pagination#next-steps) Next Steps -------------------------------------------------------------------------------- Now that you understand pagination, you can efficiently work with large datasets in the Kalshi API. For more details on specific endpoints, check the [API Reference](https://docs.kalshi.com/api-reference) . [Rate Limits and Tiers](https://docs.kalshi.com/getting_started/rate_limits) [Orderbook Responses](https://docs.kalshi.com/getting_started/orderbook_responses) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Milestones - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/MilestonesApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Milestones [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [get\_milestone](https://docs.kalshi.com/python-sdk/api/MilestonesApi#get-milestone) * [Example](https://docs.kalshi.com/python-sdk/api/MilestonesApi#example) * [Parameters](https://docs.kalshi.com/python-sdk/api/MilestonesApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/MilestonesApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MilestonesApi#http-response-details) * [get\_milestones](https://docs.kalshi.com/python-sdk/api/MilestonesApi#get-milestones) * [Example](https://docs.kalshi.com/python-sdk/api/MilestonesApi#example-2) * [Parameters](https://docs.kalshi.com/python-sdk/api/MilestonesApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/MilestonesApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MilestonesApi#http-response-details-2) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**get\_milestone**](https://docs.kalshi.com/python-sdk/api/MilestonesApi#get-milestone) | **GET** /milestones/ | Get Milestone | | [**get\_milestones**](https://docs.kalshi.com/python-sdk/api/MilestonesApi#get-milestones) | **GET** /milestones | Get Milestones | [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#get-milestone) **get\_milestone** ============================================================================================= > GetMilestoneResponse get\_milestone(milestone\_id) Get Milestone Get a single milestone by ID ### [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#example) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_milestone_response import GetMilestoneResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) milestone_id = 'milestone_id_example' # str | Milestone ID try: # Get Milestone api_response = client.get_milestone(milestone_id) print("The response of MilestonesApi->get_milestone:\n") pprint(api_response) except Exception as e: print("Exception when calling MilestonesApi->get_milestone: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **milestone\_id** | **str** | Milestone ID | | ### [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#return-type) Return type [**GetMilestoneResponse**](https://docs.kalshi.com/python-sdk/models/GetMilestoneResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **200** | Milestone retrieved successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MilestonesApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#get-milestones) **get\_milestones** =============================================================================================== > GetMilestonesResponse get\_milestones(status=status, limit=limit) Get Milestones Get all milestones ### [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#example-2) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_milestones_response import GetMilestonesResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) status = 'status_example' # str | Filter by milestone status (optional) limit = 100 # int | Number of items per page (minimum 1, maximum 500) (optional) (default to 100) try: # Get Milestones api_response = client.get_milestones(status=status, limit=limit) print("The response of MilestonesApi->get_milestones:\n") pprint(api_response) except Exception as e: print("Exception when calling MilestonesApi->get_milestones: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **status** | **str** | Filter by milestone status | \[optional\] | | **limit** | **int** | Number of items per page (minimum 1, maximum 500) | \[optional\] \[default to 100\] | ### [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#return-type-2) Return type [**GetMilestonesResponse**](https://docs.kalshi.com/python-sdk/models/GetMilestonesResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MilestonesApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **200** | Milestones retrieved successfully | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MilestonesApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [Series](https://docs.kalshi.com/python-sdk/api/SeriesApi) [MultivariateCollections](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Series - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/SeriesApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Series [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [get\_series](https://docs.kalshi.com/python-sdk/api/SeriesApi#get-series) * [Example](https://docs.kalshi.com/python-sdk/api/SeriesApi#example) * [Parameters](https://docs.kalshi.com/python-sdk/api/SeriesApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/SeriesApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/SeriesApi#http-response-details) * [get\_series\_by\_ticker](https://docs.kalshi.com/python-sdk/api/SeriesApi#get-series-by-ticker) * [Example](https://docs.kalshi.com/python-sdk/api/SeriesApi#example-2) * [Parameters](https://docs.kalshi.com/python-sdk/api/SeriesApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/SeriesApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/SeriesApi#http-response-details-2) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**get\_series**](https://docs.kalshi.com/python-sdk/api/SeriesApi#get-series) | **GET** /series | Get Series | | [**get\_series\_by\_ticker**](https://docs.kalshi.com/python-sdk/api/SeriesApi#get-series-by-ticker) | **GET** /series/ | Get Series by Ticker | [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#get-series) **get\_series** =================================================================================== > GetSeriesResponse get\_series(status=status) Get Series Get all market series ### [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#example) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_series_response import GetSeriesResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) status = 'status_example' # str | Filter by series status (optional) try: # Get Series api_response = client.get_series(status=status) print("The response of SeriesApi->get_series:\n") pprint(api_response) except Exception as e: print("Exception when calling SeriesApi->get_series: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **status** | **str** | Filter by series status | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#return-type) Return type [**GetSeriesResponse**](https://docs.kalshi.com/python-sdk/models/GetSeriesResponse) ### [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **200** | Series retrieved successfully | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/SeriesApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#get-series-by-ticker) **get\_series\_by\_ticker** ========================================================================================================= > GetSeriesByTickerResponse get\_series\_by\_ticker(ticker) Get Series by Ticker Get a single series by its ticker ### [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#example-2) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_series_by_ticker_response import GetSeriesByTickerResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) ticker = 'ticker_example' # str | The series ticker try: # Get Series by Ticker api_response = client.get_series_by_ticker(ticker) print("The response of SeriesApi->get_series_by_ticker:\n") pprint(api_response) except Exception as e: print("Exception when calling SeriesApi->get_series_by_ticker: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | **str** | The series ticker | | ### [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#return-type-2) Return type [**GetSeriesByTickerResponse**](https://docs.kalshi.com/python-sdk/models/GetSeriesByTickerResponse) ### [​](https://docs.kalshi.com/python-sdk/api/SeriesApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **200** | Series retrieved successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/SeriesApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [Events](https://docs.kalshi.com/python-sdk/api/EventsApi) [Milestones](https://docs.kalshi.com/python-sdk/api/MilestonesApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Rate Limits and Tiers - API Documentation [Skip to main content](https://docs.kalshi.com/getting_started/rate_limits#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation Rate Limits and Tiers [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [Access tiers](https://docs.kalshi.com/getting_started/rate_limits#access-tiers) [​](https://docs.kalshi.com/getting_started/rate_limits#access-tiers) Access tiers ------------------------------------------------------------------------------------- | Tier | Read | Write | | --- | --- | --- | | Basic | 20 per second | 10 per second | | Advanced | 30 per second | 30 per second | | Premier | 100 per second | 100 per second | | Prime | 400 per second | 400 per second | Qualification for tiers: * Basic: Completing signup * Advanced: Completing [https://kalshi.typeform.com/advanced-api](https://kalshi.typeform.com/advanced-api) * Premier: 3.75% of exchange traded volume in a given month * Prime: 7.5% of exchange traded volume in a given month In addition to the volume targets, technical competency is a requirement for Premier/Prime access. Before providing access to the Premier/Prime tiers, the Exchange will establish that the trader/trading entity has the following requirements met: * Knowledge of common security practices for API usage * Proficiency in setting up monitoring for API usage, and ability to monitor API usage in near real-time * Understanding and implementation of rate limiting and throttling mechanisms imposed by the API, and the ability to self-limit load * Awareness of legal and compliance aspects related to API usage Only the following APIs fall under the write limit, for the batch APIs, each item in the batch is considered 1 transaction with the sole exception of BatchCancelOrders, where each cancel counts as 0.2 transactions: * [BatchCreateOrders](https://docs.kalshi.com/api-reference/portfolio/batch-create-orders) * [BatchCancelOrders](https://docs.kalshi.com/api-reference/portfolio/batch-cancel-orders) * [CreateOrder](https://docs.kalshi.com/api-reference/portfolio/create-order) * [CancelOrder](https://docs.kalshi.com/api-reference/portfolio/cancel-order) * [AmendOrder](https://docs.kalshi.com/api-reference/portfolio/amend-order) * [DecreaseOrder](https://docs.kalshi.com/api-reference/portfolio/decrease-order) We reserve the right to downgrade your API rate limit tier from Prime and Premier when you have shown lack of activity in the previous period. At any time, any Member that uses FIX or is at the highest possible API tier is eligible for an upgrade to its rate limit upon demonstration that such a tier is necessary for its bona fide market activity. [API Keys](https://docs.kalshi.com/getting_started/api_keys) [Understanding Pagination](https://docs.kalshi.com/getting_started/pagination) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # ApiKeys - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes ApiKeys [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [create\_api\_key](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#create-api-key) * [Parameters](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#http-response-details) * [delete\_api\_key](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#delete-api-key) * [Parameters](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#http-response-details-2) * [generate\_api\_key](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#generate-api-key) * [Parameters](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#parameters-3) * [Return type](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#return-type-3) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#http-response-details-3) * [get\_api\_keys](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#get-api-keys) * [Parameters](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#parameters-4) * [Return type](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#return-type-4) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#http-response-details-4) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**create\_api\_key**](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#create-api-key) | **POST** /api\_keys | Create API Key | | [**delete\_api\_key**](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#delete-api-key) | **DELETE** /api\_keys/ | Delete API Key | | [**generate\_api\_key**](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#generate-api-key) | **POST** /api\_keys/generate | Generate API Key | | [**get\_api\_keys**](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#get-api-keys) | **GET** /api\_keys | Get API Keys | [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#create-api-key) **create\_api\_key** ============================================================================================= > CreateApiKeyResponse create\_api\_key(create\_api\_key\_request) Create API Key Endpoint for creating a new API key with a user-provided public key. This endpoint allows users with Premier or Market Maker API usage levels to create API keys by providing their own RSA public key. The platform will use this public key to verify signatures on API requests. ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **create\_api\_key\_request** | [**CreateApiKeyRequest**](https://docs.kalshi.com/python-sdk/models/CreateApiKeyRequest) | | | ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#return-type) Return type [**CreateApiKeyResponse**](https://docs.kalshi.com/python-sdk/models/CreateApiKeyResponse) ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **201** | API key created successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized | | **403** | Forbidden - insufficient API usage level | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#delete-api-key) **delete\_api\_key** ============================================================================================= > delete\_api\_key(api\_key) Delete API Key Endpoint for deleting an existing API key. This endpoint permanently deletes an API key. Once deleted, the key can no longer be used for authentication. This action cannot be undone. ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **api\_key** | **str** | API key ID to delete | | ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#return-type-2) Return type void (empty response body) ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **204** | API key successfully deleted | | **400** | Bad request - invalid API key ID | | **401** | Unauthorized | | **404** | API key not found | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#generate-api-key) **generate\_api\_key** ================================================================================================= > GenerateApiKeyResponse generate\_api\_key(generate\_api\_key\_request) Generate API Key Endpoint for generating a new API key with an automatically created key pair. This endpoint generates both a public and private RSA key pair. The public key is stored on the platform, while the private key is returned to the user and must be stored securely. The private key cannot be retrieved again. ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **generate\_api\_key\_request** | [**GenerateApiKeyRequest**](https://docs.kalshi.com/python-sdk/models/GenerateApiKeyRequest) | | | ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#return-type-3) Return type [**GenerateApiKeyResponse**](https://docs.kalshi.com/python-sdk/models/GenerateApiKeyResponse) ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#http-response-details-3) HTTP response details | Status code | Description | | --- | --- | | **201** | API key generated successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#get-api-keys) **get\_api\_keys** ========================================================================================= > GetApiKeysResponse get\_api\_keys() Get API Keys Endpoint for retrieving all API keys associated with the authenticated user. API keys allow programmatic access to the platform without requiring username/password authentication. Each key has a unique identifier and name. ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#parameters-4) Parameters This endpoint does not need any parameter. ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#return-type-4) Return type [**GetApiKeysResponse**](https://docs.kalshi.com/python-sdk/models/GetApiKeysResponse) ### [​](https://docs.kalshi.com/python-sdk/api/ApiKeysApi#http-response-details-4) HTTP response details | Status code | Description | | --- | --- | | **200** | List of API keys retrieved successfully | | **401** | Unauthorized | | **500** | Internal server error | [Exchange](https://docs.kalshi.com/python-sdk/api/ExchangeApi) [TypeScript SDK Quick Start](https://docs.kalshi.com/sdks/typescript/quickstart) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Exchange - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/ExchangeApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Exchange [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [get\_exchange\_announcements](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-announcements) * [Parameters](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details) * [get\_exchange\_schedule](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-schedule) * [Parameters](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details-2) * [get\_exchange\_status](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-status) * [Parameters](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters-3) * [Return type](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type-3) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details-3) * [get\_series\_fee\_changes](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-series-fee-changes) * [Parameters](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters-4) * [Return type](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type-4) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details-4) * [get\_user\_data\_timestamp](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-user-data-timestamp) * [Parameters](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters-5) * [Return type](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type-5) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details-5) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**get\_exchange\_announcements**](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-announcements) | **GET** /exchange/announcements | Get Exchange Announcements | | [**get\_exchange\_schedule**](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-schedule) | **GET** /exchange/schedule | Get Exchange Schedule | | [**get\_exchange\_status**](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-status) | **GET** /exchange/status | Get Exchange Status | | [**get\_series\_fee\_changes**](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-series-fee-changes) | **GET** /series/fee\_changes | Get Series Fee Changes | | [**get\_user\_data\_timestamp**](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-user-data-timestamp) | **GET** /exchange/user\_data\_timestamp | Get User Data Timestamp | [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-announcements) **get\_exchange\_announcements** ====================================================================================================================== > GetExchangeAnnouncementsResponse get\_exchange\_announcements() Get Exchange Announcements Endpoint for getting all exchange-wide announcements. ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters) Parameters This endpoint does not need any parameter. ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type) Return type [**GetExchangeAnnouncementsResponse**](https://docs.kalshi.com/python-sdk/models/GetExchangeAnnouncementsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **200** | Exchange announcements retrieved successfully | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-schedule) **get\_exchange\_schedule** ============================================================================================================ > GetExchangeScheduleResponse get\_exchange\_schedule() Get Exchange Schedule Endpoint for getting the exchange schedule. ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters-2) Parameters This endpoint does not need any parameter. ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type-2) Return type [**GetExchangeScheduleResponse**](https://docs.kalshi.com/python-sdk/models/GetExchangeScheduleResponse) ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **200** | Exchange schedule retrieved successfully | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-exchange-status) **get\_exchange\_status** ======================================================================================================== > ExchangeStatus get\_exchange\_status() Get Exchange Status Endpoint for getting the exchange status. ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters-3) Parameters This endpoint does not need any parameter. ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type-3) Return type [**ExchangeStatus**](https://docs.kalshi.com/python-sdk/models/ExchangeStatus) ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details-3) HTTP response details | Status code | Description | | --- | --- | | **200** | Exchange status retrieved successfully | | **500** | Internal server error | | **503** | Service unavailable | | **504** | Gateway timeout | [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-series-fee-changes) **get\_series\_fee\_changes** =============================================================================================================== > GetSeriesFeeChangesResponse get\_series\_fee\_changes(series\_ticker=series\_ticker, show\_historical=show\_historical) Get Series Fee Changes ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **series\_ticker** | **str** | | \[optional\] | | **show\_historical** | **bool** | | \[optional\] \[default to False\] | ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type-4) Return type [**GetSeriesFeeChangesResponse**](https://docs.kalshi.com/python-sdk/models/GetSeriesFeeChangesResponse) ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details-4) HTTP response details | Status code | Description | | --- | --- | | **200** | Series fee changes retrieved successfully | | **400** | Bad request - invalid input | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#get-user-data-timestamp) **get\_user\_data\_timestamp** ================================================================================================================= > GetUserDataTimestampResponse get\_user\_data\_timestamp() Get User Data Timestamp There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible, combine API responses to PUT/POST/DELETE requests with websocket data to obtain the most accurate view of the exchange state. This endpoint provides an approximate indication of when the data from the following endpoints was last validated: GetBalance, GetOrder(s), GetFills, GetPositions ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#parameters-5) Parameters This endpoint does not need any parameter. ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#return-type-5) Return type [**GetUserDataTimestampResponse**](https://docs.kalshi.com/python-sdk/models/GetUserDataTimestampResponse) ### [​](https://docs.kalshi.com/python-sdk/api/ExchangeApi#http-response-details-5) HTTP response details | Status code | Description | | --- | --- | | **200** | User data timestamp retrieved successfully | | **500** | Internal server error | [StructuredTargets](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi) [ApiKeys](https://docs.kalshi.com/python-sdk/api/ApiKeysApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Portfolio - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/PortfolioApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Portfolio [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [get\_balance](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-balance) * [Parameters](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details) * [get\_fills](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-fills) * [Parameters](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details-2) * [get\_portfolio\_resting\_order\_total\_value](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-portfolio-resting-order-total-value) * [Parameters](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters-3) * [Return type](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type-3) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details-3) * [get\_positions](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-positions) * [Parameters](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters-4) * [Return type](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type-4) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details-4) * [get\_settlements](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-settlements) * [Parameters](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters-5) * [Return type](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type-5) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details-5) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**get\_balance**](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-balance) | **GET** /portfolio/balance | Get Balance | | [**get\_fills**](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-fills) | **GET** /portfolio/fills | Get Fills | | [**get\_portfolio\_resting\_order\_total\_value**](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-portfolio-resting-order-total-value) | **GET** /portfolio/summary/total\_resting\_order\_value | Get Total Resting Order Value | | [**get\_positions**](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-positions) | **GET** /portfolio/positions | Get Positions | | [**get\_settlements**](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-settlements) | **GET** /portfolio/settlements | Get Settlements | [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-balance) **get\_balance** ======================================================================================== > GetBalanceResponse get\_balance() Get Balance Endpoint for getting the balance and portfolio value of a member. Both values are returned in cents. ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters) Parameters This endpoint does not need any parameter. ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type) Return type [**GetBalanceResponse**](https://docs.kalshi.com/python-sdk/models/GetBalanceResponse) ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **200** | Balance retrieved successfully | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-fills) **get\_fills** ==================================================================================== > GetFillsResponse get\_fills(ticker=ticker, order\_id=order\_id, min\_ts=min\_ts, max\_ts=max\_ts, limit=limit, cursor=cursor) Get Fills Endpoint for getting all fills for the member. A fill is when a trade you have is matched. ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | **str** | Filter by market ticker | \[optional\] | | **order\_id** | **str** | Filter by order ID | \[optional\] | | **min\_ts** | **int** | Filter items after this Unix timestamp | \[optional\] | | **max\_ts** | **int** | Filter items before this Unix timestamp | \[optional\] | | **limit** | **int** | Number of results per page. Defaults to 100. Maximum value is 200. | \[optional\] \[default to 100\] | | **cursor** | **str** | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type-2) Return type [**GetFillsResponse**](https://docs.kalshi.com/python-sdk/models/GetFillsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **200** | Fills retrieved successfully | | **400** | Bad request | | **401** | Unauthorized | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-portfolio-resting-order-total-value) **get\_portfolio\_resting\_order\_total\_value** ==================================================================================================================================================== > GetPortfolioRestingOrderTotalValueResponse get\_portfolio\_resting\_order\_total\_value() Get Total Resting Order Value Endpoint for getting the total value, in cents, of resting orders. This endpoint is only intended for use by FCM members (rare). Note: If you’re uncertain about this endpoint, it likely does not apply to you. ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters-3) Parameters This endpoint does not need any parameter. ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type-3) Return type [**GetPortfolioRestingOrderTotalValueResponse**](https://docs.kalshi.com/python-sdk/models/GetPortfolioRestingOrderTotalValueResponse) ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details-3) HTTP response details | Status code | Description | | --- | --- | | **200** | Total resting order value retrieved successfully | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-positions) **get\_positions** ============================================================================================ > GetPositionsResponse get\_positions(cursor=cursor, limit=limit, count\_filter=count\_filter, settlement\_status=settlement\_status, ticker=ticker, event\_ticker=event\_ticker) Get Positions Restricts the positions to those with any of following fields with non-zero values, as a comma separated list. The following values are accepted: position, total\_traded ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **cursor** | **str** | The Cursor represents a pointer to the next page of records in the pagination. Use the value returned from the previous response to get the next page. | \[optional\] | | **limit** | **int** | Parameter to specify the number of results per page. Defaults to 100. | \[optional\] \[default to 100\] | | **count\_filter** | **str** | Restricts the positions to those with any of following fields with non-zero values, as a comma separated list. The following values are accepted - position, total\_traded | \[optional\] | | **settlement\_status** | **str** | Settlement status of the markets to return. Defaults to unsettled. | \[optional\] \[default to unsettled\] | | **ticker** | **str** | Filter by market ticker | \[optional\] | | **event\_ticker** | **str** | Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10). | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type-4) Return type [**GetPositionsResponse**](https://docs.kalshi.com/python-sdk/models/GetPositionsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details-4) HTTP response details | Status code | Description | | --- | --- | | **200** | Positions retrieved successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#get-settlements) **get\_settlements** ================================================================================================ > GetSettlementsResponse get\_settlements(limit=limit, cursor=cursor, ticker=ticker, event\_ticker=event\_ticker, min\_ts=min\_ts, max\_ts=max\_ts) Get Settlements Endpoint for getting the member’s settlements historical track. ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#parameters-5) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | **int** | Number of results per page. Defaults to 100. Maximum value is 200. | \[optional\] \[default to 100\] | | **cursor** | **str** | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | \[optional\] | | **ticker** | **str** | Filter by market ticker | \[optional\] | | **event\_ticker** | **str** | Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10). | \[optional\] | | **min\_ts** | **int** | Filter items after this Unix timestamp | \[optional\] | | **max\_ts** | **int** | Filter items before this Unix timestamp | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#return-type-5) Return type [**GetSettlementsResponse**](https://docs.kalshi.com/python-sdk/models/GetSettlementsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/PortfolioApi#http-response-details-5) HTTP response details | Status code | Description | | --- | --- | | **200** | Settlements retrieved successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [Python SDK Quick Start](https://docs.kalshi.com/sdks/python/quickstart) [Markets](https://docs.kalshi.com/python-sdk/api/MarketsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Delete API Key - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/api-keys/delete-api-key#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation api-keys Delete API Key [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Delete API Key cURL Copy Ask AI curl --request DELETE \ --url https://api.elections.kalshi.com/trade-api/v2/api_keys/{api_key} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' DELETE / api\_keys / {api\_key} Try it Delete API Key cURL Copy Ask AI curl --request DELETE \ --url https://api.elections.kalshi.com/trade-api/v2/api_keys/{api_key} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' #### Authorizations [​](https://docs.kalshi.com/api-reference/api-keys/delete-api-key#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/api-keys/delete-api-key#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/api-keys/delete-api-key#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/api-keys/delete-api-key#parameter-api-key) api\_key string required API key ID to delete #### Response 204 API key successfully deleted [Generate API Key](https://docs.kalshi.com/api-reference/api-keys/generate-api-key) [Get Tags for Series Categories](https://docs.kalshi.com/api-reference/search/get-tags-for-series-categories) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Create API Key - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/api-keys/create-api-key#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation api-keys Create API Key [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Create API Key cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/api_keys \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "name": "", "public_key": "", "scopes": [\ ""\ ] } ' 201 Copy Ask AI { "api_key_id": "" } POST / api\_keys Try it Create API Key cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/api_keys \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "name": "", "public_key": "", "scopes": [\ ""\ ] } ' 201 Copy Ask AI { "api_key_id": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/api-keys/create-api-key#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/api-keys/create-api-key#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/api-keys/create-api-key#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Body application/json [​](https://docs.kalshi.com/api-reference/api-keys/create-api-key#body-name) name string required Name for the API key. This helps identify the key's purpose [​](https://docs.kalshi.com/api-reference/api-keys/create-api-key#body-public-key) public\_key string required RSA public key in PEM format. This will be used to verify signatures on API requests [​](https://docs.kalshi.com/api-reference/api-keys/create-api-key#body-scopes) scopes string\[\] List of scopes to grant to the API key. Valid values are 'read' and 'write'. If 'write' is included, 'read' must also be included. Defaults to full access (\['read', 'write'\]) if not provided. #### Response 201 application/json API key created successfully [​](https://docs.kalshi.com/api-reference/api-keys/create-api-key#response-api-key-id) api\_key\_id string required Unique identifier for the newly created API key [Get API Keys](https://docs.kalshi.com/api-reference/api-keys/get-api-keys) [Generate API Key](https://docs.kalshi.com/api-reference/api-keys/generate-api-key) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get API Keys - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/api-keys/get-api-keys#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation api-keys Get API Keys [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get API Keys cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/api_keys \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 Copy Ask AI { "api_keys": [\ {\ "api_key_id": "",\ "name": "",\ "scopes": [\ ""\ ]\ }\ ] } GET / api\_keys Try it Get API Keys cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/api_keys \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 Copy Ask AI { "api_keys": [\ {\ "api_key_id": "",\ "name": "",\ "scopes": [\ ""\ ]\ }\ ] } #### Authorizations [​](https://docs.kalshi.com/api-reference/api-keys/get-api-keys#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/api-keys/get-api-keys#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/api-keys/get-api-keys#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Response 200 application/json List of API keys retrieved successfully [​](https://docs.kalshi.com/api-reference/api-keys/get-api-keys#response-api-keys) api\_keys object\[\] required List of all API keys associated with the user Show child attributes [Get Fills](https://docs.kalshi.com/api-reference/portfolio/get-fills) [Create API Key](https://docs.kalshi.com/api-reference/api-keys/create-api-key) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # MultivariateCollections - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes MultivariateCollections [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [get\_multivariate\_event\_collection](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#get-multivariate-event-collection) * [Example](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#example) * [Parameters](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#http-response-details) * [get\_multivariate\_event\_collections](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#get-multivariate-event-collections) * [Example](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#example-2) * [Parameters](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#http-response-details-2) * [lookup\_multivariate\_event\_collection\_bundle](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#lookup-multivariate-event-collection-bundle) * [Example](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#example-3) * [Parameters](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#parameters-3) * [Return type](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#return-type-3) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#http-response-details-3) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**get\_multivariate\_event\_collection**](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#get-multivariate-event-collection) | **GET** /multivariate\_event\_collections/ | Get Multivariate Event Collection | | [**get\_multivariate\_event\_collections**](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#get-multivariate-event-collections) | **GET** /multivariate\_event\_collections | Get Multivariate Event Collections | | [**lookup\_multivariate\_event\_collection\_bundle**](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#lookup-multivariate-event-collection-bundle) | **POST** /multivariate\_event\_collections//lookup | Lookup Multivariate Event Collection Bundle | [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#get-multivariate-event-collection) **get\_multivariate\_event\_collection** ==================================================================================================================================================== > GetMultivariateEventCollectionResponse get\_multivariate\_event\_collection(collection\_ticker) Get Multivariate Event Collection Get a single multivariate event collection by ticker ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#example) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_multivariate_event_collection_response import GetMultivariateEventCollectionResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) collection_ticker = 'collection_ticker_example' # str | Collection ticker try: # Get Multivariate Event Collection api_response = client.get_multivariate_event_collection(collection_ticker) print("The response of MultivariateCollectionsApi->get_multivariate_event_collection:\n") pprint(api_response) except Exception as e: print("Exception when calling MultivariateCollectionsApi->get_multivariate_event_collection: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **collection\_ticker** | **str** | Collection ticker | | ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#return-type) Return type [**GetMultivariateEventCollectionResponse**](https://docs.kalshi.com/python-sdk/models/GetMultivariateEventCollectionResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **200** | Collection retrieved successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#get-multivariate-event-collections) **get\_multivariate\_event\_collections** ====================================================================================================================================================== > GetMultivariateEventCollectionsResponse get\_multivariate\_event\_collections(status=status) Get Multivariate Event Collections Get all multivariate event collections ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#example-2) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_multivariate_event_collections_response import GetMultivariateEventCollectionsResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) status = 'status_example' # str | Filter by multivariate collection status (optional) try: # Get Multivariate Event Collections api_response = client.get_multivariate_event_collections(status=status) print("The response of MultivariateCollectionsApi->get_multivariate_event_collections:\n") pprint(api_response) except Exception as e: print("Exception when calling MultivariateCollectionsApi->get_multivariate_event_collections: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **status** | **str** | Filter by multivariate collection status | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#return-type-2) Return type [**GetMultivariateEventCollectionsResponse**](https://docs.kalshi.com/python-sdk/models/GetMultivariateEventCollectionsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **200** | Collections retrieved successfully | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#lookup-multivariate-event-collection-bundle) **lookup\_multivariate\_event\_collection\_bundle** ========================================================================================================================================================================= > LookupBundleResponse lookup\_multivariate\_event\_collection\_bundle(collection\_ticker, lookup\_bundle\_request) Lookup Multivariate Event Collection Bundle Lookup a bundle in a multivariate event collection ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#example-3) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.lookup_bundle_request import LookupBundleRequest from kalshi_python.models.lookup_bundle_response import LookupBundleResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) collection_ticker = 'collection_ticker_example' # str | Collection ticker lookup_bundle_request = kalshi_python.LookupBundleRequest() # LookupBundleRequest | try: # Lookup Multivariate Event Collection Bundle api_response = client.lookup_multivariate_event_collection_bundle(collection_ticker, lookup_bundle_request) print("The response of MultivariateCollectionsApi->lookup_multivariate_event_collection_bundle:\n") pprint(api_response) except Exception as e: print("Exception when calling MultivariateCollectionsApi->lookup_multivariate_event_collection_bundle: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **collection\_ticker** | **str** | Collection ticker | | | **lookup\_bundle\_request** | [**LookupBundleRequest**](https://docs.kalshi.com/python-sdk/models/LookupBundleRequest) | | | ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#return-type-3) Return type [**LookupBundleResponse**](https://docs.kalshi.com/python-sdk/models/LookupBundleResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#http-response-details-3) HTTP response details | Status code | Description | | --- | --- | | **200** | Bundle lookup successful | | **400** | Bad request - invalid input | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MultivariateCollectionsApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [Milestones](https://docs.kalshi.com/python-sdk/api/MilestonesApi) [StructuredTargets](https://docs.kalshi.com/python-sdk/api/StructuredTargetsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Create Quote - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/communications/create-quote#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation communications Create Quote [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Create Quote cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "rfq_id": "", "yes_bid": "0.5600", "no_bid": "0.5600", "rest_remainder": true, "subaccount": 123 } ' 201 400 401 500 Copy Ask AI { "id": "" } POST / communications / quotes Try it Create Quote cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "rfq_id": "", "yes_bid": "0.5600", "no_bid": "0.5600", "rest_remainder": true, "subaccount": 123 } ' 201 400 401 500 Copy Ask AI { "id": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/communications/create-quote#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/communications/create-quote#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/communications/create-quote#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Body application/json [​](https://docs.kalshi.com/api-reference/communications/create-quote#body-rfq-id) rfq\_id string required The ID of the RFQ to quote on [​](https://docs.kalshi.com/api-reference/communications/create-quote#body-yes-bid) yes\_bid string required The bid price for YES contracts, in dollars Example: `"0.5600"` [​](https://docs.kalshi.com/api-reference/communications/create-quote#body-no-bid) no\_bid string required The bid price for NO contracts, in dollars Example: `"0.5600"` [​](https://docs.kalshi.com/api-reference/communications/create-quote#body-rest-remainder) rest\_remainder boolean required Whether to rest the remainder of the quote after execution [​](https://docs.kalshi.com/api-reference/communications/create-quote#body-subaccount) subaccount integer Optional subaccount number to place the quote under (0 for primary, 1-32 for subaccounts) #### Response 201 application/json Quote created successfully [​](https://docs.kalshi.com/api-reference/communications/create-quote#response-id) id string required The ID of the newly created quote [Get Quotes](https://docs.kalshi.com/api-reference/communications/get-quotes) [Get Quote](https://docs.kalshi.com/api-reference/communications/get-quote) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Markets - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/MarketsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Markets [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [get\_market](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market) * [Example](https://docs.kalshi.com/python-sdk/api/MarketsApi#example) * [Parameters](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details) * [get\_market\_candlesticks](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market-candlesticks) * [Example](https://docs.kalshi.com/python-sdk/api/MarketsApi#example-2) * [Parameters](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details-2) * [get\_market\_orderbook](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market-orderbook) * [Example](https://docs.kalshi.com/python-sdk/api/MarketsApi#example-3) * [Parameters](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters-3) * [Return type](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type-3) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details-3) * [get\_markets](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-markets) * [Example](https://docs.kalshi.com/python-sdk/api/MarketsApi#example-4) * [Parameters](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters-4) * [Return type](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type-4) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details-4) * [get\_trades](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-trades) * [Example](https://docs.kalshi.com/python-sdk/api/MarketsApi#example-5) * [Parameters](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters-5) * [Return type](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type-5) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details-5) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**get\_market**](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market) | **GET** /markets/ | Get Market | | [**get\_market\_candlesticks**](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market-candlesticks) | **GET** /series//markets//candlesticks | Get Market Candlesticks | | [**get\_market\_orderbook**](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market-orderbook) | **GET** /markets//orderbook | Get Market Orderbook | | [**get\_markets**](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-markets) | **GET** /markets | Get Markets | | [**get\_trades**](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-trades) | **GET** /markets/trades | Get Trades | [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market) **get\_market** ==================================================================================== > GetMarketResponse get\_market(ticker) Get Market Get a single market by its ticker. A market represents a specific binary outcome within an event that users can trade on (e.g., “Will candidate X win?”). Markets have yes/no positions, current prices, volume, and settlement rules. ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#example) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_market_response import GetMarketResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) ticker = 'ticker_example' # str | Market ticker try: # Get Market api_response = client.get_market(ticker) print("The response of MarketsApi->get_market:\n") pprint(api_response) except Exception as e: print("Exception when calling MarketsApi->get_market: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | **str** | Market ticker | | ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type) Return type [**GetMarketResponse**](https://docs.kalshi.com/python-sdk/models/GetMarketResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **200** | Market retrieved successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market-candlesticks) **get\_market\_candlesticks** =============================================================================================================== > GetMarketCandlesticksResponse get\_market\_candlesticks(ticker, market\_ticker, start\_ts=start\_ts, end\_ts=end\_ts, period\_interval=period\_interval) Get Market Candlesticks Get candlestick data for a market within a series ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#example-2) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_market_candlesticks_response import GetMarketCandlesticksResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) ticker = 'ticker_example' # str | The series ticker market_ticker = 'market_ticker_example' # str | The market ticker start_ts = 56 # int | Start timestamp for the range (optional) end_ts = 56 # int | End timestamp for the range (optional) period_interval = 'period_interval_example' # str | Period interval for candlesticks (e.g., 1m, 5m, 1h, 1d) (optional) try: # Get Market Candlesticks api_response = client.get_market_candlesticks(ticker, market_ticker, start_ts=start_ts, end_ts=end_ts, period_interval=period_interval) print("The response of MarketsApi->get_market_candlesticks:\n") pprint(api_response) except Exception as e: print("Exception when calling MarketsApi->get_market_candlesticks: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | **str** | The series ticker | | | **market\_ticker** | **str** | The market ticker | | | **start\_ts** | **int** | Start timestamp for the range | \[optional\] | | **end\_ts** | **int** | End timestamp for the range | \[optional\] | | **period\_interval** | **str** | Period interval for candlesticks (e.g., 1m, 5m, 1h, 1d) | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type-2) Return type [**GetMarketCandlesticksResponse**](https://docs.kalshi.com/python-sdk/models/GetMarketCandlesticksResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **200** | Candlesticks retrieved successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-market-orderbook) **get\_market\_orderbook** ========================================================================================================= > GetMarketOrderbookResponse get\_market\_orderbook(ticker, depth=depth) Get Market Orderbook Get the orderbook for a market ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#example-3) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_market_orderbook_response import GetMarketOrderbookResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) ticker = 'ticker_example' # str | Market ticker depth = 10 # int | Depth of the orderbook to retrieve (optional) (default to 10) try: # Get Market Orderbook api_response = client.get_market_orderbook(ticker, depth=depth) print("The response of MarketsApi->get_market_orderbook:\n") pprint(api_response) except Exception as e: print("Exception when calling MarketsApi->get_market_orderbook: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | **str** | Market ticker | | | **depth** | **int** | Depth of the orderbook to retrieve | \[optional\] \[default to 10\] | ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type-3) Return type [**GetMarketOrderbookResponse**](https://docs.kalshi.com/python-sdk/models/GetMarketOrderbookResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details-3) HTTP response details | Status code | Description | | --- | --- | | **200** | Orderbook retrieved successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-markets) **get\_markets** ====================================================================================== > GetMarketsResponse get\_markets(limit=limit, cursor=cursor, event\_ticker=event\_ticker, series\_ticker=series\_ticker, max\_close\_ts=max\_close\_ts, min\_close\_ts=min\_close\_ts, status=status, tickers=tickers) Get Markets List and discover markets on Kalshi. A market represents a specific binary outcome within an event that users can trade on (e.g., “Will candidate X win?”). Markets have yes/no positions, current prices, volume, and settlement rules. This endpoint returns a paginated response. Use the ‘limit’ parameter to control page size (1-1000, defaults to 100). The response includes a ‘cursor’ field - pass this value in the ‘cursor’ parameter of your next request to get the next page. An empty cursor indicates no more pages are available. ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#example-4) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_markets_response import GetMarketsResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Read private key from file with open('path/to/private_key.pem', 'r') as f: private_key = f.read() # Configure API key authentication configuration.api_key_id = "your-api-key-id" configuration.private_key_pem = private_key # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) limit = 100 # int | Number of results per page. Defaults to 100. Maximum value is 1000. (optional) (default to 100) cursor = 'cursor_example' # str | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. (optional) event_ticker = 'event_ticker_example' # str | Filter by event ticker (optional) series_ticker = 'series_ticker_example' # str | Filter by series ticker (optional) max_close_ts = 56 # int | Filter items that close before this Unix timestamp (optional) min_close_ts = 56 # int | Filter items that close after this Unix timestamp (optional) status = 'status_example' # str | Filter by market status. Comma-separated list. Possible values are 'initialized', 'open', 'closed', 'settled', 'determined'. Note that the API accepts 'open' for filtering but returns 'active' in the response. Leave empty to return markets with any status. (optional) tickers = 'tickers_example' # str | Filter by specific market tickers. Comma-separated list of market tickers to retrieve. (optional) try: # Get Markets api_response = client.get_markets(limit=limit, cursor=cursor, event_ticker=event_ticker, series_ticker=series_ticker, max_close_ts=max_close_ts, min_close_ts=min_close_ts, status=status, tickers=tickers) print("The response of MarketsApi->get_markets:\n") pprint(api_response) except Exception as e: print("Exception when calling MarketsApi->get_markets: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | **int** | Number of results per page. Defaults to 100. Maximum value is 1000. | \[optional\] \[default to 100\] | | **cursor** | **str** | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | \[optional\] | | **event\_ticker** | **str** | Filter by event ticker | \[optional\] | | **series\_ticker** | **str** | Filter by series ticker | \[optional\] | | **max\_close\_ts** | **int** | Filter items that close before this Unix timestamp | \[optional\] | | **min\_close\_ts** | **int** | Filter items that close after this Unix timestamp | \[optional\] | | **status** | **str** | Filter by market status. Comma-separated list. Possible values are ‘initialized’, ‘open’, ‘closed’, ‘settled’, ‘determined’. Note that the API accepts ‘open’ for filtering but returns ‘active’ in the response. Leave empty to return markets with any status. | \[optional\] | | **tickers** | **str** | Filter by specific market tickers. Comma-separated list of market tickers to retrieve. | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type-4) Return type [**GetMarketsResponse**](https://docs.kalshi.com/python-sdk/models/GetMarketsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details-4) HTTP response details | Status code | Description | | --- | --- | | **200** | Markets retrieved successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#get-trades) **get\_trades** ==================================================================================== > GetTradesResponse get\_trades(limit=limit, cursor=cursor, ticker=ticker, min\_ts=min\_ts, max\_ts=max\_ts) Get Trades Get all trades for all markets. A trade represents a completed transaction between two users on a specific market. Each trade includes the market ticker, price, quantity, and timestamp information. This endpoint returns a paginated response. Use the ‘limit’ parameter to control page size (1-1000, defaults to 100). The response includes a ‘cursor’ field - pass this value in the ‘cursor’ parameter of your next request to get the next page. An empty cursor indicates no more pages are available. ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#example-5) Example Report incorrect code Copy Ask AI import kalshi_python from kalshi_python.models.get_trades_response import GetTradesResponse from kalshi_python.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2 # See configuration.py for a list of all supported configuration parameters. configuration = kalshi_python.Configuration( host = "https://api.elections.kalshi.com/trade-api/v2" ) # Initialize the Kalshi client client = kalshi_python.KalshiClient(configuration) limit = 100 # int | Number of results per page. Defaults to 100. Maximum value is 1000. (optional) (default to 100) cursor = 'cursor_example' # str | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. (optional) ticker = 'ticker_example' # str | Filter by market ticker (optional) min_ts = 56 # int | Filter items after this Unix timestamp (optional) max_ts = 56 # int | Filter items before this Unix timestamp (optional) try: # Get Trades api_response = client.get_trades(limit=limit, cursor=cursor, ticker=ticker, min_ts=min_ts, max_ts=max_ts) print("The response of MarketsApi->get_trades:\n") pprint(api_response) except Exception as e: print("Exception when calling MarketsApi->get_trades: %s\n" % e) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#parameters-5) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | **int** | Number of results per page. Defaults to 100. Maximum value is 1000. | \[optional\] \[default to 100\] | | **cursor** | **str** | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | \[optional\] | | **ticker** | **str** | Filter by market ticker | \[optional\] | | **min\_ts** | **int** | Filter items after this Unix timestamp | \[optional\] | | **max\_ts** | **int** | Filter items before this Unix timestamp | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#return-type-5) Return type [**GetTradesResponse**](https://docs.kalshi.com/python-sdk/models/GetTradesResponse) ### [​](https://docs.kalshi.com/python-sdk/api/MarketsApi#http-response-details-5) HTTP response details | Status code | Description | | --- | --- | | **200** | Trades retrieved successfully | | **400** | Bad request - invalid input | | **500** | Internal server error | [\[Back to top\]](https://docs.kalshi.com/python-sdk/api/MarketsApi#) [\[Back to API list\]](https://docs.kalshi.com/python-sdk/api) [\[Back to Model list\]](https://docs.kalshi.com/python-sdk/models) [\[Back to README\]](https://docs.kalshi.com/python-sdk) [Portfolio](https://docs.kalshi.com/python-sdk/api/PortfolioApi) [Communications](https://docs.kalshi.com/python-sdk/api/CommunicationsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Events - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/EventsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Events [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [get\_event](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event) * [Parameters](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details) * [get\_event\_forecast\_percentiles\_history](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event-forecast-percentiles-history) * [Parameters](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-2) * [get\_event\_metadata](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event-metadata) * [Parameters](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-3) * [Return type](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-3) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-3) * [get\_events](https://docs.kalshi.com/python-sdk/api/EventsApi#get-events) * [Parameters](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-4) * [Return type](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-4) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-4) * [get\_market\_candlesticks\_by\_event](https://docs.kalshi.com/python-sdk/api/EventsApi#get-market-candlesticks-by-event) * [Parameters](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-5) * [Return type](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-5) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-5) * [get\_multivariate\_events](https://docs.kalshi.com/python-sdk/api/EventsApi#get-multivariate-events) * [Parameters](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-6) * [Return type](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-6) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-6) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**get\_event**](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event) | **GET** /events/ | Get Event | | [**get\_event\_forecast\_percentiles\_history**](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event-forecast-percentiles-history) | **GET** /series//events//forecast\_percentile\_history | Get Event Forecast Percentile History | | [**get\_event\_metadata**](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event-metadata) | **GET** /events//metadata | Get Event Metadata | | [**get\_events**](https://docs.kalshi.com/python-sdk/api/EventsApi#get-events) | **GET** /events | Get Events | | [**get\_market\_candlesticks\_by\_event**](https://docs.kalshi.com/python-sdk/api/EventsApi#get-market-candlesticks-by-event) | **GET** /series//events//candlesticks | Get Event Candlesticks | | [**get\_multivariate\_events**](https://docs.kalshi.com/python-sdk/api/EventsApi#get-multivariate-events) | **GET** /events/multivariate | Get Multivariate Events | [​](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event) **get\_event** ================================================================================= > GetEventResponse get\_event(event\_ticker, with\_nested\_markets=with\_nested\_markets) Get Event Endpoint for getting data about an event by its ticker. An event represents a real-world occurrence that can be traded on, such as an election, sports game, or economic indicator release. Events contain one or more markets where users can place trades on different outcomes. ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **event\_ticker** | **str** | Event ticker | | | **with\_nested\_markets** | **bool** | If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. | \[optional\] \[default to False\] | ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type) Return type [**GetEventResponse**](https://docs.kalshi.com/python-sdk/models/GetEventResponse) ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **200** | Event retrieved successfully | | **400** | Bad request | | **404** | Event not found | | **401** | Unauthorized | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event-forecast-percentiles-history) **get\_event\_forecast\_percentiles\_history** ============================================================================================================================================== > GetEventForecastPercentilesHistoryResponse get\_event\_forecast\_percentiles\_history(ticker, series\_ticker, percentiles, start\_ts, end\_ts, period\_interval) Get Event Forecast Percentile History Endpoint for getting the historical raw and formatted forecast numbers for an event at specific percentiles. ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | **str** | The event ticker | | | **series\_ticker** | **str** | The series ticker | | | **percentiles** | [**List\[int\]**](https://docs.kalshi.com/python-sdk/models/int) | Array of percentile values to retrieve (0-10000, max 10 values) | | | **start\_ts** | **int** | Start timestamp for the range | | | **end\_ts** | **int** | End timestamp for the range | | | **period\_interval** | **int** | Specifies the length of each forecast period, in minutes. 0 for 5-second intervals, or 1, 60, or 1440 for minute-based intervals. | | ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-2) Return type [**GetEventForecastPercentilesHistoryResponse**](https://docs.kalshi.com/python-sdk/models/GetEventForecastPercentilesHistoryResponse) ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **200** | Event forecast percentile history retrieved successfully | | **400** | Bad request | | **401** | Unauthorized | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/EventsApi#get-event-metadata) **get\_event\_metadata** ==================================================================================================== > GetEventMetadataResponse get\_event\_metadata(event\_ticker) Get Event Metadata Endpoint for getting metadata about an event by its ticker. Returns only the metadata information for an event. ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **event\_ticker** | **str** | Event ticker | | ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-3) Return type [**GetEventMetadataResponse**](https://docs.kalshi.com/python-sdk/models/GetEventMetadataResponse) ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-3) HTTP response details | Status code | Description | | --- | --- | | **200** | Event metadata retrieved successfully | | **400** | Bad request | | **404** | Event not found | | **401** | Unauthorized | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/EventsApi#get-events) **get\_events** =================================================================================== > GetEventsResponse get\_events(limit=limit, cursor=cursor, with\_nested\_markets=with\_nested\_markets, with\_milestones=with\_milestones, status=status, series\_ticker=series\_ticker, min\_close\_ts=min\_close\_ts) Get Events Filter by event status. Possible values: ‘open’, ‘closed’, ‘settled’. Leave empty to return events with any status. ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | **int** | Parameter to specify the number of results per page. Defaults to 200. Maximum value is 200. | \[optional\] \[default to 200\] | | **cursor** | **str** | Parameter to specify the pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | \[optional\] | | **with\_nested\_markets** | **bool** | Parameter to specify if nested markets should be included in the response. When true, each event will include a ‘markets’ field containing a list of Market objects associated with that event. | \[optional\] \[default to False\] | | **with\_milestones** | **bool** | If true, includes related milestones as a field alongside events. | \[optional\] \[default to False\] | | **status** | **str** | Filter by event status. Possible values are ‘open’, ‘closed’, ‘settled’. Leave empty to return events with any status. | \[optional\] | | **series\_ticker** | **str** | Filter by series ticker | \[optional\] | | **min\_close\_ts** | **int** | Filter events with at least one market with close timestamp greater than this Unix timestamp (in seconds). | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-4) Return type [**GetEventsResponse**](https://docs.kalshi.com/python-sdk/models/GetEventsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-4) HTTP response details | Status code | Description | | --- | --- | | **200** | Events retrieved successfully | | **400** | Bad request | | **401** | Unauthorized | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/EventsApi#get-market-candlesticks-by-event) **get\_market\_candlesticks\_by\_event** ================================================================================================================================== > GetEventCandlesticksResponse get\_market\_candlesticks\_by\_event(ticker, series\_ticker, start\_ts, end\_ts, period\_interval) Get Event Candlesticks End-point for returning aggregated data across all markets corresponding to an event. ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-5) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **ticker** | **str** | The event ticker | | | **series\_ticker** | **str** | The series ticker | | | **start\_ts** | **int** | Start timestamp for the range | | | **end\_ts** | **int** | End timestamp for the range | | | **period\_interval** | **int** | Specifies the length of each candlestick period, in minutes. Must be one minute, one hour, or one day. | | ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-5) Return type [**GetEventCandlesticksResponse**](https://docs.kalshi.com/python-sdk/models/GetEventCandlesticksResponse) ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-5) HTTP response details | Status code | Description | | --- | --- | | **200** | Event candlesticks retrieved successfully | | **400** | Bad request | | **401** | Unauthorized | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/EventsApi#get-multivariate-events) **get\_multivariate\_events** ============================================================================================================== > GetMultivariateEventsResponse get\_multivariate\_events(limit=limit, cursor=cursor, series\_ticker=series\_ticker, collection\_ticker=collection\_ticker, with\_nested\_markets=with\_nested\_markets) Get Multivariate Events Retrieve multivariate (combo) events. These are dynamically created events from multivariate event collections. Supports filtering by series and collection ticker. ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#parameters-6) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **limit** | **int** | Number of results per page. Defaults to 100. Maximum value is 200. | \[optional\] \[default to 100\] | | **cursor** | **str** | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. | \[optional\] | | **series\_ticker** | **str** | Filter by series ticker | \[optional\] | | **collection\_ticker** | **str** | Filter events by collection ticker. Returns only multivariate events belonging to the specified collection. Cannot be used together with series\_ticker. | \[optional\] | | **with\_nested\_markets** | **bool** | Parameter to specify if nested markets should be included in the response. When true, each event will include a ‘markets’ field containing a list of Market objects associated with that event. | \[optional\] \[default to False\] | ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#return-type-6) Return type [**GetMultivariateEventsResponse**](https://docs.kalshi.com/python-sdk/models/GetMultivariateEventsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/EventsApi#http-response-details-6) HTTP response details | Status code | Description | | --- | --- | | **200** | Multivariate events retrieved successfully | | **400** | Bad request - invalid parameters | | **401** | Unauthorized | | **500** | Internal server error | [Communications](https://docs.kalshi.com/python-sdk/api/CommunicationsApi) [Series](https://docs.kalshi.com/python-sdk/api/SeriesApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Create RFQ - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/communications/create-rfq#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation communications Create RFQ [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Create RFQ cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/communications/rfqs \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "market_ticker": "", "rest_remainder": true, "contracts": 123, "contracts_fp": "10.00", "target_cost_centi_cents": 123, "target_cost_dollars": "0.5600", "replace_existing": false, "subtrader_id": "", "subaccount": 123 } ' 201 400 401 409 500 Copy Ask AI { "id": "" } POST / communications / rfqs Try it Create RFQ cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/communications/rfqs \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "market_ticker": "", "rest_remainder": true, "contracts": 123, "contracts_fp": "10.00", "target_cost_centi_cents": 123, "target_cost_dollars": "0.5600", "replace_existing": false, "subtrader_id": "", "subaccount": 123 } ' 201 400 401 409 500 Copy Ask AI { "id": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/communications/create-rfq#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/communications/create-rfq#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/communications/create-rfq#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Body application/json [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-market-ticker) market\_ticker string required The ticker of the market for which to create an RFQ [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-rest-remainder) rest\_remainder boolean required Whether to rest the remainder of the RFQ after execution [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-contracts) contracts integer The number of contracts for the RFQ. Whole contracts only. Contracts may be provided via contracts or contracts\_fp; if both provided they must match. [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-contracts-fp-one-of-0) contracts\_fp string | null String representation of the number of contracts for the RFQ (whole contracts only). Contracts may be provided via contracts or contracts\_fp; if both provided they must match. Example: `"10.00"` [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-target-cost-centi-cents) target\_cost\_centi\_cents integer deprecated DEPRECATED: The target cost for the RFQ in centi-cents. Use target\_cost\_dollars instead. [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-target-cost-dollars) target\_cost\_dollars string The target cost for the RFQ in dollars Example: `"0.5600"` [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-replace-existing) replace\_existing boolean default:false Whether to delete existing RFQs as part of this RFQ's creation [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-subtrader-id) subtrader\_id string The subtrader to create the RFQ for (FCM members only) [​](https://docs.kalshi.com/api-reference/communications/create-rfq#body-subaccount) subaccount integer The subaccount number to create the RFQ for (direct members only; 0 for primary, 1-32 for subaccounts) #### Response 201 application/json RFQ created successfully [​](https://docs.kalshi.com/api-reference/communications/create-rfq#response-id) id string required The ID of the newly created RFQ [Get RFQs](https://docs.kalshi.com/api-reference/communications/get-rfqs) [Get RFQ](https://docs.kalshi.com/api-reference/communications/get-rfq) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Quote - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/communications/get-quote#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation communications Get Quote [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Quote cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes/{quote_id} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 404 500 Copy Ask AI { "quote": { "id": "", "rfq_id": "", "creator_id": "", "rfq_creator_id": "", "market_ticker": "", "contracts": 123, "contracts_fp": "10.00", "yes_bid": 123, "no_bid": 123, "yes_bid_dollars": "0.5600", "no_bid_dollars": "0.5600", "created_ts": "2023-11-07T05:31:56Z", "updated_ts": "2023-11-07T05:31:56Z", "status": "open", "accepted_side": "yes", "accepted_ts": "2023-11-07T05:31:56Z", "confirmed_ts": "2023-11-07T05:31:56Z", "executed_ts": "2023-11-07T05:31:56Z", "cancelled_ts": "2023-11-07T05:31:56Z", "rest_remainder": true, "cancellation_reason": "", "creator_user_id": "", "rfq_creator_user_id": "", "rfq_target_cost_centi_cents": 123, "rfq_target_cost_dollars": "0.5600", "rfq_creator_order_id": "", "creator_order_id": "" } } GET / communications / quotes / {quote\_id} Try it Get Quote cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes/{quote_id} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 404 500 Copy Ask AI { "quote": { "id": "", "rfq_id": "", "creator_id": "", "rfq_creator_id": "", "market_ticker": "", "contracts": 123, "contracts_fp": "10.00", "yes_bid": 123, "no_bid": 123, "yes_bid_dollars": "0.5600", "no_bid_dollars": "0.5600", "created_ts": "2023-11-07T05:31:56Z", "updated_ts": "2023-11-07T05:31:56Z", "status": "open", "accepted_side": "yes", "accepted_ts": "2023-11-07T05:31:56Z", "confirmed_ts": "2023-11-07T05:31:56Z", "executed_ts": "2023-11-07T05:31:56Z", "cancelled_ts": "2023-11-07T05:31:56Z", "rest_remainder": true, "cancellation_reason": "", "creator_user_id": "", "rfq_creator_user_id": "", "rfq_target_cost_centi_cents": 123, "rfq_target_cost_dollars": "0.5600", "rfq_creator_order_id": "", "creator_order_id": "" } } #### Authorizations [​](https://docs.kalshi.com/api-reference/communications/get-quote#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/communications/get-quote#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/communications/get-quote#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/communications/get-quote#parameter-quote-id) quote\_id string required Quote ID #### Response 200 application/json Quote retrieved successfully [​](https://docs.kalshi.com/api-reference/communications/get-quote#response-quote) quote object required The details of the requested quote Show child attributes [Create Quote](https://docs.kalshi.com/api-reference/communications/create-quote) [Delete Quote](https://docs.kalshi.com/api-reference/communications/delete-quote) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Delete RFQ - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/communications/delete-rfq#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation communications Delete RFQ [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Delete RFQ cURL Copy Ask AI curl --request DELETE \ --url https://api.elections.kalshi.com/trade-api/v2/communications/rfqs/{rfq_id} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 401 404 500 Copy Ask AI { "code": "", "message": "", "details": "", "service": "" } DELETE / communications / rfqs / {rfq\_id} Try it Delete RFQ cURL Copy Ask AI curl --request DELETE \ --url https://api.elections.kalshi.com/trade-api/v2/communications/rfqs/{rfq_id} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 401 404 500 Copy Ask AI { "code": "", "message": "", "details": "", "service": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/communications/delete-rfq#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/communications/delete-rfq#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/communications/delete-rfq#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/communications/delete-rfq#parameter-rfq-id) rfq\_id string required RFQ ID #### Response 204 RFQ deleted successfully [Get RFQ](https://docs.kalshi.com/api-reference/communications/get-rfq) [Get Quotes](https://docs.kalshi.com/api-reference/communications/get-quotes) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Communications ID - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/communications/get-communications-id#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation communications Get Communications ID [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Communications ID cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/communications/id \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 500 Copy Ask AI { "communications_id": "" } GET / communications / id Try it Get Communications ID cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/communications/id \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 500 Copy Ask AI { "communications_id": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/communications/get-communications-id#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/communications/get-communications-id#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/communications/get-communications-id#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Response 200 application/json Communications ID retrieved successfully [​](https://docs.kalshi.com/api-reference/communications/get-communications-id#response-communications-id) communications\_id string required A public communications ID which is used to identify the user [Get Milestones](https://docs.kalshi.com/api-reference/milestone/get-milestones) [Get RFQs](https://docs.kalshi.com/api-reference/communications/get-rfqs) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Delete Quote - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/communications/delete-quote#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation communications Delete Quote [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Delete Quote cURL Copy Ask AI curl --request DELETE \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes/{quote_id} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 401 404 500 Copy Ask AI { "code": "", "message": "", "details": "", "service": "" } DELETE / communications / quotes / {quote\_id} Try it Delete Quote cURL Copy Ask AI curl --request DELETE \ --url https://api.elections.kalshi.com/trade-api/v2/communications/quotes/{quote_id} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 401 404 500 Copy Ask AI { "code": "", "message": "", "details": "", "service": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/communications/delete-quote#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/communications/delete-quote#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/communications/delete-quote#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/communications/delete-quote#parameter-quote-id) quote\_id string required Quote ID #### Response 204 Quote deleted successfully [Get Quote](https://docs.kalshi.com/api-reference/communications/get-quote) [Accept Quote](https://docs.kalshi.com/api-reference/communications/accept-quote) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Live Data - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/live-data/get-live-data#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation live-data Get Live Data [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Live Data cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/live_data/{type}/milestone/{milestone_id} 200 Copy Ask AI { "live_data": { "type": "", "details": {}, "milestone_id": "" } } GET / live\_data / {type} / milestone / {milestone\_id} Try it Get Live Data cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/live_data/{type}/milestone/{milestone_id} 200 Copy Ask AI { "live_data": { "type": "", "details": {}, "milestone_id": "" } } #### Path Parameters [​](https://docs.kalshi.com/api-reference/live-data/get-live-data#parameter-type) type string required Type of live data [​](https://docs.kalshi.com/api-reference/live-data/get-live-data#parameter-milestone-id) milestone\_id string required Milestone ID #### Response 200 application/json Live data retrieved successfully [​](https://docs.kalshi.com/api-reference/live-data/get-live-data#response-live-data) live\_data object required Show child attributes [Get Event Forecast Percentile History](https://docs.kalshi.com/api-reference/events/get-event-forecast-percentile-history) [Get Multiple Live Data](https://docs.kalshi.com/api-reference/live-data/get-multiple-live-data) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Historical Fills - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/historical/get-historical-fills#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation historical Get Historical Fills [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Historical Fills cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/fills \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 404 Copy Ask AI { "fills": [\ {\ "fill_id": "",\ "trade_id": "",\ "order_id": "",\ "ticker": "",\ "market_ticker": "",\ "side": "yes",\ "action": "buy",\ "count": 123,\ "count_fp": "10.00",\ "price": 123,\ "yes_price": 123,\ "no_price": 123,\ "yes_price_fixed": "",\ "no_price_fixed": "",\ "is_taker": true,\ "fee_cost": "0.5600",\ "client_order_id": "",\ "created_time": "2023-11-07T05:31:56Z",\ "subaccount_number": 123,\ "ts": 123\ }\ ], "cursor": "" } GET / historical / fills Try it Get Historical Fills cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/fills \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 404 Copy Ask AI { "fills": [\ {\ "fill_id": "",\ "trade_id": "",\ "order_id": "",\ "ticker": "",\ "market_ticker": "",\ "side": "yes",\ "action": "buy",\ "count": 123,\ "count_fp": "10.00",\ "price": 123,\ "yes_price": 123,\ "no_price": 123,\ "yes_price_fixed": "",\ "no_price_fixed": "",\ "is_taker": true,\ "fee_cost": "0.5600",\ "client_order_id": "",\ "created_time": "2023-11-07T05:31:56Z",\ "subaccount_number": 123,\ "ts": 123\ }\ ], "cursor": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Query Parameters [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#parameter-ticker) ticker string Filter by market ticker [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#parameter-max-ts) max\_ts integer Filter items before this Unix timestamp [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#parameter-limit) limit integer default:100 Number of results per page. Defaults to 100. Maximum value is 200. Required range: `1 <= x <= 200` [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#parameter-cursor) cursor string Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. #### Response 200 application/json Fills retrieved successfully [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#response-fills) fills object\[\] required Show child attributes [​](https://docs.kalshi.com/api-reference/historical/get-historical-fills#response-cursor) cursor string required [Get Historical Market Candlesticks](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks) [Get Historical Orders](https://docs.kalshi.com/api-reference/historical/get-historical-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Historical Market Candlesticks - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation historical Get Historical Market Candlesticks [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Historical Market Candlesticks cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/markets/{ticker}/candlesticks 200 Copy Ask AI { "ticker": "", "candlesticks": [\ {\ "end_period_ts": 123,\ "yes_bid": {\ "open": "0.5600",\ "low": "0.5600",\ "high": "0.5600",\ "close": "0.5600"\ },\ "yes_ask": {\ "open": "0.5600",\ "low": "0.5600",\ "high": "0.5600",\ "close": "0.5600"\ },\ "price": {\ "open": "0.5600",\ "low": "0.5600",\ "high": "0.5600",\ "close": "0.5600",\ "mean": "0.5600",\ "previous": "0.5600"\ },\ "volume": "10.00",\ "open_interest": "10.00"\ }\ ] } GET / historical / markets / {ticker} / candlesticks Try it Get Historical Market Candlesticks cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/markets/{ticker}/candlesticks 200 Copy Ask AI { "ticker": "", "candlesticks": [\ {\ "end_period_ts": 123,\ "yes_bid": {\ "open": "0.5600",\ "low": "0.5600",\ "high": "0.5600",\ "close": "0.5600"\ },\ "yes_ask": {\ "open": "0.5600",\ "low": "0.5600",\ "high": "0.5600",\ "close": "0.5600"\ },\ "price": {\ "open": "0.5600",\ "low": "0.5600",\ "high": "0.5600",\ "close": "0.5600",\ "mean": "0.5600",\ "previous": "0.5600"\ },\ "volume": "10.00",\ "open_interest": "10.00"\ }\ ] } #### Path Parameters [​](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks#parameter-ticker) ticker string required Market ticker - unique identifier for the specific market #### Query Parameters [​](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks#parameter-start-ts) start\_ts integer required Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time. [​](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks#parameter-end-ts) end\_ts integer required End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time. [​](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks#parameter-period-interval) period\_interval enum required Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day). Available options: `1`, `60`, `1440` #### Response 200 application/json Candlesticks retrieved successfully [​](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks#response-ticker) ticker string required Unique identifier for the market. [​](https://docs.kalshi.com/api-reference/historical/get-historical-market-candlesticks#response-candlesticks) candlesticks object\[\] required Array of candlestick data points for the specified time range. Show child attributes [Get Historical Cutoff Timestamps](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Get Historical Fills](https://docs.kalshi.com/api-reference/historical/get-historical-fills) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Historical Orders - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/historical/get-historical-orders#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation historical Get Historical Orders [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Historical Orders cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/orders \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 400 401 500 Copy Ask AI { "orders": [\ {\ "order_id": "",\ "user_id": "",\ "client_order_id": "",\ "ticker": "",\ "side": "yes",\ "action": "buy",\ "type": "limit",\ "status": "resting",\ "yes_price": 123,\ "no_price": 123,\ "yes_price_dollars": "0.5600",\ "no_price_dollars": "0.5600",\ "fill_count": 123,\ "fill_count_fp": "10.00",\ "remaining_count": 123,\ "remaining_count_fp": "10.00",\ "initial_count": 123,\ "initial_count_fp": "10.00",\ "taker_fees": 123,\ "maker_fees": 123,\ "taker_fill_cost": 123,\ "maker_fill_cost": 123,\ "taker_fill_cost_dollars": "0.5600",\ "maker_fill_cost_dollars": "0.5600",\ "queue_position": 123,\ "taker_fees_dollars": "0.5600",\ "maker_fees_dollars": "0.5600",\ "expiration_time": "2023-11-07T05:31:56Z",\ "created_time": "2023-11-07T05:31:56Z",\ "last_update_time": "2023-11-07T05:31:56Z",\ "self_trade_prevention_type": "taker_at_cross",\ "order_group_id": "",\ "cancel_order_on_pause": true,\ "subaccount_number": 123\ }\ ], "cursor": "" } GET / historical / orders Try it Get Historical Orders cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/orders \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 400 401 500 Copy Ask AI { "orders": [\ {\ "order_id": "",\ "user_id": "",\ "client_order_id": "",\ "ticker": "",\ "side": "yes",\ "action": "buy",\ "type": "limit",\ "status": "resting",\ "yes_price": 123,\ "no_price": 123,\ "yes_price_dollars": "0.5600",\ "no_price_dollars": "0.5600",\ "fill_count": 123,\ "fill_count_fp": "10.00",\ "remaining_count": 123,\ "remaining_count_fp": "10.00",\ "initial_count": 123,\ "initial_count_fp": "10.00",\ "taker_fees": 123,\ "maker_fees": 123,\ "taker_fill_cost": 123,\ "maker_fill_cost": 123,\ "taker_fill_cost_dollars": "0.5600",\ "maker_fill_cost_dollars": "0.5600",\ "queue_position": 123,\ "taker_fees_dollars": "0.5600",\ "maker_fees_dollars": "0.5600",\ "expiration_time": "2023-11-07T05:31:56Z",\ "created_time": "2023-11-07T05:31:56Z",\ "last_update_time": "2023-11-07T05:31:56Z",\ "self_trade_prevention_type": "taker_at_cross",\ "order_group_id": "",\ "cancel_order_on_pause": true,\ "subaccount_number": 123\ }\ ], "cursor": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Query Parameters [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#parameter-ticker) ticker string Filter by market ticker [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#parameter-max-ts) max\_ts integer Filter items before this Unix timestamp [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#parameter-limit) limit integer default:100 Number of results per page. Defaults to 100. Maximum value is 200. Required range: `1 <= x <= 200` [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#parameter-cursor) cursor string Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. #### Response 200 application/json Historical orders retrieved successfully [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#response-orders) orders object\[\] required Show child attributes [​](https://docs.kalshi.com/api-reference/historical/get-historical-orders#response-cursor) cursor string required [Get Historical Fills](https://docs.kalshi.com/api-reference/historical/get-historical-fills) [Get Historical Trades](https://docs.kalshi.com/api-reference/historical/get-historical-trades) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Historical Trades - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/historical/get-historical-trades#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation historical Get Historical Trades [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Historical Trades cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/trades 200 400 404 500 Copy Ask AI { "trades": [\ {\ "trade_id": "",\ "ticker": "",\ "price": 123,\ "count": 123,\ "count_fp": "10.00",\ "yes_price": 123,\ "no_price": 123,\ "yes_price_dollars": "0.5600",\ "no_price_dollars": "0.5600",\ "taker_side": "yes",\ "created_time": "2023-11-07T05:31:56Z"\ }\ ], "cursor": "" } GET / historical / trades Try it Get Historical Trades cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/trades 200 400 404 500 Copy Ask AI { "trades": [\ {\ "trade_id": "",\ "ticker": "",\ "price": 123,\ "count": 123,\ "count_fp": "10.00",\ "yes_price": 123,\ "no_price": 123,\ "yes_price_dollars": "0.5600",\ "no_price_dollars": "0.5600",\ "taker_side": "yes",\ "created_time": "2023-11-07T05:31:56Z"\ }\ ], "cursor": "" } #### Query Parameters [​](https://docs.kalshi.com/api-reference/historical/get-historical-trades#parameter-ticker) ticker string Filter by market ticker [​](https://docs.kalshi.com/api-reference/historical/get-historical-trades#parameter-min-ts) min\_ts integer Filter items after this Unix timestamp [​](https://docs.kalshi.com/api-reference/historical/get-historical-trades#parameter-max-ts) max\_ts integer Filter items before this Unix timestamp [​](https://docs.kalshi.com/api-reference/historical/get-historical-trades#parameter-limit) limit integer default:100 Number of results per page. Defaults to 100. Maximum value is 1000. Required range: `1 <= x <= 1000` [​](https://docs.kalshi.com/api-reference/historical/get-historical-trades#parameter-cursor) cursor string Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. #### Response 200 application/json Historical trades retrieved successfully [​](https://docs.kalshi.com/api-reference/historical/get-historical-trades#response-trades) trades object\[\] required Show child attributes [​](https://docs.kalshi.com/api-reference/historical/get-historical-trades#response-cursor) cursor string required [Get Historical Orders](https://docs.kalshi.com/api-reference/historical/get-historical-orders) [Get Historical Markets](https://docs.kalshi.com/api-reference/historical/get-historical-markets) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Incentives - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/incentive-programs/get-incentives#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation incentive-programs Get Incentives [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Incentives cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/incentive_programs 200 400 500 Copy Ask AI { "incentive_programs": [\ {\ "id": "",\ "market_id": "",\ "market_ticker": "",\ "incentive_type": "liquidity",\ "start_date": "2023-11-07T05:31:56Z",\ "end_date": "2023-11-07T05:31:56Z",\ "period_reward": 123,\ "paid_out": true,\ "discount_factor_bps": 123,\ "target_size": 123,\ "target_size_fp": "10.00"\ }\ ], "next_cursor": "" } GET / incentive\_programs Try it Get Incentives cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/incentive_programs 200 400 500 Copy Ask AI { "incentive_programs": [\ {\ "id": "",\ "market_id": "",\ "market_ticker": "",\ "incentive_type": "liquidity",\ "start_date": "2023-11-07T05:31:56Z",\ "end_date": "2023-11-07T05:31:56Z",\ "period_reward": 123,\ "paid_out": true,\ "discount_factor_bps": 123,\ "target_size": 123,\ "target_size_fp": "10.00"\ }\ ], "next_cursor": "" } #### Query Parameters [​](https://docs.kalshi.com/api-reference/incentive-programs/get-incentives#parameter-status) status enum Status filter. Can be "all", "active", "upcoming", "closed", or "paid\_out". Default is "all". Available options: `all`, `active`, `upcoming`, `closed`, `paid_out` [​](https://docs.kalshi.com/api-reference/incentive-programs/get-incentives#parameter-type) type enum Type filter. Can be "all", "liquidity", or "volume". Default is "all". Available options: `all`, `liquidity`, `volume` [​](https://docs.kalshi.com/api-reference/incentive-programs/get-incentives#parameter-limit) limit integer Number of results per page. Defaults to 100. Maximum value is 10000. Required range: `1 <= x <= 10000` [​](https://docs.kalshi.com/api-reference/incentive-programs/get-incentives#parameter-cursor) cursor string Cursor for pagination #### Response 200 application/json Incentive programs retrieved successfully [​](https://docs.kalshi.com/api-reference/incentive-programs/get-incentives#response-incentive-programs) incentive\_programs object\[\] required Show child attributes [​](https://docs.kalshi.com/api-reference/incentive-programs/get-incentives#response-next-cursor) next\_cursor string Cursor for pagination to get the next page of results [Get Multiple Live Data](https://docs.kalshi.com/api-reference/live-data/get-multiple-live-data) [Get FCM Orders](https://docs.kalshi.com/api-reference/fcm/get-fcm-orders) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get FCM Positions - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation fcm Get FCM Positions [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get FCM Positions cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/fcm/positions \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 Copy Ask AI { "market_positions": [\ {\ "ticker": "",\ "total_traded": 123,\ "total_traded_dollars": "0.5600",\ "position": 123,\ "position_fp": "10.00",\ "market_exposure": 123,\ "market_exposure_dollars": "0.5600",\ "realized_pnl": 123,\ "realized_pnl_dollars": "0.5600",\ "resting_orders_count": 123,\ "fees_paid": 123,\ "fees_paid_dollars": "0.5600",\ "last_updated_ts": "2023-11-07T05:31:56Z"\ }\ ], "event_positions": [\ {\ "event_ticker": "",\ "total_cost": 123,\ "total_cost_dollars": "0.5600",\ "total_cost_shares": 123,\ "total_cost_shares_fp": "10.00",\ "event_exposure": 123,\ "event_exposure_dollars": "0.5600",\ "realized_pnl": 123,\ "realized_pnl_dollars": "0.5600",\ "fees_paid": 123,\ "fees_paid_dollars": "0.5600"\ }\ ], "cursor": "" } GET / fcm / positions Try it Get FCM Positions cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/fcm/positions \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 Copy Ask AI { "market_positions": [\ {\ "ticker": "",\ "total_traded": 123,\ "total_traded_dollars": "0.5600",\ "position": 123,\ "position_fp": "10.00",\ "market_exposure": 123,\ "market_exposure_dollars": "0.5600",\ "realized_pnl": 123,\ "realized_pnl_dollars": "0.5600",\ "resting_orders_count": 123,\ "fees_paid": 123,\ "fees_paid_dollars": "0.5600",\ "last_updated_ts": "2023-11-07T05:31:56Z"\ }\ ], "event_positions": [\ {\ "event_ticker": "",\ "total_cost": 123,\ "total_cost_dollars": "0.5600",\ "total_cost_shares": 123,\ "total_cost_shares_fp": "10.00",\ "event_exposure": 123,\ "event_exposure_dollars": "0.5600",\ "realized_pnl": 123,\ "realized_pnl_dollars": "0.5600",\ "fees_paid": 123,\ "fees_paid_dollars": "0.5600"\ }\ ], "cursor": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Query Parameters [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#parameter-subtrader-id) subtrader\_id string required Restricts the response to positions for a specific subtrader (FCM members only) [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#parameter-ticker) ticker string Ticker of desired positions [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#parameter-event-ticker) event\_ticker string Event ticker of desired positions [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#parameter-count-filter) count\_filter string Restricts the positions to those with any of following fields with non-zero values, as a comma separated list [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#parameter-settlement-status) settlement\_status enum Settlement status of the markets to return. Defaults to unsettled Available options: `all`, `unsettled`, `settled` [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#parameter-limit) limit integer Parameter to specify the number of results per page. Defaults to 100 Required range: `1 <= x <= 1000` [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#parameter-cursor) cursor string The Cursor represents a pointer to the next page of records in the pagination #### Response 200 application/json Positions retrieved successfully [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#response-market-positions) market\_positions object\[\] required List of market positions Show child attributes [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#response-event-positions) event\_positions object\[\] required List of event positions Show child attributes [​](https://docs.kalshi.com/api-reference/fcm/get-fcm-positions#response-cursor) cursor string The Cursor represents a pointer to the next page of records in the pagination. Use the value returned here in the cursor query parameter for this end-point to get the next page containing limit records. An empty value of this field indicates there is no next page. [Get FCM Orders](https://docs.kalshi.com/api-reference/fcm/get-fcm-orders) [Get Structured Targets](https://docs.kalshi.com/api-reference/structured-targets/get-structured-targets) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Historical Markets - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/historical/get-historical-markets#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation historical Get Historical Markets [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Historical Markets cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/markets 200 400 500 Copy Ask AI { "markets": [\ {\ "ticker": "",\ "event_ticker": "",\ "market_type": "binary",\ "title": "",\ "subtitle": "",\ "yes_sub_title": "",\ "no_sub_title": "",\ "created_time": "2023-11-07T05:31:56Z",\ "updated_time": "2023-11-07T05:31:56Z",\ "open_time": "2023-11-07T05:31:56Z",\ "close_time": "2023-11-07T05:31:56Z",\ "expiration_time": "2023-11-07T05:31:56Z",\ "latest_expiration_time": "2023-11-07T05:31:56Z",\ "settlement_timer_seconds": 123,\ "status": "initialized",\ "response_price_units": "usd_cent",\ "yes_bid": 123,\ "yes_bid_dollars": "0.5600",\ "yes_bid_size_fp": "10.00",\ "yes_ask": 123,\ "yes_ask_dollars": "0.5600",\ "yes_ask_size_fp": "10.00",\ "no_bid": 123,\ "no_bid_dollars": "0.5600",\ "no_ask": 123,\ "no_ask_dollars": "0.5600",\ "last_price": 123,\ "last_price_dollars": "0.5600",\ "volume": 123,\ "volume_fp": "10.00",\ "volume_24h": 123,\ "volume_24h_fp": "10.00",\ "result": "yes",\ "can_close_early": true,\ "fractional_trading_enabled": true,\ "open_interest": 123,\ "open_interest_fp": "10.00",\ "notional_value": 123,\ "notional_value_dollars": "0.5600",\ "previous_yes_bid": 123,\ "previous_yes_bid_dollars": "0.5600",\ "previous_yes_ask": 123,\ "previous_yes_ask_dollars": "0.5600",\ "previous_price": 123,\ "previous_price_dollars": "0.5600",\ "liquidity": 123,\ "liquidity_dollars": "0.5600",\ "expiration_value": "",\ "tick_size": 123,\ "rules_primary": "",\ "rules_secondary": "",\ "price_level_structure": "",\ "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ],\ "expected_expiration_time": "2023-11-07T05:31:56Z",\ "settlement_value": 123,\ "settlement_value_dollars": "0.5600",\ "settlement_ts": "2023-11-07T05:31:56Z",\ "fee_waiver_expiration_time": "2023-11-07T05:31:56Z",\ "early_close_condition": "",\ "strike_type": "greater",\ "floor_strike": 123,\ "cap_strike": 123,\ "functional_strike": "",\ "custom_strike": {},\ "mve_collection_ticker": "",\ "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ],\ "primary_participant_key": "",\ "is_provisional": true\ }\ ], "cursor": "" } GET / historical / markets Try it Get Historical Markets cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/markets 200 400 500 Copy Ask AI { "markets": [\ {\ "ticker": "",\ "event_ticker": "",\ "market_type": "binary",\ "title": "",\ "subtitle": "",\ "yes_sub_title": "",\ "no_sub_title": "",\ "created_time": "2023-11-07T05:31:56Z",\ "updated_time": "2023-11-07T05:31:56Z",\ "open_time": "2023-11-07T05:31:56Z",\ "close_time": "2023-11-07T05:31:56Z",\ "expiration_time": "2023-11-07T05:31:56Z",\ "latest_expiration_time": "2023-11-07T05:31:56Z",\ "settlement_timer_seconds": 123,\ "status": "initialized",\ "response_price_units": "usd_cent",\ "yes_bid": 123,\ "yes_bid_dollars": "0.5600",\ "yes_bid_size_fp": "10.00",\ "yes_ask": 123,\ "yes_ask_dollars": "0.5600",\ "yes_ask_size_fp": "10.00",\ "no_bid": 123,\ "no_bid_dollars": "0.5600",\ "no_ask": 123,\ "no_ask_dollars": "0.5600",\ "last_price": 123,\ "last_price_dollars": "0.5600",\ "volume": 123,\ "volume_fp": "10.00",\ "volume_24h": 123,\ "volume_24h_fp": "10.00",\ "result": "yes",\ "can_close_early": true,\ "fractional_trading_enabled": true,\ "open_interest": 123,\ "open_interest_fp": "10.00",\ "notional_value": 123,\ "notional_value_dollars": "0.5600",\ "previous_yes_bid": 123,\ "previous_yes_bid_dollars": "0.5600",\ "previous_yes_ask": 123,\ "previous_yes_ask_dollars": "0.5600",\ "previous_price": 123,\ "previous_price_dollars": "0.5600",\ "liquidity": 123,\ "liquidity_dollars": "0.5600",\ "expiration_value": "",\ "tick_size": 123,\ "rules_primary": "",\ "rules_secondary": "",\ "price_level_structure": "",\ "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ],\ "expected_expiration_time": "2023-11-07T05:31:56Z",\ "settlement_value": 123,\ "settlement_value_dollars": "0.5600",\ "settlement_ts": "2023-11-07T05:31:56Z",\ "fee_waiver_expiration_time": "2023-11-07T05:31:56Z",\ "early_close_condition": "",\ "strike_type": "greater",\ "floor_strike": 123,\ "cap_strike": 123,\ "functional_strike": "",\ "custom_strike": {},\ "mve_collection_ticker": "",\ "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ],\ "primary_participant_key": "",\ "is_provisional": true\ }\ ], "cursor": "" } #### Query Parameters [​](https://docs.kalshi.com/api-reference/historical/get-historical-markets#parameter-limit) limit integer default:100 Number of results per page. Defaults to 100. Maximum value is 1000. Required range: `1 <= x <= 1000` [​](https://docs.kalshi.com/api-reference/historical/get-historical-markets#parameter-cursor) cursor string Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. [​](https://docs.kalshi.com/api-reference/historical/get-historical-markets#parameter-tickers) tickers string Filter by specific market tickers. Comma-separated list of market tickers to retrieve. [​](https://docs.kalshi.com/api-reference/historical/get-historical-markets#parameter-event-ticker) event\_ticker string Event ticker to filter by. Only a single event ticker is supported. [​](https://docs.kalshi.com/api-reference/historical/get-historical-markets#parameter-one-of-0) mve\_filter enum | null Filter by multivariate events (combos). By default, MVE markets are included. Available options: `exclude` #### Response 200 application/json Historical markets retrieved successfully [​](https://docs.kalshi.com/api-reference/historical/get-historical-markets#response-markets) markets object\[\] required Show child attributes [​](https://docs.kalshi.com/api-reference/historical/get-historical-markets#response-cursor) cursor string required [Get Historical Trades](https://docs.kalshi.com/api-reference/historical/get-historical-trades) [Get Historical Market](https://docs.kalshi.com/api-reference/historical/get-historical-market) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Multiple Live Data - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/live-data/get-multiple-live-data#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation live-data Get Multiple Live Data [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Multiple Live Data cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/live_data/batch 200 Copy Ask AI { "live_datas": [\ {\ "type": "",\ "details": {},\ "milestone_id": ""\ }\ ] } GET / live\_data / batch Try it Get Multiple Live Data cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/live_data/batch 200 Copy Ask AI { "live_datas": [\ {\ "type": "",\ "details": {},\ "milestone_id": ""\ }\ ] } #### Query Parameters [​](https://docs.kalshi.com/api-reference/live-data/get-multiple-live-data#parameter-milestone-ids) milestone\_ids string\[\] required Array of milestone IDs Maximum array length: `100` #### Response 200 application/json Live data retrieved successfully [​](https://docs.kalshi.com/api-reference/live-data/get-multiple-live-data#response-live-datas) live\_datas object\[\] required Show child attributes [Get Live Data](https://docs.kalshi.com/api-reference/live-data/get-live-data) [Get Incentives](https://docs.kalshi.com/api-reference/incentive-programs/get-incentives) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Communications - API Documentation [Skip to main content](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation API Classes Communications [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) On this page * [accept\_quote](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#accept-quote) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details) * [confirm\_quote](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#confirm-quote) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-2) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-2) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-2) * [create\_quote](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#create-quote) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-3) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-3) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-3) * [create\_rfq](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#create-rfq) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-4) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-4) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-4) * [delete\_quote](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#delete-quote) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-5) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-5) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-5) * [delete\_rfq](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#delete-rfq) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-6) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-6) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-6) * [get\_communications\_id](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-communications-id) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-7) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-7) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-7) * [get\_quote](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-quote) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-8) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-8) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-8) * [get\_quotes](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-quotes) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-9) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-9) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-9) * [get\_rfq](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-rfq) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-10) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-10) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-10) * [get\_rfqs](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-rfqs) * [Parameters](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-11) * [Return type](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-11) * [HTTP response details](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-11) All URIs are relative to _[https://api.elections.kalshi.com/trade-api/v2](https://api.elections.kalshi.com/trade-api/v2) _ | Method | HTTP request | Description | | --- | --- | --- | | [**accept\_quote**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#accept-quote) | **PUT** /communications/quotes//accept | Accept Quote | | [**confirm\_quote**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#confirm-quote) | **PUT** /communications/quotes//confirm | Confirm Quote | | [**create\_quote**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#create-quote) | **POST** /communications/quotes | Create Quote | | [**create\_rfq**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#create-rfq) | **POST** /communications/rfqs | Create RFQ | | [**delete\_quote**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#delete-quote) | **DELETE** /communications/quotes/ | Delete Quote | | [**delete\_rfq**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#delete-rfq) | **DELETE** /communications/rfqs/ | Delete RFQ | | [**get\_communications\_id**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-communications-id) | **GET** /communications/id | Get Communications ID | | [**get\_quote**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-quote) | **GET** /communications/quotes/ | Get Quote | | [**get\_quotes**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-quotes) | **GET** /communications/quotes | Get Quotes | | [**get\_rfq**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-rfq) | **GET** /communications/rfqs/ | Get RFQ | | [**get\_rfqs**](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-rfqs) | **GET** /communications/rfqs | Get RFQs | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#accept-quote) **accept\_quote** =============================================================================================== > accept\_quote(quote\_id, accept\_quote\_request) Accept Quote Endpoint for accepting a quote. This will require the quoter to confirm ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **quote\_id** | **str** | Quote ID | | | **accept\_quote\_request** | [**AcceptQuoteRequest**](https://docs.kalshi.com/python-sdk/models/AcceptQuoteRequest) | | | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type) Return type void (empty response body) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details) HTTP response details | Status code | Description | | --- | --- | | **204** | Quote accepted successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#confirm-quote) **confirm\_quote** ================================================================================================= > confirm\_quote(quote\_id, body=body) Confirm Quote Endpoint for confirming a quote. This will start a timer for order execution ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-2) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **quote\_id** | **str** | Quote ID | | | **body** | **object** | | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-2) Return type void (empty response body) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-2) HTTP response details | Status code | Description | | --- | --- | | **204** | Quote confirmed successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#create-quote) **create\_quote** =============================================================================================== > CreateQuoteResponse create\_quote(create\_quote\_request) Create Quote Endpoint for creating a quote in response to an RFQ ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-3) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **create\_quote\_request** | [**CreateQuoteRequest**](https://docs.kalshi.com/python-sdk/models/CreateQuoteRequest) | | | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-3) Return type [**CreateQuoteResponse**](https://docs.kalshi.com/python-sdk/models/CreateQuoteResponse) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-3) HTTP response details | Status code | Description | | --- | --- | | **201** | Quote created successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#create-rfq) **create\_rfq** =========================================================================================== > CreateRFQResponse create\_rfq(create\_rfq\_request) Create RFQ Endpoint for creating a new RFQ. You can have a maximum of 100 open RFQs at a time. ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-4) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **create\_rfq\_request** | [**CreateRFQRequest**](https://docs.kalshi.com/python-sdk/models/CreateRFQRequest) | | | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-4) Return type [**CreateRFQResponse**](https://docs.kalshi.com/python-sdk/models/CreateRFQResponse) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-4) HTTP response details | Status code | Description | | --- | --- | | **201** | RFQ created successfully | | **400** | Bad request - invalid input | | **401** | Unauthorized - authentication required | | **409** | Conflict - resource already exists or cannot be modified | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#delete-quote) **delete\_quote** =============================================================================================== > delete\_quote(quote\_id) Delete Quote Endpoint for deleting a quote, which means it can no longer be accepted. ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-5) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **quote\_id** | **str** | Quote ID | | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-5) Return type void (empty response body) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-5) HTTP response details | Status code | Description | | --- | --- | | **204** | Quote deleted successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#delete-rfq) **delete\_rfq** =========================================================================================== > delete\_rfq(rfq\_id) Delete RFQ Endpoint for deleting an RFQ by ID ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-6) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **rfq\_id** | **str** | RFQ ID | | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-6) Return type void (empty response body) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-6) HTTP response details | Status code | Description | | --- | --- | | **204** | RFQ deleted successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-communications-id) **get\_communications\_id** ================================================================================================================== > GetCommunicationsIDResponse get\_communications\_id() Get Communications ID Endpoint for getting the communications ID of the logged-in user. ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-7) Parameters This endpoint does not need any parameter. ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-7) Return type [**GetCommunicationsIDResponse**](https://docs.kalshi.com/python-sdk/models/GetCommunicationsIDResponse) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-7) HTTP response details | Status code | Description | | --- | --- | | **200** | Communications ID retrieved successfully | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-quote) **get\_quote** ========================================================================================= > GetQuoteResponse get\_quote(quote\_id) Get Quote Endpoint for getting a particular quote ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-8) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **quote\_id** | **str** | Quote ID | | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-8) Return type [**GetQuoteResponse**](https://docs.kalshi.com/python-sdk/models/GetQuoteResponse) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-8) HTTP response details | Status code | Description | | --- | --- | | **200** | Quote retrieved successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-quotes) **get\_quotes** =========================================================================================== > GetQuotesResponse get\_quotes(cursor=cursor, event\_ticker=event\_ticker, market\_ticker=market\_ticker, limit=limit, status=status, quote\_creator\_user\_id=quote\_creator\_user\_id, rfq\_creator\_user\_id=rfq\_creator\_user\_id, rfq\_creator\_subtrader\_id=rfq\_creator\_subtrader\_id, rfq\_id=rfq\_id) Get Quotes Endpoint for getting quotes ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-9) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **cursor** | **str** | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | \[optional\] | | **event\_ticker** | **str** | Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10). | \[optional\] | | **market\_ticker** | **str** | Filter by market ticker | \[optional\] | | **limit** | **int** | Parameter to specify the number of results per page. Defaults to 500. | \[optional\] \[default to 500\] | | **status** | **str** | Filter quotes by status | \[optional\] | | **quote\_creator\_user\_id** | **str** | Filter quotes by quote creator user ID | \[optional\] | | **rfq\_creator\_user\_id** | **str** | Filter quotes by RFQ creator user ID | \[optional\] | | **rfq\_creator\_subtrader\_id** | **str** | Filter quotes by RFQ creator subtrader ID (FCM members only) | \[optional\] | | **rfq\_id** | **str** | Filter quotes by RFQ ID | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-9) Return type [**GetQuotesResponse**](https://docs.kalshi.com/python-sdk/models/GetQuotesResponse) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-9) HTTP response details | Status code | Description | | --- | --- | | **200** | Quotes retrieved successfully | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-rfq) **get\_rfq** ===================================================================================== > GetRFQResponse get\_rfq(rfq\_id) Get RFQ Endpoint for getting a single RFQ by id ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-10) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **rfq\_id** | **str** | RFQ ID | | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-10) Return type [**GetRFQResponse**](https://docs.kalshi.com/python-sdk/models/GetRFQResponse) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-10) HTTP response details | Status code | Description | | --- | --- | | **200** | RFQ retrieved successfully | | **401** | Unauthorized - authentication required | | **404** | Resource not found | | **500** | Internal server error | [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#get-rfqs) **get\_rfqs** ======================================================================================= > GetRFQsResponse get\_rfqs(cursor=cursor, event\_ticker=event\_ticker, market\_ticker=market\_ticker, limit=limit, status=status, creator\_user\_id=creator\_user\_id) Get RFQs Endpoint for getting RFQs ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#parameters-11) Parameters | Name | Type | Description | Notes | | --- | --- | --- | --- | | **cursor** | **str** | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | \[optional\] | | **event\_ticker** | **str** | Event ticker of desired positions. Multiple event tickers can be provided as a comma-separated list (maximum 10). | \[optional\] | | **market\_ticker** | **str** | Filter by market ticker | \[optional\] | | **limit** | **int** | Parameter to specify the number of results per page. Defaults to 100. | \[optional\] \[default to 100\] | | **status** | **str** | Filter RFQs by status | \[optional\] | | **creator\_user\_id** | **str** | Filter RFQs by creator user ID | \[optional\] | ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#return-type-11) Return type [**GetRFQsResponse**](https://docs.kalshi.com/python-sdk/models/GetRFQsResponse) ### [​](https://docs.kalshi.com/python-sdk/api/CommunicationsApi#http-response-details-11) HTTP response details | Status code | Description | | --- | --- | | **200** | RFQs retrieved successfully | | **401** | Unauthorized - authentication required | | **500** | Internal server error | [Markets](https://docs.kalshi.com/python-sdk/api/MarketsApi) [Events](https://docs.kalshi.com/python-sdk/api/EventsApi) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Market - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/market/get-market#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation market Get Market [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Market cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets/{ticker} 200 Copy Ask AI { "market": { "ticker": "", "event_ticker": "", "market_type": "binary", "title": "", "subtitle": "", "yes_sub_title": "", "no_sub_title": "", "created_time": "2023-11-07T05:31:56Z", "updated_time": "2023-11-07T05:31:56Z", "open_time": "2023-11-07T05:31:56Z", "close_time": "2023-11-07T05:31:56Z", "expiration_time": "2023-11-07T05:31:56Z", "latest_expiration_time": "2023-11-07T05:31:56Z", "settlement_timer_seconds": 123, "status": "initialized", "response_price_units": "usd_cent", "yes_bid": 123, "yes_bid_dollars": "0.5600", "yes_bid_size_fp": "10.00", "yes_ask": 123, "yes_ask_dollars": "0.5600", "yes_ask_size_fp": "10.00", "no_bid": 123, "no_bid_dollars": "0.5600", "no_ask": 123, "no_ask_dollars": "0.5600", "last_price": 123, "last_price_dollars": "0.5600", "volume": 123, "volume_fp": "10.00", "volume_24h": 123, "volume_24h_fp": "10.00", "result": "yes", "can_close_early": true, "fractional_trading_enabled": true, "open_interest": 123, "open_interest_fp": "10.00", "notional_value": 123, "notional_value_dollars": "0.5600", "previous_yes_bid": 123, "previous_yes_bid_dollars": "0.5600", "previous_yes_ask": 123, "previous_yes_ask_dollars": "0.5600", "previous_price": 123, "previous_price_dollars": "0.5600", "liquidity": 123, "liquidity_dollars": "0.5600", "expiration_value": "", "tick_size": 123, "rules_primary": "", "rules_secondary": "", "price_level_structure": "", "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ], "expected_expiration_time": "2023-11-07T05:31:56Z", "settlement_value": 123, "settlement_value_dollars": "0.5600", "settlement_ts": "2023-11-07T05:31:56Z", "fee_waiver_expiration_time": "2023-11-07T05:31:56Z", "early_close_condition": "", "strike_type": "greater", "floor_strike": 123, "cap_strike": 123, "functional_strike": "", "custom_strike": {}, "mve_collection_ticker": "", "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ], "primary_participant_key": "", "is_provisional": true } } GET / markets / {ticker} Try it Get Market cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets/{ticker} 200 Copy Ask AI { "market": { "ticker": "", "event_ticker": "", "market_type": "binary", "title": "", "subtitle": "", "yes_sub_title": "", "no_sub_title": "", "created_time": "2023-11-07T05:31:56Z", "updated_time": "2023-11-07T05:31:56Z", "open_time": "2023-11-07T05:31:56Z", "close_time": "2023-11-07T05:31:56Z", "expiration_time": "2023-11-07T05:31:56Z", "latest_expiration_time": "2023-11-07T05:31:56Z", "settlement_timer_seconds": 123, "status": "initialized", "response_price_units": "usd_cent", "yes_bid": 123, "yes_bid_dollars": "0.5600", "yes_bid_size_fp": "10.00", "yes_ask": 123, "yes_ask_dollars": "0.5600", "yes_ask_size_fp": "10.00", "no_bid": 123, "no_bid_dollars": "0.5600", "no_ask": 123, "no_ask_dollars": "0.5600", "last_price": 123, "last_price_dollars": "0.5600", "volume": 123, "volume_fp": "10.00", "volume_24h": 123, "volume_24h_fp": "10.00", "result": "yes", "can_close_early": true, "fractional_trading_enabled": true, "open_interest": 123, "open_interest_fp": "10.00", "notional_value": 123, "notional_value_dollars": "0.5600", "previous_yes_bid": 123, "previous_yes_bid_dollars": "0.5600", "previous_yes_ask": 123, "previous_yes_ask_dollars": "0.5600", "previous_price": 123, "previous_price_dollars": "0.5600", "liquidity": 123, "liquidity_dollars": "0.5600", "expiration_value": "", "tick_size": 123, "rules_primary": "", "rules_secondary": "", "price_level_structure": "", "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ], "expected_expiration_time": "2023-11-07T05:31:56Z", "settlement_value": 123, "settlement_value_dollars": "0.5600", "settlement_ts": "2023-11-07T05:31:56Z", "fee_waiver_expiration_time": "2023-11-07T05:31:56Z", "early_close_condition": "", "strike_type": "greater", "floor_strike": 123, "cap_strike": 123, "functional_strike": "", "custom_strike": {}, "mve_collection_ticker": "", "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ], "primary_participant_key": "", "is_provisional": true } } #### Path Parameters [​](https://docs.kalshi.com/api-reference/market/get-market#parameter-ticker) ticker string required Market ticker #### Response 200 application/json Market retrieved successfully [​](https://docs.kalshi.com/api-reference/market/get-market#response-market) market object required Show child attributes [Get Markets](https://docs.kalshi.com/api-reference/market/get-markets) [Batch Get Market Candlesticks](https://docs.kalshi.com/api-reference/market/batch-get-market-candlesticks) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Market Orderbook - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/market/get-market-orderbook#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation market Get Market Orderbook [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Market Orderbook cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets/{ticker}/orderbook \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 404 500 Copy Ask AI { "orderbook": { "yes": [\ [\ 123\ ]\ ], "no": [\ [\ 123\ ]\ ], "yes_dollars": [\ [\ "0.1500",\ 100\ ]\ ], "no_dollars": [\ [\ "0.1500",\ 100\ ]\ ] }, "orderbook_fp": { "yes_dollars": [\ [\ "0.1500",\ "100.00"\ ]\ ], "no_dollars": [\ [\ "0.1500",\ "100.00"\ ]\ ] } } GET / markets / {ticker} / orderbook Try it Get Market Orderbook cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets/{ticker}/orderbook \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 404 500 Copy Ask AI { "orderbook": { "yes": [\ [\ 123\ ]\ ], "no": [\ [\ 123\ ]\ ], "yes_dollars": [\ [\ "0.1500",\ 100\ ]\ ], "no_dollars": [\ [\ "0.1500",\ 100\ ]\ ] }, "orderbook_fp": { "yes_dollars": [\ [\ "0.1500",\ "100.00"\ ]\ ], "no_dollars": [\ [\ "0.1500",\ "100.00"\ ]\ ] } } #### Authorizations [​](https://docs.kalshi.com/api-reference/market/get-market-orderbook#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/market/get-market-orderbook#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/market/get-market-orderbook#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/market/get-market-orderbook#parameter-ticker) ticker string required Market ticker #### Query Parameters [​](https://docs.kalshi.com/api-reference/market/get-market-orderbook#parameter-depth) depth integer default:0 Depth of the orderbook to retrieve (0 or negative means all levels, 1-100 for specific depth) Required range: `0 <= x <= 100` #### Response 200 application/json Orderbook retrieved successfully [​](https://docs.kalshi.com/api-reference/market/get-market-orderbook#response-orderbook) orderbook object required Legacy integer-count orderbook (will be deprecated). Prefer orderbook\_fp for fixed-point contract counts. Show child attributes [​](https://docs.kalshi.com/api-reference/market/get-market-orderbook#response-orderbook-fp) orderbook\_fp object required Orderbook with fixed-point contract counts (fp) in all price levels. Show child attributes [Get Trades](https://docs.kalshi.com/api-reference/market/get-trades) [Get Series](https://docs.kalshi.com/api-reference/market/get-series) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Market Candlesticks - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation market Get Market Candlesticks [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Market Candlesticks cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/series/{series_ticker}/markets/{ticker}/candlesticks 200 Copy Ask AI { "ticker": "", "candlesticks": [\ {\ "end_period_ts": 123,\ "yes_bid": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600"\ },\ "yes_ask": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600"\ },\ "price": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600",\ "mean": 123,\ "mean_dollars": "0.5600",\ "previous": 123,\ "previous_dollars": "0.5600",\ "min": 123,\ "min_dollars": "0.5600",\ "max": 123,\ "max_dollars": "0.5600"\ },\ "volume": 123,\ "volume_fp": "10.00",\ "open_interest": 123,\ "open_interest_fp": "10.00"\ }\ ] } GET / series / {series\_ticker} / markets / {ticker} / candlesticks Try it Get Market Candlesticks cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/series/{series_ticker}/markets/{ticker}/candlesticks 200 Copy Ask AI { "ticker": "", "candlesticks": [\ {\ "end_period_ts": 123,\ "yes_bid": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600"\ },\ "yes_ask": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600"\ },\ "price": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600",\ "mean": 123,\ "mean_dollars": "0.5600",\ "previous": 123,\ "previous_dollars": "0.5600",\ "min": 123,\ "min_dollars": "0.5600",\ "max": 123,\ "max_dollars": "0.5600"\ },\ "volume": 123,\ "volume_fp": "10.00",\ "open_interest": 123,\ "open_interest_fp": "10.00"\ }\ ] } #### Path Parameters [​](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#parameter-series-ticker) series\_ticker string required Series ticker - the series that contains the target market [​](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#parameter-ticker) ticker string required Market ticker - unique identifier for the specific market #### Query Parameters [​](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#parameter-start-ts) start\_ts integer required Start timestamp (Unix timestamp). Candlesticks will include those ending on or after this time. [​](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#parameter-end-ts) end\_ts integer required End timestamp (Unix timestamp). Candlesticks will include those ending on or before this time. [​](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#parameter-period-interval) period\_interval enum required Time period length of each candlestick in minutes. Valid values are 1 (1 minute), 60 (1 hour), or 1440 (1 day). Available options: `1`, `60`, `1440` [​](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#parameter-include-latest-before-start) include\_latest\_before\_start boolean default:false If true, prepends the latest candlestick available before the start\_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start\_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start\_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick #### Response 200 application/json Candlesticks retrieved successfully [​](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#response-ticker) ticker string required Unique identifier for the market. [​](https://docs.kalshi.com/api-reference/market/get-market-candlesticks#response-candlesticks) candlesticks object\[\] required Array of candlestick data points for the specified time range. Show child attributes [Get Account API Limits](https://docs.kalshi.com/api-reference/account/get-account-api-limits) [Get Trades](https://docs.kalshi.com/api-reference/market/get-trades) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Series - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/market/get-series#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation market Get Series [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Series cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/series/{series_ticker} 200 400 500 Copy Ask AI { "series": { "ticker": "", "frequency": "", "title": "", "category": "", "tags": [\ ""\ ], "settlement_sources": [\ {\ "name": "",\ "url": ""\ }\ ], "contract_url": "", "contract_terms_url": "", "fee_type": "quadratic", "fee_multiplier": 123, "additional_prohibitions": [\ ""\ ], "product_metadata": {}, "volume": 123, "volume_fp": "10.00", "last_updated_ts": "2023-11-07T05:31:56Z" } } GET / series / {series\_ticker} Try it Get Series cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/series/{series_ticker} 200 400 500 Copy Ask AI { "series": { "ticker": "", "frequency": "", "title": "", "category": "", "tags": [\ ""\ ], "settlement_sources": [\ {\ "name": "",\ "url": ""\ }\ ], "contract_url": "", "contract_terms_url": "", "fee_type": "quadratic", "fee_multiplier": 123, "additional_prohibitions": [\ ""\ ], "product_metadata": {}, "volume": 123, "volume_fp": "10.00", "last_updated_ts": "2023-11-07T05:31:56Z" } } #### Path Parameters [​](https://docs.kalshi.com/api-reference/market/get-series#parameter-series-ticker) series\_ticker string required The ticker of the series to retrieve #### Query Parameters [​](https://docs.kalshi.com/api-reference/market/get-series#parameter-include-volume) include\_volume boolean default:false If true, includes the total volume traded across all events in this series. #### Response 200 application/json Series retrieved successfully [​](https://docs.kalshi.com/api-reference/market/get-series#response-series) series object required Show child attributes [Get Market Orderbook](https://docs.kalshi.com/api-reference/market/get-market-orderbook) [Get Series List](https://docs.kalshi.com/api-reference/market/get-series-list) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Series List - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/market/get-series-list#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation market Get Series List [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Series List cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/series 200 400 500 Copy Ask AI { "series": [\ {\ "ticker": "",\ "frequency": "",\ "title": "",\ "category": "",\ "tags": [\ ""\ ],\ "settlement_sources": [\ {\ "name": "",\ "url": ""\ }\ ],\ "contract_url": "",\ "contract_terms_url": "",\ "fee_type": "quadratic",\ "fee_multiplier": 123,\ "additional_prohibitions": [\ ""\ ],\ "product_metadata": {},\ "volume": 123,\ "volume_fp": "10.00",\ "last_updated_ts": "2023-11-07T05:31:56Z"\ }\ ] } GET / series Try it Get Series List cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/series 200 400 500 Copy Ask AI { "series": [\ {\ "ticker": "",\ "frequency": "",\ "title": "",\ "category": "",\ "tags": [\ ""\ ],\ "settlement_sources": [\ {\ "name": "",\ "url": ""\ }\ ],\ "contract_url": "",\ "contract_terms_url": "",\ "fee_type": "quadratic",\ "fee_multiplier": 123,\ "additional_prohibitions": [\ ""\ ],\ "product_metadata": {},\ "volume": 123,\ "volume_fp": "10.00",\ "last_updated_ts": "2023-11-07T05:31:56Z"\ }\ ] } #### Query Parameters [​](https://docs.kalshi.com/api-reference/market/get-series-list#parameter-category) category string [​](https://docs.kalshi.com/api-reference/market/get-series-list#parameter-tags) tags string [​](https://docs.kalshi.com/api-reference/market/get-series-list#parameter-include-product-metadata) include\_product\_metadata boolean default:false [​](https://docs.kalshi.com/api-reference/market/get-series-list#parameter-include-volume) include\_volume boolean default:false If true, includes the total volume traded across all events in each series. [​](https://docs.kalshi.com/api-reference/market/get-series-list#parameter-min-updated-ts) min\_updated\_ts integer Filter series with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes. #### Response 200 application/json Series list retrieved successfully [​](https://docs.kalshi.com/api-reference/market/get-series-list#response-series) series object\[\] required Show child attributes [Get Series](https://docs.kalshi.com/api-reference/market/get-series) [Get Markets](https://docs.kalshi.com/api-reference/market/get-markets) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Batch Get Market Candlesticks - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/market/batch-get-market-candlesticks#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation market Batch Get Market Candlesticks [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Batch Get Market Candlesticks cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets/candlesticks 200 Copy Ask AI { "markets": [\ {\ "market_ticker": "",\ "candlesticks": [\ {\ "end_period_ts": 123,\ "yes_bid": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600"\ },\ "yes_ask": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600"\ },\ "price": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600",\ "mean": 123,\ "mean_dollars": "0.5600",\ "previous": 123,\ "previous_dollars": "0.5600",\ "min": 123,\ "min_dollars": "0.5600",\ "max": 123,\ "max_dollars": "0.5600"\ },\ "volume": 123,\ "volume_fp": "10.00",\ "open_interest": 123,\ "open_interest_fp": "10.00"\ }\ ]\ }\ ] } GET / markets / candlesticks Try it Batch Get Market Candlesticks cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets/candlesticks 200 Copy Ask AI { "markets": [\ {\ "market_ticker": "",\ "candlesticks": [\ {\ "end_period_ts": 123,\ "yes_bid": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600"\ },\ "yes_ask": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600"\ },\ "price": {\ "open": 123,\ "open_dollars": "0.5600",\ "low": 123,\ "low_dollars": "0.5600",\ "high": 123,\ "high_dollars": "0.5600",\ "close": 123,\ "close_dollars": "0.5600",\ "mean": 123,\ "mean_dollars": "0.5600",\ "previous": 123,\ "previous_dollars": "0.5600",\ "min": 123,\ "min_dollars": "0.5600",\ "max": 123,\ "max_dollars": "0.5600"\ },\ "volume": 123,\ "volume_fp": "10.00",\ "open_interest": 123,\ "open_interest_fp": "10.00"\ }\ ]\ }\ ] } #### Query Parameters [​](https://docs.kalshi.com/api-reference/market/batch-get-market-candlesticks#parameter-market-tickers) market\_tickers string required Comma-separated list of market tickers (maximum 100) [​](https://docs.kalshi.com/api-reference/market/batch-get-market-candlesticks#parameter-start-ts) start\_ts integer required Start timestamp in Unix seconds [​](https://docs.kalshi.com/api-reference/market/batch-get-market-candlesticks#parameter-end-ts) end\_ts integer required End timestamp in Unix seconds [​](https://docs.kalshi.com/api-reference/market/batch-get-market-candlesticks#parameter-period-interval) period\_interval integer required Candlestick period interval in minutes Required range: `x >= 1` [​](https://docs.kalshi.com/api-reference/market/batch-get-market-candlesticks#parameter-include-latest-before-start) include\_latest\_before\_start boolean default:false If true, prepends the latest candlestick available before the start\_ts. This synthetic candlestick is created by: 1. Finding the most recent real candlestick before start\_ts 2. Projecting it forward to the first period boundary (calculated as the next period interval after start\_ts) 3. Setting all OHLC prices to null, and `previous_price` to the close price from the real candlestick #### Response 200 application/json Market candlesticks retrieved successfully [​](https://docs.kalshi.com/api-reference/market/batch-get-market-candlesticks#response-markets) markets object\[\] required Array of market candlestick data, one entry per requested market. Show child attributes [Get Market](https://docs.kalshi.com/api-reference/market/get-market) [Get Event Candlesticks](https://docs.kalshi.com/api-reference/events/get-event-candlesticks) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Historical Market - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/historical/get-historical-market#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation historical Get Historical Market [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Historical Market cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/markets/{ticker} 200 404 500 Copy Ask AI { "market": { "ticker": "", "event_ticker": "", "market_type": "binary", "title": "", "subtitle": "", "yes_sub_title": "", "no_sub_title": "", "created_time": "2023-11-07T05:31:56Z", "updated_time": "2023-11-07T05:31:56Z", "open_time": "2023-11-07T05:31:56Z", "close_time": "2023-11-07T05:31:56Z", "expiration_time": "2023-11-07T05:31:56Z", "latest_expiration_time": "2023-11-07T05:31:56Z", "settlement_timer_seconds": 123, "status": "initialized", "response_price_units": "usd_cent", "yes_bid": 123, "yes_bid_dollars": "0.5600", "yes_bid_size_fp": "10.00", "yes_ask": 123, "yes_ask_dollars": "0.5600", "yes_ask_size_fp": "10.00", "no_bid": 123, "no_bid_dollars": "0.5600", "no_ask": 123, "no_ask_dollars": "0.5600", "last_price": 123, "last_price_dollars": "0.5600", "volume": 123, "volume_fp": "10.00", "volume_24h": 123, "volume_24h_fp": "10.00", "result": "yes", "can_close_early": true, "fractional_trading_enabled": true, "open_interest": 123, "open_interest_fp": "10.00", "notional_value": 123, "notional_value_dollars": "0.5600", "previous_yes_bid": 123, "previous_yes_bid_dollars": "0.5600", "previous_yes_ask": 123, "previous_yes_ask_dollars": "0.5600", "previous_price": 123, "previous_price_dollars": "0.5600", "liquidity": 123, "liquidity_dollars": "0.5600", "expiration_value": "", "tick_size": 123, "rules_primary": "", "rules_secondary": "", "price_level_structure": "", "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ], "expected_expiration_time": "2023-11-07T05:31:56Z", "settlement_value": 123, "settlement_value_dollars": "0.5600", "settlement_ts": "2023-11-07T05:31:56Z", "fee_waiver_expiration_time": "2023-11-07T05:31:56Z", "early_close_condition": "", "strike_type": "greater", "floor_strike": 123, "cap_strike": 123, "functional_strike": "", "custom_strike": {}, "mve_collection_ticker": "", "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ], "primary_participant_key": "", "is_provisional": true } } GET / historical / markets / {ticker} Try it Get Historical Market cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/historical/markets/{ticker} 200 404 500 Copy Ask AI { "market": { "ticker": "", "event_ticker": "", "market_type": "binary", "title": "", "subtitle": "", "yes_sub_title": "", "no_sub_title": "", "created_time": "2023-11-07T05:31:56Z", "updated_time": "2023-11-07T05:31:56Z", "open_time": "2023-11-07T05:31:56Z", "close_time": "2023-11-07T05:31:56Z", "expiration_time": "2023-11-07T05:31:56Z", "latest_expiration_time": "2023-11-07T05:31:56Z", "settlement_timer_seconds": 123, "status": "initialized", "response_price_units": "usd_cent", "yes_bid": 123, "yes_bid_dollars": "0.5600", "yes_bid_size_fp": "10.00", "yes_ask": 123, "yes_ask_dollars": "0.5600", "yes_ask_size_fp": "10.00", "no_bid": 123, "no_bid_dollars": "0.5600", "no_ask": 123, "no_ask_dollars": "0.5600", "last_price": 123, "last_price_dollars": "0.5600", "volume": 123, "volume_fp": "10.00", "volume_24h": 123, "volume_24h_fp": "10.00", "result": "yes", "can_close_early": true, "fractional_trading_enabled": true, "open_interest": 123, "open_interest_fp": "10.00", "notional_value": 123, "notional_value_dollars": "0.5600", "previous_yes_bid": 123, "previous_yes_bid_dollars": "0.5600", "previous_yes_ask": 123, "previous_yes_ask_dollars": "0.5600", "previous_price": 123, "previous_price_dollars": "0.5600", "liquidity": 123, "liquidity_dollars": "0.5600", "expiration_value": "", "tick_size": 123, "rules_primary": "", "rules_secondary": "", "price_level_structure": "", "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ], "expected_expiration_time": "2023-11-07T05:31:56Z", "settlement_value": 123, "settlement_value_dollars": "0.5600", "settlement_ts": "2023-11-07T05:31:56Z", "fee_waiver_expiration_time": "2023-11-07T05:31:56Z", "early_close_condition": "", "strike_type": "greater", "floor_strike": 123, "cap_strike": 123, "functional_strike": "", "custom_strike": {}, "mve_collection_ticker": "", "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ], "primary_participant_key": "", "is_provisional": true } } #### Path Parameters [​](https://docs.kalshi.com/api-reference/historical/get-historical-market#parameter-ticker) ticker string required Market ticker #### Response 200 application/json Historical market retrieved successfully [​](https://docs.kalshi.com/api-reference/historical/get-historical-market#response-market) market object required Show child attributes [Get Historical Markets](https://docs.kalshi.com/api-reference/historical/get-historical-markets) [Get Exchange Status](https://docs.kalshi.com/api-reference/exchange/get-exchange-status) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Milestones - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/milestone/get-milestones#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation milestone Get Milestones [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Milestones cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/milestones 200 Copy Ask AI { "milestones": [\ {\ "id": "",\ "category": "",\ "type": "",\ "start_date": "2023-11-07T05:31:56Z",\ "related_event_tickers": [\ ""\ ],\ "title": "",\ "notification_message": "",\ "details": {},\ "primary_event_tickers": [\ ""\ ],\ "last_updated_ts": "2023-11-07T05:31:56Z",\ "end_date": "2023-11-07T05:31:56Z",\ "source_id": "",\ "source_ids": {}\ }\ ], "cursor": "" } GET / milestones Try it Get Milestones cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/milestones 200 Copy Ask AI { "milestones": [\ {\ "id": "",\ "category": "",\ "type": "",\ "start_date": "2023-11-07T05:31:56Z",\ "related_event_tickers": [\ ""\ ],\ "title": "",\ "notification_message": "",\ "details": {},\ "primary_event_tickers": [\ ""\ ],\ "last_updated_ts": "2023-11-07T05:31:56Z",\ "end_date": "2023-11-07T05:31:56Z",\ "source_id": "",\ "source_ids": {}\ }\ ], "cursor": "" } #### Query Parameters [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-limit) limit integer required Number of milestones to return per page Required range: `1 <= x <= 500` [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-minimum-start-date) minimum\_start\_date string Minimum start date to filter milestones. Format RFC3339 timestamp [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-category) category string Filter by milestone category [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-competition) competition string Filter by competition [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-source-id) source\_id string Filter by source id [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-type) type string Filter by milestone type [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-related-event-ticker) related\_event\_ticker string Filter by related event ticker [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-cursor) cursor string Pagination cursor. Use the cursor value returned from the previous response to get the next page of results [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#parameter-min-updated-ts) min\_updated\_ts integer Filter milestones with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes. #### Response 200 application/json Milestones retrieved successfully [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#response-milestones) milestones object\[\] required List of milestones. Show child attributes [​](https://docs.kalshi.com/api-reference/milestone/get-milestones#response-cursor) cursor string Cursor for pagination. [Get Milestone](https://docs.kalshi.com/api-reference/milestone/get-milestone) [Get Communications ID](https://docs.kalshi.com/api-reference/communications/get-communications-id) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Markets - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/market/get-markets#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation market Get Markets [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Markets cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets 200 Copy Ask AI { "markets": [\ {\ "ticker": "",\ "event_ticker": "",\ "market_type": "binary",\ "title": "",\ "subtitle": "",\ "yes_sub_title": "",\ "no_sub_title": "",\ "created_time": "2023-11-07T05:31:56Z",\ "updated_time": "2023-11-07T05:31:56Z",\ "open_time": "2023-11-07T05:31:56Z",\ "close_time": "2023-11-07T05:31:56Z",\ "expiration_time": "2023-11-07T05:31:56Z",\ "latest_expiration_time": "2023-11-07T05:31:56Z",\ "settlement_timer_seconds": 123,\ "status": "initialized",\ "response_price_units": "usd_cent",\ "yes_bid": 123,\ "yes_bid_dollars": "0.5600",\ "yes_bid_size_fp": "10.00",\ "yes_ask": 123,\ "yes_ask_dollars": "0.5600",\ "yes_ask_size_fp": "10.00",\ "no_bid": 123,\ "no_bid_dollars": "0.5600",\ "no_ask": 123,\ "no_ask_dollars": "0.5600",\ "last_price": 123,\ "last_price_dollars": "0.5600",\ "volume": 123,\ "volume_fp": "10.00",\ "volume_24h": 123,\ "volume_24h_fp": "10.00",\ "result": "yes",\ "can_close_early": true,\ "fractional_trading_enabled": true,\ "open_interest": 123,\ "open_interest_fp": "10.00",\ "notional_value": 123,\ "notional_value_dollars": "0.5600",\ "previous_yes_bid": 123,\ "previous_yes_bid_dollars": "0.5600",\ "previous_yes_ask": 123,\ "previous_yes_ask_dollars": "0.5600",\ "previous_price": 123,\ "previous_price_dollars": "0.5600",\ "liquidity": 123,\ "liquidity_dollars": "0.5600",\ "expiration_value": "",\ "tick_size": 123,\ "rules_primary": "",\ "rules_secondary": "",\ "price_level_structure": "",\ "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ],\ "expected_expiration_time": "2023-11-07T05:31:56Z",\ "settlement_value": 123,\ "settlement_value_dollars": "0.5600",\ "settlement_ts": "2023-11-07T05:31:56Z",\ "fee_waiver_expiration_time": "2023-11-07T05:31:56Z",\ "early_close_condition": "",\ "strike_type": "greater",\ "floor_strike": 123,\ "cap_strike": 123,\ "functional_strike": "",\ "custom_strike": {},\ "mve_collection_ticker": "",\ "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ],\ "primary_participant_key": "",\ "is_provisional": true\ }\ ], "cursor": "" } GET / markets Try it Get Markets cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets 200 Copy Ask AI { "markets": [\ {\ "ticker": "",\ "event_ticker": "",\ "market_type": "binary",\ "title": "",\ "subtitle": "",\ "yes_sub_title": "",\ "no_sub_title": "",\ "created_time": "2023-11-07T05:31:56Z",\ "updated_time": "2023-11-07T05:31:56Z",\ "open_time": "2023-11-07T05:31:56Z",\ "close_time": "2023-11-07T05:31:56Z",\ "expiration_time": "2023-11-07T05:31:56Z",\ "latest_expiration_time": "2023-11-07T05:31:56Z",\ "settlement_timer_seconds": 123,\ "status": "initialized",\ "response_price_units": "usd_cent",\ "yes_bid": 123,\ "yes_bid_dollars": "0.5600",\ "yes_bid_size_fp": "10.00",\ "yes_ask": 123,\ "yes_ask_dollars": "0.5600",\ "yes_ask_size_fp": "10.00",\ "no_bid": 123,\ "no_bid_dollars": "0.5600",\ "no_ask": 123,\ "no_ask_dollars": "0.5600",\ "last_price": 123,\ "last_price_dollars": "0.5600",\ "volume": 123,\ "volume_fp": "10.00",\ "volume_24h": 123,\ "volume_24h_fp": "10.00",\ "result": "yes",\ "can_close_early": true,\ "fractional_trading_enabled": true,\ "open_interest": 123,\ "open_interest_fp": "10.00",\ "notional_value": 123,\ "notional_value_dollars": "0.5600",\ "previous_yes_bid": 123,\ "previous_yes_bid_dollars": "0.5600",\ "previous_yes_ask": 123,\ "previous_yes_ask_dollars": "0.5600",\ "previous_price": 123,\ "previous_price_dollars": "0.5600",\ "liquidity": 123,\ "liquidity_dollars": "0.5600",\ "expiration_value": "",\ "tick_size": 123,\ "rules_primary": "",\ "rules_secondary": "",\ "price_level_structure": "",\ "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ],\ "expected_expiration_time": "2023-11-07T05:31:56Z",\ "settlement_value": 123,\ "settlement_value_dollars": "0.5600",\ "settlement_ts": "2023-11-07T05:31:56Z",\ "fee_waiver_expiration_time": "2023-11-07T05:31:56Z",\ "early_close_condition": "",\ "strike_type": "greater",\ "floor_strike": 123,\ "cap_strike": 123,\ "functional_strike": "",\ "custom_strike": {},\ "mve_collection_ticker": "",\ "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ],\ "primary_participant_key": "",\ "is_provisional": true\ }\ ], "cursor": "" } #### Query Parameters [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-limit) limit integer default:100 Number of results per page. Defaults to 100. Maximum value is 1000. Required range: `1 <= x <= 1000` [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-cursor) cursor string Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-event-ticker) event\_ticker string Event ticker to filter by. Only a single event ticker is supported. [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-series-ticker) series\_ticker string Filter by series ticker [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-min-created-ts) min\_created\_ts integer Filter items that created after this Unix timestamp [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-max-created-ts) max\_created\_ts integer Filter items that created before this Unix timestamp [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-min-updated-ts) min\_updated\_ts integer Return markets with metadata updated later than this Unix timestamp. Tracks non-trading changes only. Incompatible with any other filters. [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-max-close-ts) max\_close\_ts integer Filter items that close before this Unix timestamp [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-min-close-ts) min\_close\_ts integer Filter items that close after this Unix timestamp [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-min-settled-ts) min\_settled\_ts integer Filter items that settled after this Unix timestamp [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-max-settled-ts) max\_settled\_ts integer Filter items that settled before this Unix timestamp [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-status) status enum Filter by market status. Leave empty to return markets with any status. Available options: `unopened`, `open`, `paused`, `closed`, `settled` [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-tickers) tickers string Filter by specific market tickers. Comma-separated list of market tickers to retrieve. [​](https://docs.kalshi.com/api-reference/market/get-markets#parameter-mve-filter) mve\_filter enum Filter by multivariate events (combos). 'only' returns only multivariate events, 'exclude' excludes multivariate events. Available options: `only`, `exclude` #### Response 200 application/json Markets retrieved successfully [​](https://docs.kalshi.com/api-reference/market/get-markets#response-markets) markets object\[\] required Show child attributes [​](https://docs.kalshi.com/api-reference/market/get-markets#response-cursor) cursor string required [Get Series List](https://docs.kalshi.com/api-reference/market/get-series-list) [Get Market](https://docs.kalshi.com/api-reference/market/get-market) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Multivariate Event Collection - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation multivariate Get Multivariate Event Collection [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Multivariate Event Collection cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/multivariate_event_collections/{collection_ticker} 200 400 404 500 Copy Ask AI { "multivariate_contract": { "collection_ticker": "", "series_ticker": "", "title": "", "description": "", "open_date": "2023-11-07T05:31:56Z", "close_date": "2023-11-07T05:31:56Z", "associated_events": [\ {\ "ticker": "",\ "is_yes_only": true,\ "active_quoters": [\ ""\ ],\ "size_max": 123,\ "size_min": 123\ }\ ], "associated_event_tickers": [\ ""\ ], "is_ordered": true, "is_single_market_per_event": true, "is_all_yes": true, "size_min": 123, "size_max": 123, "functional_description": "" } } GET / multivariate\_event\_collections / {collection\_ticker} Try it Get Multivariate Event Collection cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/multivariate_event_collections/{collection_ticker} 200 400 404 500 Copy Ask AI { "multivariate_contract": { "collection_ticker": "", "series_ticker": "", "title": "", "description": "", "open_date": "2023-11-07T05:31:56Z", "close_date": "2023-11-07T05:31:56Z", "associated_events": [\ {\ "ticker": "",\ "is_yes_only": true,\ "active_quoters": [\ ""\ ],\ "size_max": 123,\ "size_min": 123\ }\ ], "associated_event_tickers": [\ ""\ ], "is_ordered": true, "is_single_market_per_event": true, "is_all_yes": true, "size_min": 123, "size_max": 123, "functional_description": "" } } #### Path Parameters [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection#parameter-collection-ticker) collection\_ticker string required Collection ticker #### Response 200 application/json Collection retrieved successfully [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection#response-multivariate-contract) multivariate\_contract object required The multivariate event collection. Show child attributes [Confirm Quote](https://docs.kalshi.com/api-reference/communications/confirm-quote) [Create Market In Multivariate Event Collection](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Milestone - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/milestone/get-milestone#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation milestone Get Milestone [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Milestone cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/milestones/{milestone_id} 200 Copy Ask AI { "milestone": { "id": "", "category": "", "type": "", "start_date": "2023-11-07T05:31:56Z", "related_event_tickers": [\ ""\ ], "title": "", "notification_message": "", "details": {}, "primary_event_tickers": [\ ""\ ], "last_updated_ts": "2023-11-07T05:31:56Z", "end_date": "2023-11-07T05:31:56Z", "source_id": "", "source_ids": {} } } GET / milestones / {milestone\_id} Try it Get Milestone cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/milestones/{milestone_id} 200 Copy Ask AI { "milestone": { "id": "", "category": "", "type": "", "start_date": "2023-11-07T05:31:56Z", "related_event_tickers": [\ ""\ ], "title": "", "notification_message": "", "details": {}, "primary_event_tickers": [\ ""\ ], "last_updated_ts": "2023-11-07T05:31:56Z", "end_date": "2023-11-07T05:31:56Z", "source_id": "", "source_ids": {} } } #### Path Parameters [​](https://docs.kalshi.com/api-reference/milestone/get-milestone#parameter-milestone-id) milestone\_id string required Milestone ID #### Response 200 application/json Milestone retrieved successfully [​](https://docs.kalshi.com/api-reference/milestone/get-milestone#response-milestone) milestone object required The milestone data. Show child attributes [Get Structured Target](https://docs.kalshi.com/api-reference/structured-targets/get-structured-target) [Get Milestones](https://docs.kalshi.com/api-reference/milestone/get-milestones) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Trades - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/market/get-trades#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation market Get Trades [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Trades cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets/trades 200 Copy Ask AI { "trades": [\ {\ "trade_id": "",\ "ticker": "",\ "price": 123,\ "count": 123,\ "count_fp": "10.00",\ "yes_price": 123,\ "no_price": 123,\ "yes_price_dollars": "0.5600",\ "no_price_dollars": "0.5600",\ "taker_side": "yes",\ "created_time": "2023-11-07T05:31:56Z"\ }\ ], "cursor": "" } GET / markets / trades Try it Get Trades cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/markets/trades 200 Copy Ask AI { "trades": [\ {\ "trade_id": "",\ "ticker": "",\ "price": 123,\ "count": 123,\ "count_fp": "10.00",\ "yes_price": 123,\ "no_price": 123,\ "yes_price_dollars": "0.5600",\ "no_price_dollars": "0.5600",\ "taker_side": "yes",\ "created_time": "2023-11-07T05:31:56Z"\ }\ ], "cursor": "" } #### Query Parameters [​](https://docs.kalshi.com/api-reference/market/get-trades#parameter-limit) limit integer default:100 Number of results per page. Defaults to 100. Maximum value is 1000. Required range: `1 <= x <= 1000` [​](https://docs.kalshi.com/api-reference/market/get-trades#parameter-cursor) cursor string Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. [​](https://docs.kalshi.com/api-reference/market/get-trades#parameter-ticker) ticker string Filter by market ticker [​](https://docs.kalshi.com/api-reference/market/get-trades#parameter-min-ts) min\_ts integer Filter items after this Unix timestamp [​](https://docs.kalshi.com/api-reference/market/get-trades#parameter-max-ts) max\_ts integer Filter items before this Unix timestamp #### Response 200 application/json Trades retrieved successfully [​](https://docs.kalshi.com/api-reference/market/get-trades#response-trades) trades object\[\] required Show child attributes [​](https://docs.kalshi.com/api-reference/market/get-trades#response-cursor) cursor string required [Get Market Candlesticks](https://docs.kalshi.com/api-reference/market/get-market-candlesticks) [Get Market Orderbook](https://docs.kalshi.com/api-reference/market/get-market-orderbook) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Multivariate Event Collection Lookup History - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection-lookup-history#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation multivariate Get Multivariate Event Collection Lookup History [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Multivariate Event Collection Lookup History cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/multivariate_event_collections/{collection_ticker}/lookup 200 400 500 Copy Ask AI { "lookup_points": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "selected_markets": [\ {\ "market_ticker": "",\ "event_ticker": "",\ "side": "yes"\ }\ ],\ "last_queried_ts": "2023-11-07T05:31:56Z"\ }\ ] } GET / multivariate\_event\_collections / {collection\_ticker} / lookup Try it Get Multivariate Event Collection Lookup History cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/multivariate_event_collections/{collection_ticker}/lookup 200 400 500 Copy Ask AI { "lookup_points": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "selected_markets": [\ {\ "market_ticker": "",\ "event_ticker": "",\ "side": "yes"\ }\ ],\ "last_queried_ts": "2023-11-07T05:31:56Z"\ }\ ] } #### Path Parameters [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection-lookup-history#parameter-collection-ticker) collection\_ticker string required Collection ticker #### Query Parameters [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection-lookup-history#parameter-lookback-seconds) lookback\_seconds enum required Number of seconds to look back for lookup history. Must be one of 10, 60, 300, or 3600. Available options: `10`, `60`, `300`, `3600` #### Response 200 application/json Lookup history retrieved successfully [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection-lookup-history#response-lookup-points) lookup\_points object\[\] required List of recent lookup points in the collection. Show child attributes [Get Multivariate Event Collections](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections) [Lookup Tickers For Market In Multivariate Event Collection](https://docs.kalshi.com/api-reference/multivariate/lookup-tickers-for-market-in-multivariate-event-collection) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Multivariate Event Collections - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation multivariate Get Multivariate Event Collections [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Multivariate Event Collections cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/multivariate_event_collections 200 400 500 Copy Ask AI { "multivariate_contracts": [\ {\ "collection_ticker": "",\ "series_ticker": "",\ "title": "",\ "description": "",\ "open_date": "2023-11-07T05:31:56Z",\ "close_date": "2023-11-07T05:31:56Z",\ "associated_events": [\ {\ "ticker": "",\ "is_yes_only": true,\ "active_quoters": [\ ""\ ],\ "size_max": 123,\ "size_min": 123\ }\ ],\ "associated_event_tickers": [\ ""\ ],\ "is_ordered": true,\ "is_single_market_per_event": true,\ "is_all_yes": true,\ "size_min": 123,\ "size_max": 123,\ "functional_description": ""\ }\ ], "cursor": "" } GET / multivariate\_event\_collections Try it Get Multivariate Event Collections cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/multivariate_event_collections 200 400 500 Copy Ask AI { "multivariate_contracts": [\ {\ "collection_ticker": "",\ "series_ticker": "",\ "title": "",\ "description": "",\ "open_date": "2023-11-07T05:31:56Z",\ "close_date": "2023-11-07T05:31:56Z",\ "associated_events": [\ {\ "ticker": "",\ "is_yes_only": true,\ "active_quoters": [\ ""\ ],\ "size_max": 123,\ "size_min": 123\ }\ ],\ "associated_event_tickers": [\ ""\ ],\ "is_ordered": true,\ "is_single_market_per_event": true,\ "is_all_yes": true,\ "size_min": 123,\ "size_max": 123,\ "functional_description": ""\ }\ ], "cursor": "" } #### Query Parameters [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections#parameter-status) status enum Only return collections of a certain status. Can be unopened, open, or closed. Available options: `unopened`, `open`, `closed` [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections#parameter-associated-event-ticker) associated\_event\_ticker string Only return collections associated with a particular event ticker. [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections#parameter-series-ticker) series\_ticker string Only return collections with a particular series ticker. [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections#parameter-limit) limit integer Specify the maximum number of results. Required range: `1 <= x <= 200` [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections#parameter-cursor) cursor string The Cursor represents a pointer to the next page of records in the pagination. This optional parameter, when filled, should be filled with the cursor string returned in a previous request to this end-point. #### Response 200 application/json Collections retrieved successfully [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections#response-multivariate-contracts) multivariate\_contracts object\[\] required List of multivariate event collections. Show child attributes [​](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections#response-cursor) cursor string The Cursor represents a pointer to the next page of records in the pagination. Use the value returned here in the cursor query parameter for this end-point to get the next page containing limit records. An empty value of this field indicates there is no next page. [Create Market In Multivariate Event Collection](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection) [Get Multivariate Event Collection Lookup History](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection-lookup-history) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Order Groups - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/order-groups/get-order-groups#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation order-groups Get Order Groups [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Order Groups cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 400 401 500 Copy Ask AI { "order_groups": [\ {\ "id": "",\ "is_auto_cancel_enabled": true,\ "contracts_limit": 123,\ "contracts_limit_fp": "10.00"\ }\ ] } GET / portfolio / order\_groups Try it Get Order Groups cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 400 401 500 Copy Ask AI { "order_groups": [\ {\ "id": "",\ "is_auto_cancel_enabled": true,\ "contracts_limit": 123,\ "contracts_limit_fp": "10.00"\ }\ ] } #### Authorizations [​](https://docs.kalshi.com/api-reference/order-groups/get-order-groups#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/order-groups/get-order-groups#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/order-groups/get-order-groups#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Query Parameters [​](https://docs.kalshi.com/api-reference/order-groups/get-order-groups#parameter-subaccount) subaccount integer Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. #### Response 200 application/json Order groups retrieved successfully [​](https://docs.kalshi.com/api-reference/order-groups/get-order-groups#response-order-groups) order\_groups object\[\] Show child attributes [Get Order Queue Position](https://docs.kalshi.com/api-reference/orders/get-order-queue-position) [Create Order Group](https://docs.kalshi.com/api-reference/order-groups/create-order-group) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Create Order Group - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/order-groups/create-order-group#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation order-groups Create Order Group [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Create Order Group cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/create \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "subaccount": 0, "contracts_limit": 2, "contracts_limit_fp": "10.00" } ' 201 400 401 500 Copy Ask AI { "order_group_id": "" } POST / portfolio / order\_groups / create Try it Create Order Group cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/create \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "subaccount": 0, "contracts_limit": 2, "contracts_limit_fp": "10.00" } ' 201 400 401 500 Copy Ask AI { "order_group_id": "" } #### Authorizations [​](https://docs.kalshi.com/api-reference/order-groups/create-order-group#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/order-groups/create-order-group#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/order-groups/create-order-group#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Body application/json [​](https://docs.kalshi.com/api-reference/order-groups/create-order-group#body-subaccount) subaccount integer default:0 Optional subaccount number to use for this order group (0 for primary, 1-32 for subaccounts) Required range: `x >= 0` [​](https://docs.kalshi.com/api-reference/order-groups/create-order-group#body-contracts-limit) contracts\_limit integer Specifies the maximum number of contracts that can be matched within this group over a rolling 15-second window. Whole contracts only. Provide contracts\_limit or contracts\_limit\_fp; if both provided they must match. Required range: `x >= 1` [​](https://docs.kalshi.com/api-reference/order-groups/create-order-group#body-contracts-limit-fp-one-of-0) contracts\_limit\_fp string | null String representation of the maximum number of contracts that can be matched within this group over a rolling 15-second window (whole contracts only). Provide contracts\_limit or contracts\_limit\_fp; if both provided they must match. Example: `"10.00"` #### Response 201 application/json Order group created successfully [​](https://docs.kalshi.com/api-reference/order-groups/create-order-group#response-order-group-id) order\_group\_id string required The unique identifier for the created order group [Get Order Groups](https://docs.kalshi.com/api-reference/order-groups/get-order-groups) [Get Order Group](https://docs.kalshi.com/api-reference/order-groups/get-order-group) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Delete Order Group - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/order-groups/delete-order-group#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation order-groups Delete Order Group [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Delete Order Group cURL Copy Ask AI curl --request DELETE \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/{order_group_id} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 404 500 Copy Ask AI {} DELETE / portfolio / order\_groups / {order\_group\_id} Try it Delete Order Group cURL Copy Ask AI curl --request DELETE \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/{order_group_id} \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 404 500 Copy Ask AI {} #### Authorizations [​](https://docs.kalshi.com/api-reference/order-groups/delete-order-group#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/order-groups/delete-order-group#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/order-groups/delete-order-group#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/order-groups/delete-order-group#parameter-order-group-id) order\_group\_id string required Order group ID #### Query Parameters [​](https://docs.kalshi.com/api-reference/order-groups/delete-order-group#parameter-subaccount) subaccount integer Subaccount number (0 for primary, 1-32 for subaccounts). Defaults to 0. #### Response 200 application/json Order group deleted successfully An empty response body [Get Order Group](https://docs.kalshi.com/api-reference/order-groups/get-order-group) [Reset Order Group](https://docs.kalshi.com/api-reference/order-groups/reset-order-group) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Update Order Group Limit - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation order-groups Update Order Group Limit [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Update Order Group Limit cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/{order_group_id}/limit \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "contracts_limit": 2, "contracts_limit_fp": "10.00" } ' 200 400 401 404 500 Copy Ask AI {} PUT / portfolio / order\_groups / {order\_group\_id} / limit Try it Update Order Group Limit cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/{order_group_id}/limit \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "contracts_limit": 2, "contracts_limit_fp": "10.00" } ' 200 400 401 404 500 Copy Ask AI {} #### Authorizations [​](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit#parameter-order-group-id) order\_group\_id string required Order group ID #### Body application/json [​](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit#body-contracts-limit) contracts\_limit integer New maximum number of contracts that can be matched within this group over a rolling 15-second window. Whole contracts only. Provide contracts\_limit or contracts\_limit\_fp; if both provided they must match. Required range: `x >= 1` [​](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit#body-contracts-limit-fp-one-of-0) contracts\_limit\_fp string | null String representation of the new maximum number of contracts that can be matched within this group over a rolling 15-second window (whole contracts only). Provide contracts\_limit or contracts\_limit\_fp; if both provided they must match. Example: `"10.00"` #### Response 200 application/json Order group limit updated successfully An empty response body [Trigger Order Group](https://docs.kalshi.com/api-reference/order-groups/trigger-order-group) [Get Balance](https://docs.kalshi.com/api-reference/portfolio/get-balance) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Reset Order Group - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/order-groups/reset-order-group#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation order-groups Reset Order Group [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Reset Order Group cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/{order_group_id}/reset \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data '{}' 200 401 404 500 Copy Ask AI {} PUT / portfolio / order\_groups / {order\_group\_id} / reset Try it Reset Order Group cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/{order_group_id}/reset \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data '{}' 200 401 404 500 Copy Ask AI {} #### Authorizations [​](https://docs.kalshi.com/api-reference/order-groups/reset-order-group#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/order-groups/reset-order-group#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/order-groups/reset-order-group#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/order-groups/reset-order-group#parameter-order-group-id) order\_group\_id string required Order group ID #### Query Parameters [​](https://docs.kalshi.com/api-reference/order-groups/reset-order-group#parameter-subaccount) subaccount integer Subaccount number (0 for primary, 1-32 for subaccounts). Defaults to 0. #### Body application/json An empty response body #### Response 200 application/json Order group reset successfully An empty response body [Delete Order Group](https://docs.kalshi.com/api-reference/order-groups/delete-order-group) [Trigger Order Group](https://docs.kalshi.com/api-reference/order-groups/trigger-order-group) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Trigger Order Group - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/order-groups/trigger-order-group#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation order-groups Trigger Order Group [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Trigger Order Group cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/{order_group_id}/trigger \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data '{}' 200 401 404 500 Copy Ask AI {} PUT / portfolio / order\_groups / {order\_group\_id} / trigger Try it Trigger Order Group cURL Copy Ask AI curl --request PUT \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/order_groups/{order_group_id}/trigger \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data '{}' 200 401 404 500 Copy Ask AI {} #### Authorizations [​](https://docs.kalshi.com/api-reference/order-groups/trigger-order-group#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/order-groups/trigger-order-group#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/order-groups/trigger-order-group#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/order-groups/trigger-order-group#parameter-order-group-id) order\_group\_id string required Order group ID #### Query Parameters [​](https://docs.kalshi.com/api-reference/order-groups/trigger-order-group#parameter-subaccount) subaccount integer Subaccount number (0 for primary, 1-32 for subaccounts). Defaults to 0. #### Body application/json An empty response body #### Response 200 application/json Order group triggered successfully An empty response body [Reset Order Group](https://docs.kalshi.com/api-reference/order-groups/reset-order-group) [Update Order Group Limit](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Balance - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/portfolio/get-balance#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation portfolio Get Balance [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Balance cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/balance \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 500 Copy Ask AI { "balance": 123, "portfolio_value": 123, "updated_ts": 123 } GET / portfolio / balance Try it Get Balance cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/balance \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 401 500 Copy Ask AI { "balance": 123, "portfolio_value": 123, "updated_ts": 123 } #### Authorizations [​](https://docs.kalshi.com/api-reference/portfolio/get-balance#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/portfolio/get-balance#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/portfolio/get-balance#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Query Parameters [​](https://docs.kalshi.com/api-reference/portfolio/get-balance#parameter-subaccount) subaccount integer Subaccount number (0 for primary, 1-32 for subaccounts). Defaults to 0. #### Response 200 application/json Balance retrieved successfully [​](https://docs.kalshi.com/api-reference/portfolio/get-balance#response-balance) balance integer required Member's available balance in cents. This represents the amount available for trading. [​](https://docs.kalshi.com/api-reference/portfolio/get-balance#response-portfolio-value) portfolio\_value integer required Member's portfolio value in cents. This is the current value of all positions held. [​](https://docs.kalshi.com/api-reference/portfolio/get-balance#response-updated-ts) updated\_ts integer required Unix timestamp of the last update to the balance. [Update Order Group Limit](https://docs.kalshi.com/api-reference/order-groups/update-order-group-limit) [Create Subaccount](https://docs.kalshi.com/api-reference/portfolio/create-subaccount) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get Queue Positions for Orders - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/orders/get-queue-positions-for-orders#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation orders Get Queue Positions for Orders [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Get Queue Positions for Orders cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/orders/queue_positions \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 400 401 500 Copy Ask AI { "queue_positions": [\ {\ "order_id": "",\ "market_ticker": "",\ "queue_position": 123,\ "queue_position_fp": "10.00"\ }\ ] } GET / portfolio / orders / queue\_positions Try it Get Queue Positions for Orders cURL Copy Ask AI curl --request GET \ --url https://api.elections.kalshi.com/trade-api/v2/portfolio/orders/queue_positions \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' 200 400 401 500 Copy Ask AI { "queue_positions": [\ {\ "order_id": "",\ "market_ticker": "",\ "queue_position": 123,\ "queue_position_fp": "10.00"\ }\ ] } #### Authorizations [​](https://docs.kalshi.com/api-reference/orders/get-queue-positions-for-orders#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/orders/get-queue-positions-for-orders#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/orders/get-queue-positions-for-orders#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Query Parameters [​](https://docs.kalshi.com/api-reference/orders/get-queue-positions-for-orders#parameter-market-tickers) market\_tickers string Comma-separated list of market tickers to filter by [​](https://docs.kalshi.com/api-reference/orders/get-queue-positions-for-orders#parameter-event-ticker) event\_ticker string Event ticker to filter by [​](https://docs.kalshi.com/api-reference/orders/get-queue-positions-for-orders#parameter-subaccount) subaccount integer Subaccount number (0 for primary, 1-32 for subaccounts). Defaults to 0. #### Response 200 application/json Queue positions retrieved successfully [​](https://docs.kalshi.com/api-reference/orders/get-queue-positions-for-orders#response-queue-positions) queue\_positions object\[\] required Queue positions for all matching orders Show child attributes [Decrease Order](https://docs.kalshi.com/api-reference/orders/decrease-order) [Get Order Queue Position](https://docs.kalshi.com/api-reference/orders/get-order-queue-position) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Create Market In Multivariate Event Collection - API Documentation [Skip to main content](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#content-area) [API Documentation home page![light logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)![dark logo](https://mintcdn.com/kalshi-b198743e/256YfSogHTshhCZY/logo.svg?fit=max&auto=format&n=256YfSogHTshhCZY&q=85&s=3375dbbebd156f5a455d0f0ecf02de0c)](https://docs.kalshi.com/) Search... ⌘KAsk AI Search... Navigation multivariate Create Market In Multivariate Event Collection [Welcome](https://docs.kalshi.com/welcome) [Quick Start](https://docs.kalshi.com/getting_started/quick_start_market_data) [Concepts](https://docs.kalshi.com/getting_started/making_your_first_request) [REST](https://docs.kalshi.com/api-reference/historical/get-historical-cutoff-timestamps) [Websockets](https://docs.kalshi.com/websockets/websocket-connection) [FIX](https://docs.kalshi.com/fix) [SDKs](https://docs.kalshi.com/sdks/overview) [Changelog](https://docs.kalshi.com/changelog) Create Market In Multivariate Event Collection cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/multivariate_event_collections/{collection_ticker} \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "selected_markets": [\ {\ "market_ticker": "",\ "event_ticker": "",\ "side": "yes"\ }\ ], "with_market_payload": true } ' 200 400 401 429 500 Copy Ask AI { "event_ticker": "", "market_ticker": "", "market": { "ticker": "", "event_ticker": "", "market_type": "binary", "title": "", "subtitle": "", "yes_sub_title": "", "no_sub_title": "", "created_time": "2023-11-07T05:31:56Z", "updated_time": "2023-11-07T05:31:56Z", "open_time": "2023-11-07T05:31:56Z", "close_time": "2023-11-07T05:31:56Z", "expiration_time": "2023-11-07T05:31:56Z", "latest_expiration_time": "2023-11-07T05:31:56Z", "settlement_timer_seconds": 123, "status": "initialized", "response_price_units": "usd_cent", "yes_bid": 123, "yes_bid_dollars": "0.5600", "yes_bid_size_fp": "10.00", "yes_ask": 123, "yes_ask_dollars": "0.5600", "yes_ask_size_fp": "10.00", "no_bid": 123, "no_bid_dollars": "0.5600", "no_ask": 123, "no_ask_dollars": "0.5600", "last_price": 123, "last_price_dollars": "0.5600", "volume": 123, "volume_fp": "10.00", "volume_24h": 123, "volume_24h_fp": "10.00", "result": "yes", "can_close_early": true, "fractional_trading_enabled": true, "open_interest": 123, "open_interest_fp": "10.00", "notional_value": 123, "notional_value_dollars": "0.5600", "previous_yes_bid": 123, "previous_yes_bid_dollars": "0.5600", "previous_yes_ask": 123, "previous_yes_ask_dollars": "0.5600", "previous_price": 123, "previous_price_dollars": "0.5600", "liquidity": 123, "liquidity_dollars": "0.5600", "expiration_value": "", "tick_size": 123, "rules_primary": "", "rules_secondary": "", "price_level_structure": "", "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ], "expected_expiration_time": "2023-11-07T05:31:56Z", "settlement_value": 123, "settlement_value_dollars": "0.5600", "settlement_ts": "2023-11-07T05:31:56Z", "fee_waiver_expiration_time": "2023-11-07T05:31:56Z", "early_close_condition": "", "strike_type": "greater", "floor_strike": 123, "cap_strike": 123, "functional_strike": "", "custom_strike": {}, "mve_collection_ticker": "", "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ], "primary_participant_key": "", "is_provisional": true } } POST / multivariate\_event\_collections / {collection\_ticker} Try it Create Market In Multivariate Event Collection cURL Copy Ask AI curl --request POST \ --url https://api.elections.kalshi.com/trade-api/v2/multivariate_event_collections/{collection_ticker} \ --header 'Content-Type: application/json' \ --header 'KALSHI-ACCESS-KEY: ' \ --header 'KALSHI-ACCESS-SIGNATURE: ' \ --header 'KALSHI-ACCESS-TIMESTAMP: ' \ --data ' { "selected_markets": [\ {\ "market_ticker": "",\ "event_ticker": "",\ "side": "yes"\ }\ ], "with_market_payload": true } ' 200 400 401 429 500 Copy Ask AI { "event_ticker": "", "market_ticker": "", "market": { "ticker": "", "event_ticker": "", "market_type": "binary", "title": "", "subtitle": "", "yes_sub_title": "", "no_sub_title": "", "created_time": "2023-11-07T05:31:56Z", "updated_time": "2023-11-07T05:31:56Z", "open_time": "2023-11-07T05:31:56Z", "close_time": "2023-11-07T05:31:56Z", "expiration_time": "2023-11-07T05:31:56Z", "latest_expiration_time": "2023-11-07T05:31:56Z", "settlement_timer_seconds": 123, "status": "initialized", "response_price_units": "usd_cent", "yes_bid": 123, "yes_bid_dollars": "0.5600", "yes_bid_size_fp": "10.00", "yes_ask": 123, "yes_ask_dollars": "0.5600", "yes_ask_size_fp": "10.00", "no_bid": 123, "no_bid_dollars": "0.5600", "no_ask": 123, "no_ask_dollars": "0.5600", "last_price": 123, "last_price_dollars": "0.5600", "volume": 123, "volume_fp": "10.00", "volume_24h": 123, "volume_24h_fp": "10.00", "result": "yes", "can_close_early": true, "fractional_trading_enabled": true, "open_interest": 123, "open_interest_fp": "10.00", "notional_value": 123, "notional_value_dollars": "0.5600", "previous_yes_bid": 123, "previous_yes_bid_dollars": "0.5600", "previous_yes_ask": 123, "previous_yes_ask_dollars": "0.5600", "previous_price": 123, "previous_price_dollars": "0.5600", "liquidity": 123, "liquidity_dollars": "0.5600", "expiration_value": "", "tick_size": 123, "rules_primary": "", "rules_secondary": "", "price_level_structure": "", "price_ranges": [\ {\ "start": "",\ "end": "",\ "step": ""\ }\ ], "expected_expiration_time": "2023-11-07T05:31:56Z", "settlement_value": 123, "settlement_value_dollars": "0.5600", "settlement_ts": "2023-11-07T05:31:56Z", "fee_waiver_expiration_time": "2023-11-07T05:31:56Z", "early_close_condition": "", "strike_type": "greater", "floor_strike": 123, "cap_strike": 123, "functional_strike": "", "custom_strike": {}, "mve_collection_ticker": "", "mve_selected_legs": [\ {\ "event_ticker": "",\ "market_ticker": "",\ "side": "",\ "yes_settlement_value_dollars": "0.5600"\ }\ ], "primary_participant_key": "", "is_provisional": true } } #### Authorizations [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#authorization-kalshi-access-key) KALSHI-ACCESS-KEY string header required Your API key ID [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#authorization-kalshi-access-signature) KALSHI-ACCESS-SIGNATURE string header required RSA-PSS signature of the request [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#authorization-kalshi-access-timestamp) KALSHI-ACCESS-TIMESTAMP string header required Request timestamp in milliseconds #### Path Parameters [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#parameter-collection-ticker) collection\_ticker string required Collection ticker #### Body application/json [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#body-selected-markets) selected\_markets object\[\] required List of selected markets that act as parameters to determine which market is created. Show child attributes [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#body-with-market-payload) with\_market\_payload boolean Whether to include the market payload in the response. #### Response 200 application/json Market created successfully [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#response-event-ticker) event\_ticker string required Event ticker for the created market. [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#response-market-ticker) market\_ticker string required Market ticker for the created market. [​](https://docs.kalshi.com/api-reference/multivariate/create-market-in-multivariate-event-collection#response-market) market object Market payload of the created market. Show child attributes [Get Multivariate Event Collection](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collection) [Get Multivariate Event Collections](https://docs.kalshi.com/api-reference/multivariate/get-multivariate-event-collections) ⌘I Assistant Responses are generated using AI and may contain mistakes. ---