> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parlayx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit Order

> Places a limit order on a Kalshi market and returns the issued order id.



## OpenAPI

````yaml /openapi/v1.json post /v1/kalshi/orders
openapi: 3.0.0
info:
  title: ParlayX API
  version: 1.0.0
  description: Aggregated prediction-market trading API
servers:
  - url: https://api.parlayx.com
security: []
tags:
  - name: Authentication
    description: Confirm your signing and read the server clock.
  - name: Discovery
    description: Browse sports, competitions, events, and markets.
  - name: Polymarket
    description: Submit and manage orders on Polymarket outcomes.
  - name: Kalshi
    description: Submit and manage orders on Kalshi markets.
paths:
  /v1/kalshi/orders:
    post:
      tags:
        - Kalshi
      summary: Submit Order
      description: Places a limit order on a Kalshi market and returns the issued order id.
      operationId: submitKalshiOrder
      parameters:
        - name: PX-Key-Id
          in: header
          required: true
          schema:
            type: string
          description: The key id issued for your signing keypair.
        - name: PX-Timestamp
          in: header
          required: true
          schema:
            type: string
          description: >-
            Unix seconds at signing, valid within 30 seconds of the server
            clock.
        - name: PX-Signature
          in: header
          required: true
          schema:
            type: string
          description: Ed25519 signature of the request
        - name: PX-Content-Sha256
          in: header
          required: true
          schema:
            type: string
          description: >-
            Hex SHA-256 of the request body, or the SHA-256 of the empty string
            when there is no body.
        - schema:
            type: string
            minLength: 1
            description: >-
              Idempotency key for this request. Re-sending the same key with the
              same body returns the original result and creates no duplicate;
              re-sending it with a different body is rejected with 422.
            example: 2f1a8c4e-0b3d-4a9c-8e7f-1a2b3c4d5e6f
          required: true
          name: Idempotency-Key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KalshiOrderRequest'
      responses:
        '201':
          description: Order accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitKalshiOrderResponse'
        '400':
          description: >-
            Invalid request, a missing/malformed Idempotency-Key header, or the
            venue refused the order for a reason the caller can act on (for
            example an insufficient balance)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '404':
          description: The Kalshi market named by `ticker` does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Idempotency key reused with a different request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdempotencyConflictError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    KalshiOrderRequest:
      type: object
      properties:
        ticker:
          type: string
          minLength: 1
          pattern: ^[A-Z0-9]+([.-][A-Z0-9]+)*$
          description: >-
            Kalshi market ticker that identifies the market to trade. Uppercase
            alphanumeric segments joined by `-`, with `.` permitted inside a
            segment for a decimal strike (e.g. `KXBTCD-26AUG0607-T64599.99`).
            Case-sensitive: a lowercase ticker is rejected rather than upcased,
            because changing it would name a different instrument than the
            caller asked for.
          example: KXPRES-2028
        side:
          $ref: '#/components/schemas/KalshiSide'
        action:
          $ref: '#/components/schemas/KalshiAction'
        count:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Order size in whole contracts.
          example: 10
        priceCents:
          type: integer
          minimum: 1
          maximum: 99
          description: >-
            Limit price in whole cents from 1 to 99, in the traded side's own
            frame.
          example: 38
        timeInForce:
          oneOf:
            - $ref: '#/components/schemas/GtcTimeInForce'
            - $ref: '#/components/schemas/IocTimeInForce'
            - $ref: '#/components/schemas/FokTimeInForce'
          discriminator:
            propertyName: type
            mapping:
              GTC:
                $ref: '#/components/schemas/GtcTimeInForce'
              IOC:
                $ref: '#/components/schemas/IocTimeInForce'
              FOK:
                $ref: '#/components/schemas/FokTimeInForce'
          default:
            type: GTC
          description: Execution policy; defaults to GTC.
      required:
        - ticker
        - side
        - action
        - count
        - priceCents
      additionalProperties: false
      title: Order Request
    SubmitKalshiOrderResponse:
      type: object
      properties:
        orderId:
          type: string
          format: uuid
          description: Issued order id.
          example: 3f8b2c9a-2d18-4f7e-9c2a-1b6e1f0c8a4d
        status:
          $ref: '#/components/schemas/TradingOrderStatus'
      required:
        - orderId
        - status
    BadRequestError:
      anyOf:
        - $ref: '#/components/schemas/ApiError'
        - $ref: '#/components/schemas/IdempotencyBadRequestError'
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/ApiErrorCode'
            message:
              type: string
              description: Plain-text explanation of the error.
            orderId:
              type: string
              format: uuid
              description: >-
                The affected order, present only on
                ORDER_RECONCILIATION_REQUIRED; read it back to determine whether
                it reached the venue.
          required:
            - code
            - message
      required:
        - error
    IdempotencyConflictError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - IDEMPOTENCY_CONFLICT
              example: IDEMPOTENCY_CONFLICT
            message:
              type: string
              example: Idempotency key was reused with a different request body
          required:
            - code
            - message
      required:
        - error
    KalshiSide:
      type: string
      enum:
        - 'YES'
        - 'NO'
      description: Which side of the Kalshi market the contract represents.
      example: 'YES'
    KalshiAction:
      type: string
      enum:
        - BUY
        - SELL
      description: Order direction against the chosen side.
      example: BUY
    GtcTimeInForce:
      type: object
      properties:
        type:
          type: string
          enum:
            - GTC
      required:
        - type
      additionalProperties: false
      description: 'Good til cancelled: rest at limitPrice until filled or cancelled.'
      title: GoodTillCancelled
    IocTimeInForce:
      type: object
      properties:
        type:
          type: string
          enum:
            - IOC
      required:
        - type
      additionalProperties: false
      description: >-
        Immediate or cancel: fill whatever is immediately available, then cancel
        the remainder.
      title: ImmediateOrCancel
    FokTimeInForce:
      type: object
      properties:
        type:
          type: string
          enum:
            - FOK
      required:
        - type
      additionalProperties: false
      description: >-
        Fill or kill: fill in full immediately against resting liquidity,
        otherwise cancel.
      title: FillOrKill
    TradingOrderStatus:
      type: string
      enum:
        - PENDING
        - SUBMITTED
        - OPEN
        - FILLED
        - CANCELLED
        - REJECTED
      description: |-
        Order lifecycle status.

        | Status | Meaning |
        | --- | --- |
        | `PENDING` | Accepted, not yet sent to the venue. |
        | `SUBMITTED` | Sent, awaiting venue acknowledgement. |
        | `OPEN` | Resting on the venue. |
        | `FILLED` | Fully filled. |
        | `CANCELLED` / `REJECTED` | Terminal. |
      example: OPEN
    IdempotencyBadRequestError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/IdempotencyBadRequestErrorCode'
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    ApiErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - NOT_FOUND
        - INSUFFICIENT_BALANCE
        - IDEMPOTENCY_CONFLICT
        - ORDER_NOT_CANCELLABLE
        - ORDER_RECONCILIATION_REQUIRED
        - INTERNAL_ERROR
      description: Stable identifier for the error category.
    IdempotencyBadRequestErrorCode:
      type: string
      enum:
        - IDEMPOTENCY_KEY_REQUIRED
        - IDEMPOTENCY_KEY_INVALID
      description: Stable identifier for the Idempotency-Key header validation failure.
      example: IDEMPOTENCY_KEY_REQUIRED

````