> ## 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 15 orders under one idempotency key, with an independent outcome per order.



## OpenAPI

````yaml /openapi/v1.json post /v1/polymarket/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/polymarket/orders/batch:
    post:
      tags:
        - Polymarket
      summary: Batch Submit Orders
      description: >-
        Places up to 15 orders under one idempotency key, with an independent
        outcome per order.
      operationId: submitPolymarketOrders
      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/SubmitPolymarketOrdersRequest'
      responses:
        '200':
          description: >-
            One result per entry in request order; a success was accepted, not
            confirmed at the venue, and is not a fill
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitPolymarketOrdersResponse'
        '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:
    SubmitPolymarketOrdersRequest:
      type: object
      properties:
        orders:
          type: array
          items:
            $ref: '#/components/schemas/PolymarketOrderRequest'
          minItems: 1
          maxItems: 15
          description: The orders to submit, answered in the same order.
      required:
        - orders
      additionalProperties: false
    SubmitPolymarketOrdersResponse:
      type: object
      properties:
        orders:
          type: array
          items:
            $ref: '#/components/schemas/PolymarketBatchOrderResult'
          minItems: 1
          maxItems: 15
          description: One result per request entry, in request order.
      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
    PolymarketOrderRequest:
      oneOf:
        - $ref: '#/components/schemas/PolymarketMarketOrder'
        - $ref: '#/components/schemas/PolymarketLimitOrder'
      discriminator:
        propertyName: type
        mapping:
          MARKET: '#/components/schemas/PolymarketMarketOrder'
          LIMIT: '#/components/schemas/PolymarketLimitOrder'
      title: Order Request
    PolymarketBatchOrderResult:
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Whether this entry was accepted; acceptance is not venue
            confirmation or a fill.
        orderId:
          type: string
          nullable: true
          format: uuid
          description: Issued order id, or null when none is reported for this entry.
          example: 3f8b2c9a-2d18-4f7e-9c2a-1b6e1f0c8a4d
        status:
          $ref: '#/components/schemas/PolymarketBatchOrderStatus'
        filledShares:
          type: string
          nullable: true
          description: Shares reported matched at submission, or null when unavailable.
          example: '120000'
        filledAmountUsd:
          type: string
          nullable: true
          description: >-
            Gross USD spent or received for the reported match, excluding fees,
            or null when unavailable.
          example: '49200.55'
        averagePrice:
          type: string
          nullable: true
          description: >-
            USD per share for the reported match, rounded to 6 decimal places,
            or null when unavailable.
          example: '0.410005'
        error:
          $ref: '#/components/schemas/PolymarketBatchOrderError'
      required:
        - success
        - orderId
        - status
        - filledShares
        - filledAmountUsd
        - averagePrice
        - error
    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.
    PolymarketMarketOrder:
      type: object
      properties:
        tokenId:
          type: string
          minLength: 1
          description: >-
            Polymarket outcome-token id that identifies both the market and the
            outcome.
          example: >-
            71321045679252212594626385532706912750332728571942532289631379312455583992563
        side:
          $ref: '#/components/schemas/PolymarketSide'
        type:
          type: string
          enum:
            - MARKET
          description: Discriminator for a market order.
        amount:
          type: string
          minLength: 1
          description: Order size, in dollars for a buy and in outcome shares for a sell.
          example: '50'
        timeInForce:
          oneOf:
            - $ref: '#/components/schemas/FokTimeInForce'
            - $ref: '#/components/schemas/FakTimeInForce'
          discriminator:
            propertyName: type
            mapping:
              FOK: '#/components/schemas/FokTimeInForce'
              FAK: '#/components/schemas/FakTimeInForce'
          default:
            type: FOK
          description: Execution policy; defaults to FOK.
        maxFillPrice:
          type: string
          description: >-
            Optional per-share ceiling this order may fill at, exclusive of 0
            and 1. BUY only. The venue sweeps the book and stops before the
            first level above it, so the order may fill partially (FAK) or not
            at all (FOK) rather than fill above the ceiling. Without it a buy is
            bounded only by `amount`, which caps what is spent and not the price
            paid.
          example: '0.62'
        minFillPrice:
          type: string
          description: >-
            Optional per-share floor this order may fill at, exclusive of 0 and
            1. SELL only. Omitting it does not mean unbounded: a market sell
            without a floor is bounded by a default derived from the market's
            midpoint.
          example: '0.41'
      required:
        - tokenId
        - side
        - type
        - amount
      title: Market Order
    PolymarketLimitOrder:
      type: object
      properties:
        tokenId:
          type: string
          minLength: 1
          description: >-
            Polymarket outcome-token id that identifies both the market and the
            outcome.
          example: >-
            71321045679252212594626385532706912750332728571942532289631379312455583992563
        side:
          $ref: '#/components/schemas/PolymarketSide'
        type:
          type: string
          enum:
            - LIMIT
          description: Discriminator for a limit order.
        size:
          type: string
          minLength: 1
          description: Order size in outcome shares.
          example: '100'
        price:
          type: string
          minLength: 1
          description: Limit price in dollars from 0 to 1.
          example: '0.38'
        postOnly:
          type: boolean
          description: >-
            Reject the order if it would cross the book instead of resting as a
            maker.
        timeInForce:
          oneOf:
            - $ref: '#/components/schemas/GtcTimeInForce'
            - $ref: '#/components/schemas/PolymarketGtdTimeInForce'
          discriminator:
            propertyName: type
            mapping:
              GTC: '#/components/schemas/GtcTimeInForce'
              GTD: '#/components/schemas/PolymarketGtdTimeInForce'
          default:
            type: GTC
          description: Execution policy; defaults to GTC.
      required:
        - tokenId
        - side
        - type
        - size
        - price
      title: Limit Order
    PolymarketBatchOrderStatus:
      type: string
      nullable: true
      enum:
        - PENDING
        - SUBMITTED
        - OPEN
        - FILLED
        - CANCELLED
        - REJECTED
      description: Order lifecycle status, or null when this entry was not accepted.
    PolymarketBatchOrderError:
      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
    PolymarketSide:
      type: string
      enum:
        - BUY
        - SELL
      description: Order direction.
      example: BUY
    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
    FakTimeInForce:
      type: object
      properties:
        type:
          type: string
          enum:
            - FAK
      required:
        - type
      additionalProperties: false
      description: >-
        Fill and kill: fill whatever is immediately available, then cancel the
        remainder.
      title: FillAndKill
    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
    PolymarketGtdTimeInForce:
      type: object
      properties:
        type:
          type: string
          enum:
            - GTD
        expiresAt:
          type: string
          format: date-time
          description: >-
            ISO-8601 expiry (UTC), truncated to whole seconds. Must be between
            180 and 2592000 seconds in the future.
          example: '2026-01-15T12:00:00Z'
      required:
        - type
        - expiresAt
      additionalProperties: false
      description: >-
        Good till date: rest at price until filled, cancelled, or expired.
        Polymarket expires the order shortly before expiresAt, with no further
        call from the client, and it then reads as CANCELLED.
      title: GoodTillDate

````

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