> ## 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 or market order on a Polymarket outcome and returns the issued order id.



## OpenAPI

````yaml /openapi/v1.json post /v1/polymarket/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/polymarket/orders:
    post:
      tags:
        - Polymarket
      summary: Submit Order
      description: >-
        Places a limit or market order on a Polymarket outcome and returns the
        issued order id.
      operationId: submitPolymarketOrder
      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/PolymarketOrderRequest'
      responses:
        '201':
          description: Order accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitPolymarketOrderResponse'
        '400':
          description: Invalid request, or a missing/malformed Idempotency-Key header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '409':
          description: >-
            An earlier submit under this Idempotency-Key may have reached the
            venue and its outcome is not yet confirmed; read the returned
            orderId back instead of resubmitting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderReconciliationRequiredError'
        '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:
    PolymarketOrderRequest:
      oneOf:
        - $ref: '#/components/schemas/PolymarketMarketOrder'
        - $ref: '#/components/schemas/PolymarketLimitOrder'
      discriminator:
        propertyName: type
        mapping:
          MARKET:
            $ref: '#/components/schemas/PolymarketMarketOrder'
          LIMIT:
            $ref: '#/components/schemas/PolymarketLimitOrder'
      title: Order Request
    SubmitPolymarketOrderResponse:
      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'
    OrderReconciliationRequiredError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - ORDER_RECONCILIATION_REQUIRED
              example: ORDER_RECONCILIATION_REQUIRED
            message:
              type: string
              example: >-
                An earlier submit under this Idempotency-Key may have reached
                Polymarket and its outcome is not yet confirmed.
            orderId:
              type: string
              format: uuid
              description: >-
                The order whose outcome is unconfirmed; read it back to
                determine whether it reached the venue.
              example: 3f8b2c9a-2d18-4f7e-9c2a-1b6e1f0c8a4d
          required:
            - code
            - message
            - orderId
      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
    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
    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:
                $ref: '#/components/schemas/FokTimeInForce'
              FAK:
                $ref: '#/components/schemas/FakTimeInForce'
          default:
            type: FOK
          description: Execution policy; defaults to FOK.
      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'
          discriminator:
            propertyName: type
            mapping:
              GTC:
                $ref: '#/components/schemas/GtcTimeInForce'
          default:
            type: GTC
          description: Execution policy; defaults to GTC.
      required:
        - tokenId
        - side
        - type
        - size
        - price
      title: Limit Order
    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.
    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 limitPrice until filled or cancelled.'
      title: GoodTillCancelled
    IdempotencyBadRequestErrorCode:
      type: string
      enum:
        - IDEMPOTENCY_KEY_REQUIRED
        - IDEMPOTENCY_KEY_INVALID
      description: Stable identifier for the Idempotency-Key header validation failure.
      example: IDEMPOTENCY_KEY_REQUIRED

````