openapi: 3.0.0 info: title: Kalshi Trade API Manual Endpoints account orders API version: 3.19.0 description: Manually defined OpenAPI spec for endpoints being migrated to spec-first approach servers: - url: https://external-api.kalshi.com/trade-api/v2 description: Production Trade API server - url: https://api.elections.kalshi.com/trade-api/v2 description: Production shared API server, also supported - url: https://external-api.demo.kalshi.co/trade-api/v2 description: Demo Trade API server - url: https://demo-api.kalshi.co/trade-api/v2 description: Demo shared API server, also supported tags: - name: orders description: Order management endpoints paths: /portfolio/orders: get: operationId: GetOrders summary: Get Orders description: 'Restricts the response to orders that have a certain status: resting, canceled, or executed. Orders that have been canceled or fully executed before the historical cutoff are only available via `GET /historical/orders`. Resting orders will always be available through this endpoint. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details. ' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/TickerQuery' - $ref: '#/components/parameters/MultipleEventTickerQuery' - $ref: '#/components/parameters/MinTsQuery' - $ref: '#/components/parameters/MaxTsQuery' - $ref: '#/components/parameters/StatusQuery' - $ref: '#/components/parameters/LimitQuery' - $ref: '#/components/parameters/CursorQuery' - $ref: '#/components/parameters/SubaccountQuery' responses: '200': description: Orders retrieved successfully content: application/json: schema: $ref: '#/components/schemas/GetOrdersResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '500': $ref: '#/components/responses/InternalServerError' post: operationId: CreateOrder summary: Create Order description: ' Endpoint for submitting orders in a market. Each user is limited to 200 000 open orders at a time.' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateOrderRequest' responses: '201': description: Order created successfully content: application/json: schema: $ref: '#/components/schemas/CreateOrderResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '409': $ref: '#/components/responses/ConflictError' '429': $ref: '#/components/responses/RateLimitError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/orders/{order_id}: get: operationId: GetOrder summary: Get Order description: ' Endpoint for getting a single order.' x-mint: content: ' **Rate limit:** 2 tokens per request. Other endpoints use the default cost of 10 tokens per request unless noted on their own page. See [Rate Limits and Tiers](/getting_started/rate_limits). ' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/OrderIdPath' responses: '200': description: Order retrieved successfully content: application/json: schema: $ref: '#/components/schemas/GetOrderResponse' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '500': $ref: '#/components/responses/InternalServerError' delete: operationId: CancelOrder summary: Cancel Order description: ' Endpoint for canceling orders. The value for the orderId should match the id field of the order you want to decrease. Commonly, DELETE-type endpoints return 204 status with no body content on success. But we can''t completely delete the order, as it may be partially filled already. Instead, the DeleteOrder endpoint reduce the order completely, essentially zeroing the remaining resting contracts on it. The zeroed order is returned on the response payload as a form of validation for the client.' x-mint: content: ' **Rate limit:** 2 tokens per request. Other endpoints use the default cost of 10 tokens per request unless noted on their own page. See [Rate Limits and Tiers](/getting_started/rate_limits). ' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/OrderIdPath' - $ref: '#/components/parameters/SubaccountQueryDefaultPrimary' - $ref: '#/components/parameters/ExchangeIndexQuery' responses: '200': description: Order cancelled successfully content: application/json: schema: $ref: '#/components/schemas/CancelOrderResponse' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/orders/batched: post: operationId: BatchCreateOrders summary: Batch Create Orders description: Endpoint for submitting a batch of orders. The maximum batch size scales with your tier's write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). x-mint: content: ' **Rate limit:** 10 tokens per order in the batch — billed per item, so total cost for a batch of N orders is N × 10. Other endpoints cost 10 tokens per request (not per item) unless noted on their own page. See [Rate Limits and Tiers](/getting_started/rate_limits). ' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchCreateOrdersRequest' responses: '201': description: Batch order creation completed content: application/json: schema: $ref: '#/components/schemas/BatchCreateOrdersResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '500': $ref: '#/components/responses/InternalServerError' delete: operationId: BatchCancelOrders summary: Batch Cancel Orders description: Endpoint for cancelling a batch of orders. The maximum batch size scales with your tier's write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). x-mint: content: ' **Rate limit:** 2 tokens per order in the batch — billed per item, so total cost for a batch of N cancels is N × 2. Other endpoints cost 10 tokens per request unless noted on their own page. See [Rate Limits and Tiers](/getting_started/rate_limits). ' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchCancelOrdersRequest' responses: '200': description: Batch order cancellation completed content: application/json: schema: $ref: '#/components/schemas/BatchCancelOrdersResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/orders/{order_id}/amend: post: operationId: AmendOrder summary: Amend Order description: ' Endpoint for amending the max number of fillable contracts and/or price in an existing order. Max fillable contracts is `remaining_count` + `fill_count`.' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/OrderIdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AmendOrderRequest' responses: '200': description: Order amended successfully content: application/json: schema: $ref: '#/components/schemas/AmendOrderResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/orders/{order_id}/decrease: post: operationId: DecreaseOrder summary: Decrease Order description: ' Endpoint for decreasing the number of contracts in an existing order. This is the only kind of edit available on order quantity. Cancelling an order is equivalent to decreasing an order amount to zero.' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/OrderIdPath' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DecreaseOrderRequest' responses: '200': description: Order decreased successfully content: application/json: schema: $ref: '#/components/schemas/DecreaseOrderResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/orders/queue_positions: get: operationId: GetOrderQueuePositions summary: Get Queue Positions for Orders description: ' Endpoint for getting queue positions for all resting orders. Queue position represents the number of contracts that need to be matched before an order receives a partial or full match, determined using price-time priority.' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - name: market_tickers in: query description: Comma-separated list of market tickers to filter by schema: type: string - name: event_ticker in: query description: Event ticker to filter by schema: type: string - $ref: '#/components/parameters/SubaccountQueryDefaultPrimary' responses: '200': description: Queue positions retrieved successfully content: application/json: schema: $ref: '#/components/schemas/GetOrderQueuePositionsResponse' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/orders/{order_id}/queue_position: get: operationId: GetOrderQueuePosition summary: Get Order Queue Position description: ' Endpoint for getting an order''s queue position in the order book. This represents the amount of orders that need to be matched before this order receives a partial or full match. Queue position is determined using a price-time priority.' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/OrderIdPath' responses: '200': description: Queue position retrieved successfully content: application/json: schema: $ref: '#/components/schemas/GetOrderQueuePositionResponse' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/events/orders: post: operationId: CreateOrderV2 summary: Create Order (V2) description: Endpoint for submitting event-market orders using the V2 request/response shape (single-book `bid`/`ask` side and fixed-point dollar prices). The legacy `/portfolio/orders` endpoint will be deprecated no earlier than May 6, 2026 — clients should migrate to this path. tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateOrderV2Request' responses: '201': description: Order created successfully content: application/json: schema: $ref: '#/components/schemas/CreateOrderV2Response' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '409': $ref: '#/components/responses/ConflictError' '429': $ref: '#/components/responses/RateLimitError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/events/orders/batched: post: operationId: BatchCreateOrdersV2 summary: Batch Create Orders (V2) description: Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size scales with your tier's write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). x-mint: content: ' **Rate limit:** 10 tokens per order in the batch — billed per item, so total cost for a batch of N orders is N × 10. Other endpoints cost 10 tokens per request (not per item) unless noted on their own page. See [Rate Limits and Tiers](/getting_started/rate_limits). ' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchCreateOrdersV2Request' responses: '201': description: Batch order creation completed content: application/json: schema: $ref: '#/components/schemas/BatchCreateOrdersV2Response' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '500': $ref: '#/components/responses/InternalServerError' delete: operationId: BatchCancelOrdersV2 summary: Batch Cancel Orders (V2) description: Endpoint for cancelling a batch of event-market orders using the V2 response shape. The maximum batch size scales with your tier's write budget — see [Rate Limits and Tiers](/getting_started/rate_limits). x-mint: content: ' **Rate limit:** 2 tokens per order in the batch — billed per item, so total cost for a batch of N cancels is N × 2. Other endpoints cost 10 tokens per request unless noted on their own page. See [Rate Limits and Tiers](/getting_started/rate_limits). ' tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BatchCancelOrdersV2Request' responses: '200': description: Batch order cancellation completed content: application/json: schema: $ref: '#/components/schemas/BatchCancelOrdersV2Response' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/events/orders/{order_id}: delete: operationId: CancelOrderV2 summary: Cancel Order (V2) description: Endpoint for cancelling event-market orders using the V2 response shape. Returns `{order_id, client_order_id, reduced_by}` rather than a full order object. tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/OrderIdPath' - $ref: '#/components/parameters/SubaccountQueryDefaultPrimary' - $ref: '#/components/parameters/ExchangeIndexQuery' responses: '200': description: Order cancelled successfully content: application/json: schema: $ref: '#/components/schemas/CancelOrderV2Response' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/events/orders/{order_id}/amend: post: operationId: AmendOrderV2 summary: Amend Order (V2) description: Endpoint for amending the price and/or max fillable count of an existing event-market order using the V2 request/response shape. The request `count` is the updated total/max fillable count, equal to already filled count plus desired resting remaining count. This behavior matches the v1 amend endpoints; only the request/response shape differs. tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/OrderIdPath' - $ref: '#/components/parameters/SubaccountQueryDefaultPrimary' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AmendOrderV2Request' responses: '200': description: Order amended successfully content: application/json: schema: $ref: '#/components/schemas/AmendOrderV2Response' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '500': $ref: '#/components/responses/InternalServerError' /portfolio/events/orders/{order_id}/decrease: post: operationId: DecreaseOrderV2 summary: Decrease Order (V2) description: Endpoint for decreasing the remaining count of an existing event-market order using the V2 request/response shape. Exactly one of `reduce_by` or `reduce_to` must be provided. tags: - orders security: - kalshiAccessKey: [] kalshiAccessSignature: [] kalshiAccessTimestamp: [] parameters: - $ref: '#/components/parameters/OrderIdPath' - $ref: '#/components/parameters/SubaccountQueryDefaultPrimary' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DecreaseOrderV2Request' responses: '200': description: Order decreased successfully content: application/json: schema: $ref: '#/components/schemas/DecreaseOrderV2Response' '400': $ref: '#/components/responses/BadRequestError' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '500': $ref: '#/components/responses/InternalServerError' components: schemas: GetOrderQueuePositionResponse: type: object required: - queue_position_fp properties: queue_position_fp: $ref: '#/components/schemas/FixedPointCount' description: The number of preceding shares before the order in the queue. AmendOrderRequest: type: object required: - ticker - side - action properties: subaccount: type: integer minimum: 0 description: Optional subaccount number to use for this amendment (0 for primary, 1-32 for subaccounts) default: 0 x-go-type-skip-optional-pointer: true ticker: type: string description: Market ticker side: type: string enum: - 'yes' - 'no' description: Side of the order action: type: string enum: - buy - sell description: Action of the order client_order_id: type: string description: The original client-specified order ID to be amended x-go-type-skip-optional-pointer: true updated_client_order_id: type: string description: The new client-specified order ID after amendment x-go-type-skip-optional-pointer: true yes_price: type: integer minimum: 1 maximum: 99 description: Updated yes price for the order in cents no_price: type: integer minimum: 1 maximum: 99 description: Updated no price for the order in cents yes_price_dollars: $ref: '#/components/schemas/FixedPointDollars' description: Updated yes price for the order in fixed-point dollars. Exactly one of yes_price, no_price, yes_price_dollars, and no_price_dollars must be passed. no_price_dollars: $ref: '#/components/schemas/FixedPointDollars' description: Updated no price for the order in fixed-point dollars. Exactly one of yes_price, no_price, yes_price_dollars, and no_price_dollars must be passed. count: type: integer minimum: 1 description: Updated quantity for the order (whole contracts only). If updating quantity, provide count or count_fp; if both provided they must match. count_fp: $ref: '#/components/schemas/FixedPointCount' nullable: true description: String representation of the updated quantity for the order. If updating quantity, provide count or count_fp; if both provided they must match. exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' default: 0 x-go-type-skip-optional-pointer: true CreateOrderV2Request: type: object required: - ticker - client_order_id - side - count - price - time_in_force - self_trade_prevention_type properties: ticker: type: string x-oapi-codegen-extra-tags: validate: required,min=1 client_order_id: type: string x-go-type-skip-optional-pointer: true side: $ref: '#/components/schemas/BookSide' x-oapi-codegen-extra-tags: validate: required,oneof=bid ask count: $ref: '#/components/schemas/FixedPointCount' description: String representation of the order quantity in contracts. price: $ref: '#/components/schemas/FixedPointDollars' description: Price for the order in fixed-point dollars. x-go-type-skip-optional-pointer: true expiration_time: type: integer format: int64 description: 'Optional Unix timestamp in seconds for when the order expires. To place an expiring order, set `time_in_force` to `good_till_canceled` and provide this `expiration_time`. `GTT` is an internal execution type and is not a valid API value for `time_in_force`. The `immediate_or_cancel` time-in-force value cannot be combined with `expiration_time`. ' time_in_force: type: string description: 'Specifies how long the order remains active. Use `good_till_canceled` with `expiration_time` for an order that should rest until a specific expiration time; without `expiration_time`, `good_till_canceled` is a true good-till-canceled order. `GTT` is not a valid API value. ' enum: - fill_or_kill - good_till_canceled - immediate_or_cancel x-oapi-codegen-extra-tags: validate: required,oneof=fill_or_kill good_till_canceled immediate_or_cancel x-go-type-skip-optional-pointer: true post_only: type: boolean self_trade_prevention_type: allOf: - $ref: '#/components/schemas/SelfTradePreventionType' x-oapi-codegen-extra-tags: validate: required,oneof=taker_at_cross maker x-go-type-skip-optional-pointer: true cancel_order_on_pause: type: boolean description: 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. reduce_only: type: boolean description: Specifies whether the order place count should be capped by the member's current position. subaccount: type: integer minimum: 0 default: 0 description: The subaccount number to use for this order. 0 is the primary subaccount. x-go-type-skip-optional-pointer: true order_group_id: type: string description: The order group this order is part of x-go-type-skip-optional-pointer: true exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' default: 0 x-go-type-skip-optional-pointer: true DecreaseOrderV2Response: type: object required: - order_id - remaining_count - ts_ms properties: order_id: type: string client_order_id: type: string remaining_count: $ref: '#/components/schemas/FixedPointCount' description: Number of contracts remaining after the decrease. ts_ms: type: integer format: int64 description: Matching engine timestamp at which the decrease was processed, as Unix epoch milliseconds. CancelOrderResponse: type: object required: - order - reduced_by_fp properties: order: $ref: '#/components/schemas/Order' reduced_by_fp: $ref: '#/components/schemas/FixedPointCount' description: String representation of the number of contracts that were successfully canceled from this order AmendOrderV2Response: type: object required: - order_id - ts_ms properties: order_id: type: string client_order_id: type: string remaining_count: $ref: '#/components/schemas/FixedPointCount' nullable: true x-omitempty: false description: Number of resting contracts remaining after the amend. This is the actual post-amend resting quantity, not the request's total/max fillable count. Only present when the amend caused a fill or changed the resting size. fill_count: $ref: '#/components/schemas/FixedPointCount' nullable: true x-omitempty: false description: Number of contracts filled as a result of the amend crossing the book. Only present when fills occurred or remaining size changed. average_fill_price: $ref: '#/components/schemas/FixedPointDollars' nullable: true x-omitempty: false description: Volume-weighted average fill price for fills resulting from the amend. Only present when fills occurred. average_fee_paid: $ref: '#/components/schemas/FixedPointDollars' nullable: true x-omitempty: false description: Volume-weighted average fee paid per contract for fills resulting from the amend. Only present when fills occurred. ts_ms: type: integer format: int64 description: Matching engine timestamp at which the amend was processed, as Unix epoch milliseconds. OrderQueuePosition: type: object required: - order_id - market_ticker - queue_position_fp properties: order_id: type: string description: The order ID market_ticker: type: string description: The market ticker queue_position_fp: $ref: '#/components/schemas/FixedPointCount' description: The number of preceding shares before the order in the queue. CancelOrderV2Response: type: object required: - order_id - reduced_by - ts_ms properties: order_id: type: string client_order_id: type: string reduced_by: $ref: '#/components/schemas/FixedPointCount' description: Number of contracts that were canceled (i.e. the remaining count at time of cancellation). ts_ms: type: integer format: int64 description: Matching engine timestamp at which the cancellation was processed, as Unix epoch milliseconds. BatchCancelOrdersRequestOrder: type: object required: - order_id properties: order_id: type: string description: Order ID to cancel subaccount: type: integer minimum: 0 default: 0 description: Optional subaccount number to use for this cancellation (0 for primary, 1-32 for subaccounts) x-go-type-skip-optional-pointer: true exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' default: 0 x-go-type-skip-optional-pointer: true BatchCreateOrdersResponse: type: object required: - orders properties: orders: type: array items: $ref: '#/components/schemas/BatchCreateOrdersIndividualResponse' DecreaseOrderRequest: type: object properties: subaccount: type: integer minimum: 0 description: Optional subaccount number to use for this decrease (0 for primary, 1-32 for subaccounts) default: 0 x-go-type-skip-optional-pointer: true reduce_by: type: integer minimum: 1 description: Number of contracts to reduce by (whole contracts only). Reduce-by may be provided via reduce_by or reduce_by_fp; if both provided they must match. Exactly one of reduce_by(/reduce_by_fp) or reduce_to(/reduce_to_fp) must be provided. reduce_by_fp: $ref: '#/components/schemas/FixedPointCount' nullable: true description: String representation of the number of contracts to reduce by. Reduce-by may be provided via reduce_by or reduce_by_fp; if both provided they must match. Exactly one of reduce_by(/reduce_by_fp) or reduce_to(/reduce_to_fp) must be provided. reduce_to: type: integer minimum: 0 description: Number of contracts to reduce to (whole contracts only). Reduce-to may be provided via reduce_to or reduce_to_fp; if both provided they must match. Exactly one of reduce_by(/reduce_by_fp) or reduce_to(/reduce_to_fp) must be provided. reduce_to_fp: $ref: '#/components/schemas/FixedPointCount' nullable: true description: String representation of the number of contracts to reduce to. Reduce-to may be provided via reduce_to or reduce_to_fp; if both provided they must match. Exactly one of reduce_by(/reduce_by_fp) or reduce_to(/reduce_to_fp) must be provided. exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' default: 0 x-go-type-skip-optional-pointer: true GetOrderResponse: type: object required: - order properties: order: $ref: '#/components/schemas/Order' GetOrdersResponse: type: object required: - orders - cursor properties: orders: type: array items: $ref: '#/components/schemas/Order' cursor: type: string SelfTradePreventionType: type: string enum: - taker_at_cross - maker description: 'The self-trade prevention type for orders. `taker_at_cross` cancels the taker order when it would trade against another order from the same user; execution stops and any partial fills already matched are executed. `maker` cancels the resting maker order and continues matching. ' ExchangeIndex: type: integer description: 'Identifier for an exchange shard. Defaults to 0 if unspecified. Note: currently only 0 supported.' example: 0 ErrorResponse: type: object properties: code: type: string description: Error code message: type: string description: Human-readable error message details: type: string description: Additional details about the error, if available service: type: string description: The name of the service that generated the error Order: type: object required: - order_id - user_id - client_order_id - ticker - side - action - outcome_side - book_side - type - status - yes_price_dollars - no_price_dollars - fill_count_fp - remaining_count_fp - initial_count_fp - taker_fees_dollars - maker_fees_dollars - taker_fill_cost_dollars - maker_fill_cost_dollars properties: order_id: type: string user_id: type: string description: Unique identifier for users client_order_id: type: string ticker: type: string side: type: string enum: - 'yes' - 'no' deprecated: true description: 'Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order direction](/getting_started/order_direction). This field will not be removed before May 14, 2026. ' action: type: string enum: - buy - sell deprecated: true description: 'Deprecated. Use `outcome_side` (or `book_side`) instead. See [Order direction](/getting_started/order_direction). This field will not be removed before May 14, 2026. ' outcome_side: type: string enum: - 'yes' - 'no' description: 'The outcome side this order is positioned for. buy-yes and sell-no produce ''yes''; buy-no and sell-yes produce ''no''. `outcome_side` describes directional exposure only; it does not change the order''s price. An order at price `p` with `outcome_side=no` is matched by an order at the same price `p` with `outcome_side=yes` — both parties trade at the same price, just on opposite directions. `outcome_side` and `book_side` will become the canonical way to determine order direction. The legacy `action`, `side`, and `is_yes` fields will be deprecated in a future release — please migrate to these new fields. ' book_side: $ref: '#/components/schemas/BookSide' description: 'Same directional bit as outcome_side in book vocabulary. ''bid'' is equivalent to outcome_side ''yes''; ''ask'' is equivalent to outcome_side ''no''. `outcome_side` and `book_side` will become the canonical way to determine order direction. The legacy `action`, `side`, and `is_yes` fields will be deprecated in a future release — please migrate to these new fields. ' type: type: string enum: - limit - market status: $ref: '#/components/schemas/OrderStatus' yes_price_dollars: $ref: '#/components/schemas/FixedPointDollars' description: The yes price for this order in fixed-point dollars no_price_dollars: $ref: '#/components/schemas/FixedPointDollars' description: The no price for this order in fixed-point dollars fill_count_fp: $ref: '#/components/schemas/FixedPointCount' description: String representation of the number of contracts that have been filled remaining_count_fp: $ref: '#/components/schemas/FixedPointCount' description: String representation of the remaining contracts for this order initial_count_fp: $ref: '#/components/schemas/FixedPointCount' description: String representation of the initial size of the order (contract units) taker_fill_cost_dollars: $ref: '#/components/schemas/FixedPointDollars' description: The cost of filled taker orders in dollars maker_fill_cost_dollars: $ref: '#/components/schemas/FixedPointDollars' description: The cost of filled maker orders in dollars taker_fees_dollars: $ref: '#/components/schemas/FixedPointDollars' description: Fees paid on filled taker contracts, in dollars maker_fees_dollars: $ref: '#/components/schemas/FixedPointDollars' description: Fees paid on filled maker contracts, in dollars expiration_time: type: string format: date-time nullable: true created_time: type: string format: date-time nullable: true x-omitempty: false last_update_time: type: string format: date-time nullable: true x-omitempty: true description: The last update to an order (modify, cancel, fill) self_trade_prevention_type: $ref: '#/components/schemas/SelfTradePreventionType' nullable: true x-omitempty: false order_group_id: type: string nullable: true description: The order group this order is part of cancel_order_on_pause: type: boolean description: 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. subaccount_number: type: integer nullable: true x-omitempty: true description: Subaccount number (0 for primary, 1-32 for subaccounts). exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' x-go-type-skip-optional-pointer: true CreateOrderRequest: type: object required: - ticker - side - action properties: ticker: type: string x-oapi-codegen-extra-tags: validate: required,min=1 client_order_id: type: string x-go-type-skip-optional-pointer: true side: type: string enum: - 'yes' - 'no' x-oapi-codegen-extra-tags: validate: required,oneof=yes no action: type: string enum: - buy - sell x-oapi-codegen-extra-tags: validate: required,oneof=buy sell count: type: integer minimum: 1 description: Order quantity in contracts (whole contracts only). Provide count or count_fp; if both provided they must match. x-go-type-skip-optional-pointer: true x-oapi-codegen-extra-tags: validate: omitempty,gte=1 count_fp: $ref: '#/components/schemas/FixedPointCount' nullable: true description: String representation of the order quantity in contracts. Provide count or count_fp; if both provided they must match. yes_price: type: integer minimum: 1 maximum: 99 x-go-type-skip-optional-pointer: true no_price: type: integer minimum: 1 maximum: 99 x-go-type-skip-optional-pointer: true yes_price_dollars: $ref: '#/components/schemas/FixedPointDollars' description: Submitting price of the Yes side in fixed-point dollars no_price_dollars: $ref: '#/components/schemas/FixedPointDollars' description: Submitting price of the No side in fixed-point dollars expiration_ts: type: integer format: int64 description: 'Optional Unix timestamp in seconds for when the order expires. To place an expiring order, set `time_in_force` to `good_till_canceled` and provide this `expiration_ts`. `GTT` is an internal execution type and is not a valid API value for `time_in_force`. The `immediate_or_cancel` time-in-force value cannot be combined with `expiration_ts`. ' time_in_force: type: string description: 'Specifies how long the order remains active. Use `good_till_canceled` with `expiration_ts` for an order that should rest until a specific expiration time; without `expiration_ts`, `good_till_canceled` is a true good-till-canceled order. `GTT` is not a valid API value. ' enum: - fill_or_kill - good_till_canceled - immediate_or_cancel x-oapi-codegen-extra-tags: validate: omitempty,oneof=fill_or_kill good_till_canceled immediate_or_cancel x-go-type-skip-optional-pointer: true buy_max_cost: type: integer description: Maximum cost in cents. When specified, the order will automatically have Fill-or-Kill (FoK) behavior. post_only: type: boolean reduce_only: type: boolean sell_position_floor: type: integer description: 'Deprecated: Use reduce_only instead. Only accepts value of 0.' self_trade_prevention_type: allOf: - $ref: '#/components/schemas/SelfTradePreventionType' x-oapi-codegen-extra-tags: validate: omitempty,oneof=taker_at_cross maker x-go-type-skip-optional-pointer: true order_group_id: type: string description: The order group this order is part of x-go-type-skip-optional-pointer: true cancel_order_on_pause: type: boolean description: 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. subaccount: type: integer minimum: 0 default: 0 description: The subaccount number to use for this order. 0 is the primary subaccount. x-go-type-skip-optional-pointer: true exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' default: 0 x-go-type-skip-optional-pointer: true BatchCreateOrdersIndividualResponse: type: object properties: client_order_id: type: string nullable: true order: allOf: - $ref: '#/components/schemas/Order' nullable: true error: allOf: - $ref: '#/components/schemas/ErrorResponse' nullable: true BatchCancelOrdersRequest: type: object properties: ids: type: array items: type: string description: An array of order IDs to cancel deprecated: true orders: type: array items: $ref: '#/components/schemas/BatchCancelOrdersRequestOrder' description: An array of orders to cancel, each optionally specifying a subaccount FixedPointCount: type: string description: Fixed-point contract count string (2 decimals, e.g., "10.00"; referred to as "fp" in field names). Requests accept 0–2 decimal places (e.g., "10", "10.0", "10.00"); responses always emit 2 decimals. Fractional contract values (e.g., "2.50") are supported on markets with fractional trading enabled; the minimum granularity is 0.01 contracts. Integer contract count fields are legacy and will be deprecated; when both integer and fp fields are provided, they must match. example: '10.00' CreateOrderV2Response: type: object required: - order_id - fill_count - remaining_count - ts_ms properties: order_id: type: string client_order_id: type: string fill_count: $ref: '#/components/schemas/FixedPointCount' description: Number of contracts filled immediately upon placement. remaining_count: $ref: '#/components/schemas/FixedPointCount' description: Number of contracts remaining after placement. For IOC orders, this reflects the final state after unfilled contracts are canceled. average_fill_price: $ref: '#/components/schemas/FixedPointDollars' description: Volume-weighted average fill price. Only present when fill_count > 0. average_fee_paid: $ref: '#/components/schemas/FixedPointDollars' description: Volume-weighted average fee paid per contract for fills resulting from this request. Only present when fill_count > 0. ts_ms: type: integer format: int64 description: Matching engine timestamp at which the order was processed, as Unix epoch milliseconds. OrderStatus: type: string enum: - resting - canceled - executed description: The status of an order BatchCreateOrdersV2Response: type: object required: - orders properties: orders: type: array items: type: object properties: order_id: type: string client_order_id: type: string nullable: true fill_count: $ref: '#/components/schemas/FixedPointCount' nullable: true x-omitempty: false description: Number of contracts filled immediately upon placement. remaining_count: $ref: '#/components/schemas/FixedPointCount' nullable: true x-omitempty: false description: Number of contracts remaining after placement. average_fill_price: $ref: '#/components/schemas/FixedPointDollars' nullable: true x-omitempty: false description: Volume-weighted average fill price. Only present when fill_count > 0. average_fee_paid: $ref: '#/components/schemas/FixedPointDollars' nullable: true x-omitempty: false description: Volume-weighted average fee paid per contract. Only present when fill_count > 0. ts_ms: type: integer format: int64 nullable: true x-omitempty: false description: Matching engine timestamp at which the order was processed, as Unix epoch milliseconds. Absent when the request errored. error: allOf: - $ref: '#/components/schemas/ErrorResponse' nullable: true BatchCancelOrdersV2Response: type: object required: - orders properties: orders: type: array items: type: object required: - order_id - reduced_by properties: order_id: type: string description: The order ID identifying which order this entry corresponds to. client_order_id: type: string nullable: true reduced_by: $ref: '#/components/schemas/FixedPointCount' description: Number of contracts that were canceled (i.e. the remaining count at time of cancellation). Zero if the cancel errored. ts_ms: type: integer format: int64 nullable: true x-omitempty: false description: Matching engine timestamp at which the cancellation was processed, as Unix epoch milliseconds. Absent when the cancel errored. error: allOf: - $ref: '#/components/schemas/ErrorResponse' nullable: true DecreaseOrderV2Request: type: object properties: reduce_by: $ref: '#/components/schemas/FixedPointCount' nullable: true description: String representation of the number of contracts to reduce by. Exactly one of `reduce_by` or `reduce_to` must be provided. reduce_to: $ref: '#/components/schemas/FixedPointCount' nullable: true description: String representation of the number of contracts to reduce to. Exactly one of `reduce_by` or `reduce_to` must be provided. exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' default: 0 x-go-type-skip-optional-pointer: true DecreaseOrderResponse: type: object required: - order properties: order: $ref: '#/components/schemas/Order' BookSide: type: string enum: - bid - ask description: 'Side of the book for an order or trade. For event markets, this refers to the YES leg only: `bid` means buy YES, `ask` means sell YES. (Selling YES is economically equivalent to buying NO at `1 - price`, but this endpoint quotes everything from the YES side.)' BatchCancelOrdersIndividualResponse: type: object required: - order_id - reduced_by_fp properties: order_id: type: string description: The order ID to identify which order had an error during batch cancellation order: allOf: - $ref: '#/components/schemas/Order' nullable: true reduced_by_fp: $ref: '#/components/schemas/FixedPointCount' description: String representation of the number of contracts that were successfully canceled from this order error: allOf: - $ref: '#/components/schemas/ErrorResponse' nullable: true BatchCreateOrdersV2Request: type: object required: - orders properties: orders: type: array x-oapi-codegen-extra-tags: validate: required,dive items: $ref: '#/components/schemas/CreateOrderV2Request' AmendOrderV2Request: type: object required: - ticker - side - price - count properties: ticker: type: string description: Market ticker x-oapi-codegen-extra-tags: validate: required,min=1 side: $ref: '#/components/schemas/BookSide' description: Side of the order x-oapi-codegen-extra-tags: validate: required,oneof=bid ask price: $ref: '#/components/schemas/FixedPointDollars' description: Updated price for the order in fixed-point dollars. x-go-type-skip-optional-pointer: true count: $ref: '#/components/schemas/FixedPointCount' description: Updated total/max fillable count for the order. Set this to the order's already filled count plus the desired resting remaining count after the amend. x-go-type-skip-optional-pointer: true client_order_id: type: string description: The original client-specified order ID to be amended x-go-type-skip-optional-pointer: true updated_client_order_id: type: string description: The new client-specified order ID after amendment x-go-type-skip-optional-pointer: true exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' default: 0 x-go-type-skip-optional-pointer: true FixedPointDollars: type: string description: US dollar amount as a fixed-point decimal string with up to 6 decimal places of precision. This is the maximum supported precision; valid quote intervals for a given market are constrained by that market's price level structure. example: '0.5600' BatchCancelOrdersResponse: type: object required: - orders properties: orders: type: array items: $ref: '#/components/schemas/BatchCancelOrdersIndividualResponse' BatchCancelOrdersV2Request: type: object required: - orders properties: orders: type: array x-oapi-codegen-extra-tags: validate: required,dive description: An array of orders to cancel, each optionally specifying a subaccount. items: type: object required: - order_id properties: order_id: type: string description: Order ID to cancel. subaccount: type: integer minimum: 0 default: 0 description: Optional subaccount number to use for this cancellation (0 for primary, 1-32 for subaccounts). x-go-type-skip-optional-pointer: true exchange_index: allOf: - $ref: '#/components/schemas/ExchangeIndex' default: 0 x-go-type-skip-optional-pointer: true GetOrderQueuePositionsResponse: type: object required: - queue_positions properties: queue_positions: type: array description: Queue positions for all matching orders items: $ref: '#/components/schemas/OrderQueuePosition' AmendOrderResponse: type: object required: - old_order - order properties: old_order: $ref: '#/components/schemas/Order' description: The order before amendment order: $ref: '#/components/schemas/Order' description: The order after amendment CreateOrderResponse: type: object required: - order properties: order: $ref: '#/components/schemas/Order' BatchCreateOrdersRequest: type: object required: - orders properties: orders: type: array x-oapi-codegen-extra-tags: validate: required,dive items: $ref: '#/components/schemas/CreateOrderRequest' responses: InternalServerError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' UnauthorizedError: description: Unauthorized - authentication required content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' NotFoundError: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' ForbiddenError: description: Forbidden - insufficient permissions content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' RateLimitError: description: Rate limit exceeded. The default cost is 10 tokens per request; endpoints that deviate show a **Rate limit** callout at the top of their own page. See [Rate Limits and Tiers](/getting_started/rate_limits). content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' BadRequestError: description: Bad request - invalid input content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' ConflictError: description: Conflict - resource already exists or cannot be modified content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' parameters: MinTsQuery: name: min_ts in: query description: Filter items after this Unix timestamp schema: type: integer format: int64 TickerQuery: name: ticker in: query description: Filter by market ticker schema: type: string x-go-type-skip-optional-pointer: true MaxTsQuery: name: max_ts in: query description: Filter items before this Unix timestamp schema: type: integer format: int64 SubaccountQuery: name: subaccount in: query description: Subaccount number (0 for primary, 1-32 for subaccounts). If omitted, defaults to all subaccounts. schema: type: integer CursorQuery: name: cursor in: query description: Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. schema: type: string x-go-type-skip-optional-pointer: true SubaccountQueryDefaultPrimary: name: subaccount in: query description: Subaccount number (0 for primary, 1-32 for subaccounts). Defaults to 0. schema: type: integer LimitQuery: name: limit in: query description: Number of results per page. Defaults to 100. schema: type: integer format: int64 minimum: 1 maximum: 1000 default: 100 x-oapi-codegen-extra-tags: validate: omitempty,min=1,max=1000 OrderIdPath: name: order_id in: path required: true description: Order ID schema: type: string StatusQuery: name: status in: query description: Filter by status. Possible values depend on the endpoint. schema: type: string MultipleEventTickerQuery: name: event_ticker in: query description: Event tickers to filter by, as a comma-separated list (maximum 10). schema: type: string x-go-type-skip-optional-pointer: true ExchangeIndexQuery: name: exchange_index in: query schema: $ref: '#/components/schemas/ExchangeIndex' x-go-type-skip-optional-pointer: true securitySchemes: kalshiAccessKey: type: apiKey in: header name: KALSHI-ACCESS-KEY description: Your API key ID kalshiAccessSignature: type: apiKey in: header name: KALSHI-ACCESS-SIGNATURE description: RSA-PSS signature of the request kalshiAccessTimestamp: type: apiKey in: header name: KALSHI-ACCESS-TIMESTAMP description: Request timestamp in milliseconds