> ## 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.

# Batch Submit Orders

> Places up to 20 orders under one idempotency key, with an independent outcome per order.



## OpenAPI

````yaml /openapi/v1.json post /v1/kalshi/orders/batch
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.
  - name: ProphetX
    description: Submit and manage orders on ProphetX strikes.
  - name: Limitless
    description: Discover and trade Limitless markets.
paths:
  /v1/kalshi/orders/batch:
    post:
      tags:
        - Kalshi
      summary: Batch Submit Orders
      description: >-
        Places up to 20 orders under one idempotency key, with an independent
        outcome per order.
      operationId: submitKalshiOrders
      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/SubmitKalshiOrdersRequest'
      responses:
        '200':
          description: >-
            One result per entry in request order; an entry with no error was
            accepted, not confirmed at the venue, and is not a fill
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitKalshiOrdersResponse'
        '400':
          description: Invalid batch envelope, or a missing or malformed Idempotency-Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: The request was not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '403':
          description: The key is not permitted to perform this action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '422':
          description: Idempotency key reused with a different request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdempotencyConflictError'
        '429':
          description: >-
            The organization has exceeded its request rate; retry after the
            Retry-After interval
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: Authentication is temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
components:
  schemas:
    SubmitKalshiOrdersRequest:
      type: object
      properties:
        orders:
          type: array
          items:
            $ref: '#/components/schemas/KalshiBatchOrder'
          minItems: 1
          maxItems: 20
          description: The orders to place, at most 20.
      required:
        - orders
      additionalProperties: false
    SubmitKalshiOrdersResponse:
      type: object
      properties:
        orders:
          type: array
          items:
            $ref: '#/components/schemas/KalshiBatchOrderResult'
          minItems: 1
          description: One result per request entry, in the order the entries were sent.
      required:
        - orders
    BadRequestError:
      anyOf:
        - $ref: '#/components/schemas/ApiError'
        - $ref: '#/components/schemas/IdempotencyBadRequestError'
    AuthError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/AuthErrorCode'
            message:
              type: string
              description: Plain-text explanation of the error.
          required:
            - code
            - message
      required:
        - error
      title: Auth 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
    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
      title: API Error
    KalshiBatchOrder:
      type: object
      properties:
        ticker:
          type: string
          description: Kalshi market ticker identifying the market to trade.
          minLength: 1
          example: KXPRES-2028
        side:
          $ref: '#/components/schemas/KalshiOrderSide'
        count:
          type: string
          description: >-
            Order size in contracts, as a decimal string. Contracts trade in
            steps of 0.01.
          example: '10'
        price:
          type: string
          description: >-
            Limit price per contract in dollars, as a decimal string on the
            market's YES book. A price off that market's tick grid is rejected.
          example: '0.38'
        postOnly:
          type: boolean
          description: >-
            Reject the order if it would cross the book instead of resting as a
            maker.
        selfTradePrevention:
          $ref: '#/components/schemas/KalshiSelfTradePrevention'
        cancelOrderOnPause:
          type: boolean
          description: >-
            Cancel the order if the exchange pauses trading, instead of leaving
            it resting.
        timeInForce:
          oneOf:
            - $ref: '#/components/schemas/GtcTimeInForce'
            - $ref: '#/components/schemas/IocTimeInForce'
            - $ref: '#/components/schemas/FokTimeInForce'
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - GTD
                expiresAt:
                  type: string
                  format: date-time
              required:
                - type
                - expiresAt
              additionalProperties: false
              description: >-
                Good til date: rest at price until filled, cancelled, or expired
                at expiresAt.
              title: GoodTillDate
          default:
            type: GTC
          description: Execution policy; defaults to GTC.
        clientOrderId:
          type: string
          description: >-
            Your own identifier for this order, returned unchanged on every read
            of it. Each value may be used only once.
          minLength: 1
          maxLength: 64
          example: order-1
      required:
        - ticker
        - side
        - count
        - price
      additionalProperties: false
      title: Batch Order
    KalshiBatchOrderResult:
      type: object
      properties:
        clientOrderId:
          type: string
          nullable: true
          description: >-
            The clientOrderId sent on this entry, or null if none was sent or
            the entry was invalid.
        orderId:
          type: string
          nullable: true
          format: uuid
          description: Issued order id, or null when none is known for this entry.
          example: 3f8b2c9a-2d18-4f7e-9c2a-1b6e1f0c8a4d
        status:
          $ref: '#/components/schemas/KalshiBatchOrderStatus'
        filledCount:
          type: string
          nullable: true
          description: >-
            Contracts filled immediately when the venue acknowledged the order,
            or null if unreported.
          example: '4'
        remainingCount:
          type: string
          nullable: true
          description: >-
            Contracts still resting when the venue acknowledged the order, or
            null if unreported.
          example: '6'
        averagePrice:
          type: string
          nullable: true
          description: >-
            Average price per contract in dollars on the market's YES book, of
            the contracts filled at acknowledgement, or null if none filled.
          example: '0.384'
        error:
          $ref: '#/components/schemas/KalshiBatchOrderError'
      required:
        - clientOrderId
        - orderId
        - status
        - filledCount
        - remainingCount
        - averagePrice
        - error
      title: Batch Order Result
    IdempotencyBadRequestError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/IdempotencyBadRequestErrorCode'
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
      title: Idempotency Error
    AuthErrorCode:
      type: string
      enum:
        - UNAUTHORIZED
        - BAD_CONTENT_HASH
        - FORBIDDEN
        - RATE_LIMITED
        - AUTH_UNAVAILABLE
      description: Stable identifier for the error category.
    ApiErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - NOT_FOUND
        - INSUFFICIENT_BALANCE
        - IDEMPOTENCY_CONFLICT
        - ORDER_NOT_CANCELLABLE
        - ORDER_RECONCILIATION_REQUIRED
        - RATE_LIMITED
        - INTERNAL_ERROR
      description: Stable identifier for the error category.
    KalshiOrderSide:
      type: string
      enum:
        - BID
        - ASK
      description: |-
        Order direction on the market's YES book.

        | Side | Meaning |
        | --- | --- |
        | `BID` | Buy YES contracts, profiting if the market resolves YES. |
        | `ASK` | Sell YES contracts, profiting if the market resolves NO. |

        Selling YES is the same order as buying NO, so `ASK` covers both.
      example: BID
    KalshiSelfTradePrevention:
      type: string
      enum:
        - TAKER_AT_CROSS
        - MAKER
      description: >-
        Which order is cancelled when this order would trade against your own
        resting order.


        | Policy | Meaning |

        | --- | --- |

        | `TAKER_AT_CROSS` | Cancels this order, leaving the resting one on the
        book. |

        | `MAKER` | Cancels the resting order and lets this one keep matching. |


        Defaults to `TAKER_AT_CROSS`.
      example: TAKER_AT_CROSS
    GtcTimeInForce:
      type: object
      properties:
        type:
          type: string
          enum:
            - GTC
      required:
        - type
      additionalProperties: false
      description: 'Good til cancelled: rest at price 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
    KalshiBatchOrderStatus:
      type: string
      nullable: true
      enum:
        - PENDING
        - SUBMITTED
        - OPEN
        - FILLED
        - CANCELLED
        - REJECTED
      description: Order lifecycle status, or null when this entry was not accepted.
    KalshiBatchOrderError:
      type: object
      nullable: true
      properties:
        code:
          $ref: '#/components/schemas/ApiErrorCode'
        message:
          type: string
          description: Plain-text explanation of the error.
      required:
        - code
        - message
      description: Why this entry was not accepted, or null when it was.
    IdempotencyBadRequestErrorCode:
      type: string
      enum:
        - IDEMPOTENCY_KEY_REQUIRED
        - IDEMPOTENCY_KEY_INVALID
      description: Stable identifier for the Idempotency-Key header validation failure.
      example: IDEMPOTENCY_KEY_REQUIRED

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.