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

# Create an order request (Coming soon) 

> Submit a request to create an order and get back an acknowledgement response containing the order's ID immediately. An order with a status of Pending will be created immediately in order to generate an ID; Any in-play/BIR delay, as well as initial matching will be performed asynchronously. Updates about orders created via this method maybe found as OrderUpdate messages through the StreamAPI and/or by calling GET /orders/{id} with the returned ID



## OpenAPI

````yaml https://docs.api.monacoprotocol.xyz/api/v1/exchange-openapi-general.json post /order-requests
openapi: 3.1.0
info:
  title: BetDEX General Integration API
  description: >-
    A RESTful API that allows you to interact with the BetDEX Exchange. Provides
    endpoints for managing Events, Markets, Sessions, Wallets and Orders. To
    interact with the API, a client must have an App Id and an API Key to
    authenticate and create a session.
  version: '0.1'
servers:
  - url: https://sandbox.api.btdx.io/
    description: Sandbox API Server
  - url: https://prod.api.btdx.io/
    description: Production API Server
security: []
tags:
  - name: API Key Management
  - name: App Management
  - name: Currencies
  - name: Event Categories
  - name: Event Groups
  - name: Event Subcategories
  - name: Events
  - name: External Reference Sources
  - name: Heartbeat Management
  - name: Market Prices
  - name: Market Types
  - name: Markets
  - name: Orders
  - name: Participants
  - name: Session Management
  - name: Status
  - name: Trades
  - name: Wallet API Key Management
  - name: Wallets
paths:
  /order-requests:
    post:
      tags:
        - Orders
      summary: 'Create an order request (Coming soon) '
      description: >-
        Submit a request to create an order and get back an acknowledgement
        response containing the order's ID immediately. An order with a status
        of Pending will be created immediately in order to generate an ID; Any
        in-play/BIR delay, as well as initial matching will be performed
        asynchronously. Updates about orders created via this method maybe found
        as OrderUpdate messages through the StreamAPI and/or by calling GET
        /orders/{id} with the returned ID
      operationId: createOrderRequest
      parameters:
        - name: authorization
          in: header
          description: Header with the accessToken for the current session
          required: true
          schema:
            type: string
          example: Bearer eyJ0eXAiOiJ...bjV7AtDgA
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IDResponse'
        '400':
          description: Request invalid
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IDResponse'
        '401':
          description: Session invalid
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/IDResponse'
components:
  schemas:
    CreateOrderRequest:
      type: object
      properties:
        walletId:
          type: string
        marketId:
          type: string
        side:
          type: string
          enum:
            - For
            - Against
        outcomeId:
          type: string
        price:
          type: number
        stake:
          type: number
        keepWhenInPlay:
          type: boolean
          description: >-
            Optional - whether to keep unmatched portion of the order when its
            market enters InPlay (only relevant if the market has
            eventStartAction: CancelUnmatchedLiquidity) - default is false
        matchBehavior:
          type: string
          description: |
            Optional - How any unmatched portion of an order is treated:
            <ul>
                <li>RetainUnmatched - unmatched portion persists as an offer (default)</li>
                <li>CancelUnmatched - unmatched portion is cancelled</li>
            </ul>
          enum:
            - RetainUnmatched
            - CancelUnmatched
        reference:
          type: string
        commissionRateId:
          type: string
          description: >
            Optional - to use a different commission rate for this order than
            your app's

            default commission rate. If omitted or set to null, the app's
            default

            commission rate will be used (if it has one).
      required:
        - keepWhenInPlay
        - marketId
        - outcomeId
        - price
        - side
        - stake
        - walletId
    IDResponse:
      type: object
      properties:
        _meta:
          $ref: '#/components/schemas/Meta'
        ids:
          type: array
          items:
            type: string
          uniqueItems: true
    Meta:
      type: object
      properties:
        _primary_document:
          type: string
          enum:
            - apiKeys
            - apps
            - categories
            - commissionRates
            - currencies
            - depositAddresses
            - depositRequests
            - events
            - eventGroups
            - externalReferences
            - externalReferenceSources
            - heartbeats
            - ids
            - markets
            - marketOutcomes
            - marketPositions
            - marketTypes
            - orders
            - participants
            - prices
            - priceLadders
            - sessions
            - statuses
            - subcategories
            - trades
            - transactions
            - wallets
            - walletMetrics
            - withdrawalRequests
        _count:
          type: integer
          format: int32
        _page:
          $ref: '#/components/schemas/PageMeta'
    PageMeta:
      type: object
      properties:
        _pageNumber:
          type: integer
          format: int32
        _pageSize:
          type: integer
          format: int32
        _totalElements:
          type: integer
          format: int64
        _totalPages:
          type: integer
          format: int32

````