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

# Get Order Status

> Retrieve the current state of an order.



## OpenAPI

````yaml GET /v1/matching/orders/{orderId}
openapi: 3.1.0
info:
  title: Options Matching API
  version: 1.0.0
  description: >-
    Order management endpoints for Rails Options. Base URLs vary by environment
    — see the Environments page. Authorize with the access token obtained from
    the Auth API.
servers:
  - url: https://api-options.sandbox.rails.xyz
security:
  - bearerAuth: []
paths:
  /v1/matching/orders/{orderId}:
    get:
      summary: Get Order Status
      description: >-
        Returns the current state of one order. See [Order
        Lifecycle](/latest/options/guides/order-lifecycle#placing-orders-over-rest).
      operationId: getOptionsOrderStatus
      parameters:
        - name: orderId
          in: path
          required: true
          description: >-
            Unique identifier of the order. Example value:
            `01JRQM8H5XYZABCDEFGHJKMNPQ`. You can get this value from the
            create, modify or cancel response.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderStatus'
              example:
                clientRequestId: 9f1c2c9e-3f4a-4a4e-9f10-2b7d3f2a1c55
                status: open
                body: order accepted
                action: create
                contract: BTC-7FEB26-100000-C
                orderId: 01JRQM8H5XYZABCDEFGHJKMNPQ
                quantity: '2'
                filledQuantity: '1'
                remainingQuantity: '1'
                updatedAt: 1770000001500
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: orderId is required
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: order not found
        '429':
          $ref: '#/components/responses/RateLimited'
        '502':
          $ref: '#/components/responses/MatchingUnavailable'
        '504':
          $ref: '#/components/responses/MatchingTimeout'
components:
  schemas:
    OrderStatus:
      type: object
      properties:
        clientRequestId:
          type: string
          description: Client-generated UUID for correlation.
        status:
          type: string
          description: >-
            Order status. See [Order
            Lifecycle](/latest/options/guides/order-lifecycle#order-statuses).
          enum:
            - pending
            - accepted
            - open
            - completed
            - cancelled
            - rejected
            - not_found
        body:
          type: string
          description: Status message.
        action:
          type: string
          description: The last action recorded for this order.
          enum:
            - create
            - modify
            - cancel
        contract:
          type: string
          description: Contract name.
        orderId:
          type: string
          description: Unique identifier for the order.
        quantity:
          type: string
          description: Order quantity.
        filledQuantity:
          type: string
          description: Quantity filled so far.
        remainingQuantity:
          type: string
          description: Quantity not yet filled.
        reason:
          type: string
          description: Why the order was rejected.
        updatedAt:
          type: integer
          format: int64
          description: Order last update timestamp (milliseconds since epoch).
      required:
        - status
        - updatedAt
    Error:
      type: object
      properties:
        error:
          type: string
          description: A human-readable message describing the error.
      required:
        - error
  responses:
    Unauthorized:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    RateLimited:
      description: ''
      headers:
        Retry-After:
          description: >-
            Number of seconds to wait before making another request (429
            responses only).
          required: true
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: api rate limit exceeded
    MatchingUnavailable:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: matching service unavailable
    MatchingTimeout:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: matching service timed out
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````