Overview
Add Kalshi to any ModuleX agent or workflow. Access Kalshi prediction markets and trade event contracts against the Kalshi Trade API v2 (api.elections.kalshi.com/trade-api/v2). Retrieve markets, events, series, orderbooks, trades, and candlesticks; manage your balance, positions, orders, fills, and settlements; check exchange status; and place, cancel, or amend orders.
Authentication
API Key Authentication
Authenticate with a Kalshi API key id and its RSA private key. Each request is signed with the private key (RSA-PSS over SHA-256); the signing material never leaves the runtime.Step 1
Required Credentials
| Field | Description | Required | Format |
|---|---|---|---|
| API Key ID | Your Kalshi API Key ID from Account → API Keys | Yes | - |
| RSA Private Key (PEM) | Your Kalshi RSA private key in PEM format | Yes | -----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY----- |
Available Actions
get_markets — Retrieve a list of prediction markets with full filtering options.
get_markets — Retrieve a list of prediction markets with full filtering options.
Parameters
Response
{
"$defs": {
"Market": {
"additionalProperties": false,
"description": "A single market row (Trade API v2 shape).",
"properties": {
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"event_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Ticker"
},
"market_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Market Type"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subtitle"
},
"yes_sub_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Sub Title"
},
"no_sub_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Sub Title"
},
"open_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Time"
},
"close_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Close Time"
},
"expected_expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expected Expiration Time"
},
"expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Time"
},
"latest_expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Latest Expiration Time"
},
"settlement_timer_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Settlement Timer Seconds"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"response_price_units": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Response Price Units"
},
"notional_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Notional Value"
},
"tick_size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Tick Size"
},
"yes_bid": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Bid"
},
"yes_ask": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Ask"
},
"no_bid": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Bid"
},
"no_ask": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Ask"
},
"last_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Price"
},
"previous_yes_bid": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous Yes Bid"
},
"previous_yes_ask": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous Yes Ask"
},
"previous_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous Price"
},
"volume": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume"
},
"volume_24h": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume 24H"
},
"liquidity": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Liquidity"
},
"open_interest": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Interest"
},
"result": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Result"
},
"cap_strike": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Cap Strike"
},
"floor_strike": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Floor Strike"
},
"can_close_early": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Can Close Early"
},
"expiration_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Value"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
},
"risk_limit_cents": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Risk Limit Cents"
},
"strike_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Strike Type"
},
"rules_primary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rules Primary"
},
"rules_secondary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rules Secondary"
},
"settlement_source_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Settlement Source Url"
},
"custom_strike": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Custom Strike"
},
"underlying": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Underlying"
},
"settlement_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Settlement Value"
},
"cfd_contract_size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Cfd Contract Size"
},
"yes_fee_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Fee Fp"
},
"no_fee_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Fee Fp"
},
"last_price_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Price Fp"
},
"yes_bid_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Bid Fp"
},
"yes_ask_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Ask Fp"
},
"no_bid_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Bid Fp"
},
"no_ask_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Ask Fp"
}
},
"title": "Market",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"markets": {
"items": {
"$ref": "#/$defs/Market"
},
"title": "Markets",
"type": "array"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"required": [
"success"
],
"title": "GetMarketsOutput",
"type": "object"
}
get_market — Retrieve details of a specific prediction market by ticker.
get_market — Retrieve details of a specific prediction market by ticker.
Parameters
Response
{
"$defs": {
"Market": {
"additionalProperties": false,
"description": "A single market row (Trade API v2 shape).",
"properties": {
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"event_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Ticker"
},
"market_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Market Type"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"subtitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subtitle"
},
"yes_sub_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Sub Title"
},
"no_sub_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Sub Title"
},
"open_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Time"
},
"close_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Close Time"
},
"expected_expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expected Expiration Time"
},
"expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Time"
},
"latest_expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Latest Expiration Time"
},
"settlement_timer_seconds": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Settlement Timer Seconds"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"response_price_units": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Response Price Units"
},
"notional_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Notional Value"
},
"tick_size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Tick Size"
},
"yes_bid": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Bid"
},
"yes_ask": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Ask"
},
"no_bid": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Bid"
},
"no_ask": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Ask"
},
"last_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Price"
},
"previous_yes_bid": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous Yes Bid"
},
"previous_yes_ask": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous Yes Ask"
},
"previous_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous Price"
},
"volume": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume"
},
"volume_24h": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume 24H"
},
"liquidity": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Liquidity"
},
"open_interest": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Interest"
},
"result": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Result"
},
"cap_strike": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Cap Strike"
},
"floor_strike": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Floor Strike"
},
"can_close_early": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Can Close Early"
},
"expiration_value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Value"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
},
"risk_limit_cents": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Risk Limit Cents"
},
"strike_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Strike Type"
},
"rules_primary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rules Primary"
},
"rules_secondary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Rules Secondary"
},
"settlement_source_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Settlement Source Url"
},
"custom_strike": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Custom Strike"
},
"underlying": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Underlying"
},
"settlement_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Settlement Value"
},
"cfd_contract_size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Cfd Contract Size"
},
"yes_fee_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Fee Fp"
},
"no_fee_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Fee Fp"
},
"last_price_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Price Fp"
},
"yes_bid_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Bid Fp"
},
"yes_ask_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Ask Fp"
},
"no_bid_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Bid Fp"
},
"no_ask_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Ask Fp"
}
},
"title": "Market",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"market": {
"anyOf": [
{
"$ref": "#/$defs/Market"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "GetMarketOutput",
"type": "object"
}
get_events — Retrieve a list of events with optional filtering.
get_events — Retrieve a list of events with optional filtering.
Parameters
Response
{
"$defs": {
"Event": {
"additionalProperties": false,
"description": "An event row (Trade API v2 shape).",
"properties": {
"event_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Ticker"
},
"series_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Series Ticker"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"sub_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sub Title"
},
"mutually_exclusive": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Mutually Exclusive"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
},
"collateral_return_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Collateral Return Type"
},
"strike_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Strike Date"
},
"strike_period": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Strike Period"
},
"available_on_brokers": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Available On Brokers"
},
"product_metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Product Metadata"
},
"markets": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Markets",
"type": "array"
}
},
"title": "Event",
"type": "object"
},
"Milestone": {
"additionalProperties": false,
"description": "An event milestone (returned by get_events when requested).",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Id"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Type"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"start_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Start Date"
},
"end_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "End Date"
},
"notification_message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Notification Message"
},
"primary_event_tickers": {
"items": {
"type": "string"
},
"title": "Primary Event Tickers",
"type": "array"
},
"related_event_tickers": {
"items": {
"type": "string"
},
"title": "Related Event Tickers",
"type": "array"
},
"last_updated_ts": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Updated Ts"
}
},
"title": "Milestone",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"events": {
"items": {
"$ref": "#/$defs/Event"
},
"title": "Events",
"type": "array"
},
"milestones": {
"items": {
"$ref": "#/$defs/Milestone"
},
"title": "Milestones",
"type": "array"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"required": [
"success"
],
"title": "GetEventsOutput",
"type": "object"
}
get_event — Retrieve details of a specific event by ticker.
get_event — Retrieve details of a specific event by ticker.
Parameters
Response
{
"$defs": {
"Event": {
"additionalProperties": false,
"description": "An event row (Trade API v2 shape).",
"properties": {
"event_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Ticker"
},
"series_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Series Ticker"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"sub_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sub Title"
},
"mutually_exclusive": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Mutually Exclusive"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
},
"collateral_return_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Collateral Return Type"
},
"strike_date": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Strike Date"
},
"strike_period": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Strike Period"
},
"available_on_brokers": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Available On Brokers"
},
"product_metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Product Metadata"
},
"markets": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Markets",
"type": "array"
}
},
"title": "Event",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"event": {
"anyOf": [
{
"$ref": "#/$defs/Event"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "GetEventOutput",
"type": "object"
}
get_balance — Retrieve your account balance and portfolio value.
get_balance — Retrieve your account balance and portfolio value.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"balance": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Balance"
},
"portfolio_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Portfolio Value"
},
"updated_ts": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated Ts"
}
},
"required": [
"success"
],
"title": "GetBalanceOutput",
"type": "object"
}
get_positions — Retrieve your open positions.
get_positions — Retrieve your open positions.
Parameters
Response
{
"$defs": {
"EventPosition": {
"additionalProperties": false,
"properties": {
"event_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Ticker"
},
"event_exposure": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Exposure"
},
"realized_pnl": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Realized Pnl"
},
"total_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Total Cost"
}
},
"title": "EventPosition",
"type": "object"
},
"MarketPosition": {
"additionalProperties": false,
"properties": {
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"event_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Ticker"
},
"event_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Title"
},
"market_title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Market Title"
},
"position": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Position"
},
"market_exposure": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Market Exposure"
},
"realized_pnl": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Realized Pnl"
},
"total_traded": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Total Traded"
},
"resting_orders_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Resting Orders Count"
},
"fees_paid": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Fees Paid"
}
},
"title": "MarketPosition",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"market_positions": {
"items": {
"$ref": "#/$defs/MarketPosition"
},
"title": "Market Positions",
"type": "array"
},
"event_positions": {
"items": {
"$ref": "#/$defs/EventPosition"
},
"title": "Event Positions",
"type": "array"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"required": [
"success"
],
"title": "GetPositionsOutput",
"type": "object"
}
get_orders — Retrieve your orders with optional filtering.
get_orders — Retrieve your orders with optional filtering.
Parameters
Response
{
"$defs": {
"Order": {
"additionalProperties": false,
"description": "An order row (Trade API v2 portfolio order shape).",
"properties": {
"order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Id"
},
"user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User Id"
},
"client_order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Order Id"
},
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Side"
},
"action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Action"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Type"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"yes_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price"
},
"no_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price"
},
"yes_price_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price Dollars"
},
"no_price_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price Dollars"
},
"fill_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Count"
},
"fill_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Count Fp"
},
"remaining_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count"
},
"remaining_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count Fp"
},
"initial_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Initial Count"
},
"initial_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Initial Count Fp"
},
"taker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees"
},
"maker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees"
},
"taker_fees_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees Dollars"
},
"maker_fees_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees Dollars"
},
"taker_fill_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Cost"
},
"maker_fill_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Cost"
},
"taker_fill_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Cost Dollars"
},
"maker_fill_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Cost Dollars"
},
"queue_position": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Queue Position"
},
"expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Time"
},
"created_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created Time"
},
"last_update_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Update Time"
},
"self_trade_prevention_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Self Trade Prevention Type"
},
"order_group_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Group Id"
},
"cancel_order_on_pause": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Cancel Order On Pause"
}
},
"title": "Order",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"orders": {
"items": {
"$ref": "#/$defs/Order"
},
"title": "Orders",
"type": "array"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"required": [
"success"
],
"title": "GetOrdersOutput",
"type": "object"
}
get_order — Retrieve details of a specific order by ID.
get_order — Retrieve details of a specific order by ID.
Parameters
Response
{
"$defs": {
"Order": {
"additionalProperties": false,
"description": "An order row (Trade API v2 portfolio order shape).",
"properties": {
"order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Id"
},
"user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User Id"
},
"client_order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Order Id"
},
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Side"
},
"action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Action"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Type"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"yes_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price"
},
"no_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price"
},
"yes_price_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price Dollars"
},
"no_price_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price Dollars"
},
"fill_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Count"
},
"fill_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Count Fp"
},
"remaining_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count"
},
"remaining_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count Fp"
},
"initial_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Initial Count"
},
"initial_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Initial Count Fp"
},
"taker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees"
},
"maker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees"
},
"taker_fees_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees Dollars"
},
"maker_fees_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees Dollars"
},
"taker_fill_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Cost"
},
"maker_fill_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Cost"
},
"taker_fill_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Cost Dollars"
},
"maker_fill_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Cost Dollars"
},
"queue_position": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Queue Position"
},
"expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Time"
},
"created_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created Time"
},
"last_update_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Update Time"
},
"self_trade_prevention_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Self Trade Prevention Type"
},
"order_group_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Group Id"
},
"cancel_order_on_pause": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Cancel Order On Pause"
}
},
"title": "Order",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"order": {
"anyOf": [
{
"$ref": "#/$defs/Order"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "GetOrderOutput",
"type": "object"
}
get_orderbook — Retrieve the orderbook (yes and no bids) for a specific market.
get_orderbook — Retrieve the orderbook (yes and no bids) for a specific market.
Parameters
Response
{
"$defs": {
"Orderbook": {
"additionalProperties": false,
"properties": {
"yes": {
"items": {
"items": {},
"type": "array"
},
"title": "Yes",
"type": "array"
},
"no": {
"items": {
"items": {},
"type": "array"
},
"title": "No",
"type": "array"
},
"yes_dollars": {
"items": {
"items": {},
"type": "array"
},
"title": "Yes Dollars",
"type": "array"
},
"no_dollars": {
"items": {
"items": {},
"type": "array"
},
"title": "No Dollars",
"type": "array"
}
},
"title": "Orderbook",
"type": "object"
},
"OrderbookFp": {
"additionalProperties": false,
"properties": {
"yes_dollars": {
"items": {
"items": {},
"type": "array"
},
"title": "Yes Dollars",
"type": "array"
},
"no_dollars": {
"items": {
"items": {},
"type": "array"
},
"title": "No Dollars",
"type": "array"
}
},
"title": "OrderbookFp",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"orderbook": {
"anyOf": [
{
"$ref": "#/$defs/Orderbook"
},
{
"type": "null"
}
],
"default": null
},
"orderbook_fp": {
"anyOf": [
{
"$ref": "#/$defs/OrderbookFp"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "GetOrderbookOutput",
"type": "object"
}
get_trades — Retrieve recent public trades across markets with optional filtering.
get_trades — Retrieve recent public trades across markets with optional filtering.
Parameters
Response
{
"$defs": {
"Trade": {
"additionalProperties": false,
"properties": {
"trade_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Trade Id"
},
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"yes_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price"
},
"no_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Count"
},
"count_fp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Count Fp"
},
"created_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created Time"
},
"taker_side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Side"
}
},
"title": "Trade",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"trades": {
"items": {
"$ref": "#/$defs/Trade"
},
"title": "Trades",
"type": "array"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"required": [
"success"
],
"title": "GetTradesOutput",
"type": "object"
}
get_candlesticks — Retrieve OHLC candlestick data for a specific market.
get_candlesticks — Retrieve OHLC candlestick data for a specific market.
Parameters
Response
{
"$defs": {
"BidAskDistribution": {
"additionalProperties": false,
"properties": {
"open": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open"
},
"open_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Dollars"
},
"low": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Low"
},
"low_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Low Dollars"
},
"high": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "High"
},
"high_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "High Dollars"
},
"close": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Close"
},
"close_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Close Dollars"
}
},
"title": "BidAskDistribution",
"type": "object"
},
"MarketCandlestick": {
"additionalProperties": false,
"properties": {
"end_period_ts": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "End Period Ts"
},
"yes_bid": {
"anyOf": [
{
"$ref": "#/$defs/BidAskDistribution"
},
{
"type": "null"
}
],
"default": null
},
"yes_ask": {
"anyOf": [
{
"$ref": "#/$defs/BidAskDistribution"
},
{
"type": "null"
}
],
"default": null
},
"price": {
"anyOf": [
{
"$ref": "#/$defs/PriceDistribution"
},
{
"type": "null"
}
],
"default": null
},
"volume": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume"
},
"volume_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume Fp"
},
"open_interest": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Interest"
},
"open_interest_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Interest Fp"
}
},
"title": "MarketCandlestick",
"type": "object"
},
"PriceDistribution": {
"additionalProperties": false,
"properties": {
"open": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open"
},
"open_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Dollars"
},
"low": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Low"
},
"low_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Low Dollars"
},
"high": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "High"
},
"high_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "High Dollars"
},
"close": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Close"
},
"close_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Close Dollars"
},
"mean": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Mean"
},
"mean_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mean Dollars"
},
"previous": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous"
},
"previous_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous Dollars"
},
"min": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"min_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Min Dollars"
},
"max": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"max_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Dollars"
}
},
"title": "PriceDistribution",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"candlesticks": {
"items": {
"$ref": "#/$defs/MarketCandlestick"
},
"title": "Candlesticks",
"type": "array"
}
},
"required": [
"success"
],
"title": "GetCandlesticksOutput",
"type": "object"
}
get_event_candlesticks — Retrieve OHLC candlestick data aggregated across all markets in an event.
get_event_candlesticks — Retrieve OHLC candlestick data aggregated across all markets in an event.
Parameters
Response
{
"$defs": {
"BidAskDistribution": {
"additionalProperties": false,
"properties": {
"open": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open"
},
"open_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Dollars"
},
"low": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Low"
},
"low_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Low Dollars"
},
"high": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "High"
},
"high_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "High Dollars"
},
"close": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Close"
},
"close_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Close Dollars"
}
},
"title": "BidAskDistribution",
"type": "object"
},
"EventCandlestick": {
"additionalProperties": false,
"properties": {
"end_period_ts": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "End Period Ts"
},
"yes_bid": {
"anyOf": [
{
"$ref": "#/$defs/BidAskDistribution"
},
{
"type": "null"
}
],
"default": null
},
"yes_ask": {
"anyOf": [
{
"$ref": "#/$defs/BidAskDistribution"
},
{
"type": "null"
}
],
"default": null
},
"price": {
"anyOf": [
{
"$ref": "#/$defs/PriceDistribution"
},
{
"type": "null"
}
],
"default": null
},
"volume_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume Fp"
},
"open_interest_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Interest Fp"
}
},
"title": "EventCandlestick",
"type": "object"
},
"PriceDistribution": {
"additionalProperties": false,
"properties": {
"open": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Open"
},
"open_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Open Dollars"
},
"low": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Low"
},
"low_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Low Dollars"
},
"high": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "High"
},
"high_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "High Dollars"
},
"close": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Close"
},
"close_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Close Dollars"
},
"mean": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Mean"
},
"mean_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mean Dollars"
},
"previous": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous"
},
"previous_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Previous Dollars"
},
"min": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Min"
},
"min_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Min Dollars"
},
"max": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Max"
},
"max_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Dollars"
}
},
"title": "PriceDistribution",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"market_tickers": {
"items": {
"type": "string"
},
"title": "Market Tickers",
"type": "array"
},
"adjusted_end_ts": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Adjusted End Ts"
},
"market_candlesticks": {
"items": {
"$ref": "#/$defs/EventCandlestick"
},
"title": "Market Candlesticks",
"type": "array"
}
},
"required": [
"success"
],
"title": "GetEventCandlesticksOutput",
"type": "object"
}
get_fills — Retrieve your portfolio's fills/trades.
get_fills — Retrieve your portfolio's fills/trades.
Parameters
Response
{
"$defs": {
"Fill": {
"additionalProperties": false,
"properties": {
"fill_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Id"
},
"trade_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Trade Id"
},
"order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Id"
},
"client_order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Order Id"
},
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"market_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Market Ticker"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Side"
},
"action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Action"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Count"
},
"count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Count Fp"
},
"price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Price"
},
"yes_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price"
},
"no_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price"
},
"yes_price_fixed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price Fixed"
},
"no_price_fixed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price Fixed"
},
"is_taker": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Is Taker"
},
"created_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created Time"
},
"ts": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Ts"
}
},
"title": "Fill",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"fills": {
"items": {
"$ref": "#/$defs/Fill"
},
"title": "Fills",
"type": "array"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"required": [
"success"
],
"title": "GetFillsOutput",
"type": "object"
}
get_settlements — Retrieve your portfolio settlement history.
get_settlements — Retrieve your portfolio settlement history.
Parameters
Response
{
"$defs": {
"Settlement": {
"additionalProperties": false,
"properties": {
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"event_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Ticker"
},
"market_result": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Market Result"
},
"yes_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Count Fp"
},
"yes_total_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Total Cost Dollars"
},
"no_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Count Fp"
},
"no_total_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Total Cost Dollars"
},
"revenue": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Revenue"
},
"settled_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Settled Time"
},
"fee_cost": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fee Cost"
},
"value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"title": "Settlement",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"settlements": {
"items": {
"$ref": "#/$defs/Settlement"
},
"title": "Settlements",
"type": "array"
},
"cursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cursor"
}
},
"required": [
"success"
],
"title": "GetSettlementsOutput",
"type": "object"
}
get_series_by_ticker — Retrieve details of a specific market series by ticker.
get_series_by_ticker — Retrieve details of a specific market series by ticker.
Parameters
Response
{
"$defs": {
"Series": {
"additionalProperties": false,
"properties": {
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"frequency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Frequency"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
},
"tags": {
"items": {
"type": "string"
},
"title": "Tags",
"type": "array"
},
"settlement_sources": {
"items": {
"$ref": "#/$defs/SettlementSource"
},
"title": "Settlement Sources",
"type": "array"
},
"contract_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Contract Url"
},
"contract_terms_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Contract Terms Url"
},
"fee_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fee Type"
},
"fee_multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Fee Multiplier"
},
"additional_prohibitions": {
"items": {
"type": "string"
},
"title": "Additional Prohibitions",
"type": "array"
},
"product_metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Product Metadata"
},
"volume": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume"
},
"volume_fp": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume Fp"
},
"last_updated_ts": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Updated Ts"
}
},
"title": "Series",
"type": "object"
},
"SettlementSource": {
"additionalProperties": false,
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
}
},
"title": "SettlementSource",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"series": {
"anyOf": [
{
"$ref": "#/$defs/Series"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "GetSeriesByTickerOutput",
"type": "object"
}
get_series_list — Retrieve a list of market series with optional filtering.
get_series_list — Retrieve a list of market series with optional filtering.
Parameters
Response
{
"$defs": {
"Series": {
"additionalProperties": false,
"properties": {
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title"
},
"frequency": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Frequency"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
},
"tags": {
"items": {
"type": "string"
},
"title": "Tags",
"type": "array"
},
"settlement_sources": {
"items": {
"$ref": "#/$defs/SettlementSource"
},
"title": "Settlement Sources",
"type": "array"
},
"contract_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Contract Url"
},
"contract_terms_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Contract Terms Url"
},
"fee_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fee Type"
},
"fee_multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Fee Multiplier"
},
"additional_prohibitions": {
"items": {
"type": "string"
},
"title": "Additional Prohibitions",
"type": "array"
},
"product_metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Product Metadata"
},
"volume": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume"
},
"volume_fp": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Volume Fp"
},
"last_updated_ts": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Updated Ts"
}
},
"title": "Series",
"type": "object"
},
"SettlementSource": {
"additionalProperties": false,
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Url"
}
},
"title": "SettlementSource",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"series": {
"items": {
"$ref": "#/$defs/Series"
},
"title": "Series",
"type": "array"
}
},
"required": [
"success"
],
"title": "GetSeriesListOutput",
"type": "object"
}
get_exchange_status — Retrieve the current status of the Kalshi exchange.
get_exchange_status — Retrieve the current status of the Kalshi exchange.
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"exchange_active": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Exchange Active"
},
"trading_active": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Trading Active"
},
"exchange_estimated_resume_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Exchange Estimated Resume Time"
}
},
"required": [
"success"
],
"title": "GetExchangeStatusOutput",
"type": "object"
}
get_exchange_schedule — Retrieve the exchange trading schedule and maintenance windows.
get_exchange_schedule — Retrieve the exchange trading schedule and maintenance windows.
Response
{
"$defs": {
"ExchangeSchedule": {
"additionalProperties": false,
"properties": {
"standard_hours": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Standard Hours",
"type": "array"
},
"maintenance_windows": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Maintenance Windows",
"type": "array"
}
},
"title": "ExchangeSchedule",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"schedule": {
"anyOf": [
{
"$ref": "#/$defs/ExchangeSchedule"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "GetExchangeScheduleOutput",
"type": "object"
}
get_exchange_announcements — Retrieve exchange-wide announcements.
get_exchange_announcements — Retrieve exchange-wide announcements.
Response
{
"$defs": {
"Announcement": {
"additionalProperties": false,
"properties": {
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Type"
},
"message": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message"
},
"delivery_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Delivery Time"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
}
},
"title": "Announcement",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"announcements": {
"items": {
"$ref": "#/$defs/Announcement"
},
"title": "Announcements",
"type": "array"
}
},
"required": [
"success"
],
"title": "GetExchangeAnnouncementsOutput",
"type": "object"
}
create_order — Create a new order on a Kalshi prediction market.
create_order — Create a new order on a Kalshi prediction market.
Parameters
Response
{
"$defs": {
"Order": {
"additionalProperties": false,
"description": "An order row (Trade API v2 portfolio order shape).",
"properties": {
"order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Id"
},
"user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User Id"
},
"client_order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Order Id"
},
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Side"
},
"action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Action"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Type"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"yes_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price"
},
"no_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price"
},
"yes_price_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price Dollars"
},
"no_price_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price Dollars"
},
"fill_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Count"
},
"fill_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Count Fp"
},
"remaining_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count"
},
"remaining_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count Fp"
},
"initial_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Initial Count"
},
"initial_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Initial Count Fp"
},
"taker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees"
},
"maker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees"
},
"taker_fees_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees Dollars"
},
"maker_fees_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees Dollars"
},
"taker_fill_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Cost"
},
"maker_fill_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Cost"
},
"taker_fill_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Cost Dollars"
},
"maker_fill_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Cost Dollars"
},
"queue_position": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Queue Position"
},
"expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Time"
},
"created_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created Time"
},
"last_update_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Update Time"
},
"self_trade_prevention_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Self Trade Prevention Type"
},
"order_group_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Group Id"
},
"cancel_order_on_pause": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Cancel Order On Pause"
}
},
"title": "Order",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"order": {
"anyOf": [
{
"$ref": "#/$defs/Order"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "CreateOrderOutput",
"type": "object"
}
cancel_order — Cancel an existing order.
cancel_order — Cancel an existing order.
Parameters
Response
{
"$defs": {
"Order": {
"additionalProperties": false,
"description": "An order row (Trade API v2 portfolio order shape).",
"properties": {
"order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Id"
},
"user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User Id"
},
"client_order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Order Id"
},
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Side"
},
"action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Action"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Type"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"yes_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price"
},
"no_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price"
},
"yes_price_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price Dollars"
},
"no_price_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price Dollars"
},
"fill_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Count"
},
"fill_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fill Count Fp"
},
"remaining_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count"
},
"remaining_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count Fp"
},
"initial_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Initial Count"
},
"initial_count_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Initial Count Fp"
},
"taker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees"
},
"maker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees"
},
"taker_fees_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees Dollars"
},
"maker_fees_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees Dollars"
},
"taker_fill_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Cost"
},
"maker_fill_cost": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Cost"
},
"taker_fill_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Cost Dollars"
},
"maker_fill_cost_dollars": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Cost Dollars"
},
"queue_position": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Queue Position"
},
"expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Time"
},
"created_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created Time"
},
"last_update_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Update Time"
},
"self_trade_prevention_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Self Trade Prevention Type"
},
"order_group_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Group Id"
},
"cancel_order_on_pause": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Cancel Order On Pause"
}
},
"title": "Order",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"order": {
"anyOf": [
{
"$ref": "#/$defs/Order"
},
{
"type": "null"
}
],
"default": null
},
"reduced_by": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Reduced By"
},
"reduced_by_fp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reduced By Fp"
}
},
"required": [
"success"
],
"title": "CancelOrderOutput",
"type": "object"
}
amend_order — Modify the price or quantity of an existing order.
amend_order — Modify the price or quantity of an existing order.
Parameters
Response
{
"$defs": {
"AmendedOrder": {
"additionalProperties": false,
"description": "The order shape returned by the amend endpoint (old_order/order).",
"properties": {
"order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Id"
},
"user_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "User Id"
},
"ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Ticker"
},
"event_ticker": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Event Ticker"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Side"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Type"
},
"yes_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Yes Price"
},
"no_price": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "No Price"
},
"action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Action"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Count"
},
"remaining_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Remaining Count"
},
"created_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created Time"
},
"expiration_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expiration Time"
},
"order_group_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Order Group Id"
},
"client_order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Client Order Id"
},
"place_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Place Count"
},
"decrease_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Decrease Count"
},
"queue_position": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Queue Position"
},
"maker_fill_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fill Count"
},
"taker_fill_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fill Count"
},
"maker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Maker Fees"
},
"taker_fees": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Taker Fees"
},
"last_update_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Update Time"
},
"take_profit_order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Take Profit Order Id"
},
"stop_loss_order_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Stop Loss Order Id"
},
"amend_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Amend Count"
},
"amend_taker_fill_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Amend Taker Fill Count"
}
},
"title": "AmendedOrder",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"old_order": {
"anyOf": [
{
"$ref": "#/$defs/AmendedOrder"
},
{
"type": "null"
}
],
"default": null
},
"order": {
"anyOf": [
{
"$ref": "#/$defs/AmendedOrder"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"success"
],
"title": "AmendOrderOutput",
"type": "object"
}
Limits & Quotas
- Base URL:
https://api.elections.kalshi.com/trade-api/v2. - Pricing: prices and counts are returned in cents (and as
fixed-point
_fp/ dollar string variants where the API provides them). - Rate limits: Kalshi enforces per-tier request rate limits; consult the official docs for current values. Authenticated portfolio and trading calls are signed per request, so clock skew on the host can cause signature rejections — keep the system clock in sync.
- Error model: non-2xx responses, timeouts, invalid private keys,
and unexpected exceptions are caught and returned as
success=False+errorrather than raising. On failure the data fields stay at their defaults.