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

# Get order details

> Returns the canonical state of one order, including status, quantities, replacement linkage, and fills where available. Use this endpoint after create, cancel, replace, timeout, or retry events.



## OpenAPI

````yaml /openapi/openapi.json get /partner/exchange/orders/{order_id}
openapi: 3.1.0
info:
  title: Stabyl API
  description: >-
    REST API for approved Stabyl accounts to automate exchange, wallet, and
    non-production simulation workflows.
  contact:
    name: Stabyl Support
    email: support@stabyl.com
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.stabyl.com/v1
    description: Production
  - url: https://api-staging.stabyl.com/v1
    description: Staging
security: []
tags:
  - name: Exchange
    description: Trading market data and order management for account automation.
  - name: Wallets
    description: >-
      Supported routes, deposit destinations, balances, transactions, and saved
      recipients.
  - name: Webhooks
    description: >-
      Outbound event delivery configuration and eventually consistent delivery
      history. Verify Standard Webhooks webhook-id, webhook-timestamp, and
      webhook-signature headers against the unchanged raw request body before
      parsing JSON.
  - name: Simulation
    description: Non-production endpoints for testing integration behavior.
paths:
  /partner/exchange/orders/{order_id}:
    get:
      tags:
        - Exchange
      summary: Get order details
      description: >-
        Returns the canonical state of one order, including status, quantities,
        replacement linkage, and fills where available. Use this endpoint after
        create, cancel, replace, timeout, or retry events.
      operationId: get_partner_exchange_orders_order_id
      parameters:
        - name: order_id
          in: path
          description: Public order ID returned by create or list order endpoints.
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Order details
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/OrderDetailsResponse'
                  status:
                    type: string
                    enum:
                      - success
              example:
                data:
                  fills: []
                  order:
                    avg_fill_price: null
                    cancel_reason: null
                    client_order_id: client-order-001
                    created_at: '2026-05-24T12:00:00Z'
                    filled_quantity: '0.00'
                    id: 0197f1f0-0000-7000-8000-000000000001
                    order_type: limit
                    pair_id: USD/NGN
                    price: '1650.00'
                    quantity: '100.00'
                    remaining_quantity: '100.00'
                    replace:
                      replaced_by_order_id: null
                      replaces_order_id: null
                    side: buy
                    status: accepted
                    time_in_force: GTC
                status: success
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: UNAUTHORIZED
                      message:
                        type: string
                        example: missing X-Api-Key header
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: UNAUTHORIZED
                  message: missing X-Api-Key header
                status: error
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: NOT_FOUND
                      message:
                        type: string
                        example: resource not found
                  status:
                    type: string
                    enum:
                      - error
              example:
                error:
                  code: NOT_FOUND
                  message: resource not found
                status: error
      security:
        - api_key: []
components:
  schemas:
    OrderDetailsResponse:
      type: object
      description: >-
        Canonical order detail response, including order state and fills where
        available.
      required:
        - order
        - fills
      properties:
        fills:
          type: array
          items:
            $ref: '#/components/schemas/FillInfo'
          description: List of fills for this order
        order:
          $ref: '#/components/schemas/OrderInfo'
          description: Order information
      example:
        fills:
          - created_at: '2026-01-14T10:31:00Z'
            fee: '0.25'
            fee_currency: USDT
            id: 123e4567-e89b-12d3-a456-426614174222
            price: '1649.50'
            quantity: '25.00'
        order:
          avg_fill_price: '1649.50'
          client_order_id: cli-123
          created_at: '2026-01-14T10:30:00Z'
          filled_quantity: '50.00'
          id: 123e4567-e89b-12d3-a456-426614174000
          order_type: limit
          pair_id: USD/NGN
          price: '1650.00'
          quantity: '100.00'
          replace:
            replaced_by_order_id: 123e4567-e89b-12d3-a456-426614174111
            replaces_order_id: null
          side: buy
          status: partially_filled
          time_in_force: POST_ONLY
    FillInfo:
      type: object
      description: Execution linked to an account order.
      required:
        - id
        - price
        - quantity
        - fee
        - fee_currency
        - created_at
      properties:
        created_at:
          type: string
        fee:
          type: string
        fee_currency:
          type: string
        id:
          type: string
          format: uuid
        price:
          type: string
        quantity:
          type: string
    OrderInfo:
      type: object
      description: >-
        Order state, quantities, pricing, time-in-force, and replacement
        linkage.
      required:
        - id
        - pair_id
        - side
        - order_type
        - time_in_force
        - status
        - quantity
        - filled_quantity
        - remaining_quantity
        - replace
        - created_at
      properties:
        avg_fill_price:
          type:
            - string
            - 'null'
        cancel_reason:
          type:
            - string
            - 'null'
        client_order_id:
          type:
            - string
            - 'null'
        created_at:
          type: string
        filled_quantity:
          type: string
        id:
          type: string
          format: uuid
        order_type:
          type: string
        pair_id:
          type: string
        price:
          type:
            - string
            - 'null'
        quantity:
          type: string
        reject_reason:
          type:
            - string
            - 'null'
        remaining_quantity:
          type: string
        replace:
          $ref: '#/components/schemas/OrderReplaceInfo'
        side:
          type: string
        status:
          type: string
        time_in_force:
          type: string
    OrderReplaceInfo:
      type: object
      description: Links an order to the order it replaced or the order that replaced it.
      properties:
        replaced_by_order_id:
          type:
            - string
            - 'null'
          format: uuid
        replaces_order_id:
          type:
            - string
            - 'null'
          format: uuid
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API credential. Withdrawal quote and submit operations additionally
        require the documented Ed25519 timestamp, nonce, and signature headers.
      x-default: sb_test_your_key

````