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

# Create Order

> Place a new order on the specified platform. Requires stored credentials or a provider with a default client.



## OpenAPI

````yaml POST /v1/api/orders
openapi: 3.1.0
info:
  title: Dot Prediction API
  description: >-
    A unified API for accessing prediction market data across Kalshi,
    Polymarket, and Limitless.
  version: 1.0.0
servers:
  - url: https://api.dotprediction.io
security:
  - apiKey: []
paths:
  /v1/api/orders:
    post:
      tags:
        - Orders
      summary: Create order
      description: >-
        Place a new order on the specified platform. Requires stored credentials
        or a provider with a default client.
      operationId: createOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
      responses:
        '201':
          description: Order created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOrderResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: 0d5813fe-a3df-4eee-bda5-8e01bfe0683a
        '500':
          $ref: 13256dda-f2cf-48d5-853d-eda20215fa08
components:
  schemas:
    CreateOrderRequest:
      type: object
      required:
        - platform
        - market_id
        - side
        - outcome
        - type
        - size
      properties:
        platform:
          type: string
          enum:
            - kalshi
            - polymarket
            - limitless
          description: Target platform.
        market_id:
          type: string
          description: The market to place the order on.
        credential_id:
          type: integer
          description: Stored credential ID. Omit to use default.
        side:
          type: string
          enum:
            - buy
            - sell
          description: Order side.
        outcome:
          type: string
          description: Outcome to trade (e.g., 'Yes', 'No').
        type:
          type: string
          enum:
            - limit
            - market
          description: Order type.
        price:
          type: number
          description: Limit price (0.01-0.99). Required for limit orders.
        size:
          type: number
          description: Number of contracts/shares.
        time_in_force:
          type: string
          description: 'Time in force (default: gtc).'
        expiration:
          type: string
          description: Expiration time (ISO 8601).
        client_order_id:
          type: string
          description: Client-provided order ID.
        idempotency_key:
          type: string
          description: Idempotency key to prevent duplicate orders.
    CreateOrderResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/Order'
        meta:
          $ref: '#/components/schemas/OrderMeta'
    Order:
      type: object
      properties:
        order_id:
          type: string
        platform:
          type: string
        market_id:
          type: string
        side:
          type: string
          enum:
            - buy
            - sell
        outcome:
          type: string
        type:
          type: string
          enum:
            - limit
            - market
        price:
          type: number
        size:
          type: number
        filled_size:
          type: number
        remaining_size:
          type: number
        average_fill_price:
          type: number
        status:
          type: string
        time_in_force:
          type: string
        client_order_id:
          type: string
        fees:
          $ref: '#/components/schemas/OrderFees'
        created_at:
          type: string
        updated_at:
          type: string
        expiration:
          type: string
    OrderMeta:
      type: object
      properties:
        platform:
          type: string
        request_time_ms:
          type: integer
          format: int64
        idempotent_replay:
          type: boolean
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: integer
              description: HTTP status code.
            message:
              type: string
              description: Human-readable error message.
            resolution:
              type: string
              description: Suggested action to resolve the error.
            error_text:
              type: string
              description: Detailed error information.
    OrderFees:
      type: object
      properties:
        maker_fee:
          type: number
        taker_fee:
          type: number
        total_fee:
          type: number
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Generate one via the dashboard or the
        `/v1/api/auth/api-keys` endpoint.

````