Kalshi orders API

Order management endpoints

OpenAPI Specification

kalshi-orders-api-openapi.yml Raw ↑
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: '<Note>

          **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).

          </Note>

          '
      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: '<Note>

          **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).

          </Note>

          '
      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: '<Note>

          **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).

          </Note>

          '
      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: '<Note>

          **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).

          </Note>

          '
      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: '<Note>

          **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).

          </Note>

          '
      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: '<Note>

          **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).

          </Note>

          '
      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:

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/kalshi/refs/heads/main/openapi/kalshi-orders-api-openapi.yml