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

# Get order by ID

> Retrieve detailed information about a specific order



## OpenAPI

````yaml GET /investments/orders/{id}
openapi: 3.0.3
info:
  title: Wealthyhood Investments API
  version: 1.0.0
  description: >
    Portfolio and asset investment preview, execution, and order management
    endpoints for Wealthyhood portfolios.


    All requests use machine-to-machine (M2M) authentication. Each request
    requires:

    - A bearer access token (M2M token with required scopes)

    - An `x-user-id` header to specify which user's data to access
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host name.
security:
  - bearerAuth: []
tags:
  - name: Investments
    description: >-
      Preview and execute portfolio and asset investment operations, and manage
      orders.
paths:
  /investments/orders/{id}:
    get:
      tags:
        - Investments
      summary: Get order by ID
      description: >
        Retrieve detailed information about a specific order by its ID. Returns
        the order with all

        execution details, fees, and current status.


        **Deprecated:** This endpoint will be removed in v2
      parameters:
        - $ref: '#/components/parameters/XUserId'
        - $ref: '#/components/parameters/OrderId'
      responses:
        '200':
          description: Order details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
              example:
                id: 64f5b3137fb3fc001234abce
                isin: US0378331005
                side: Buy
                status: Settled
                quantity: 1.5
                executionWindow:
                  type: real-time
                  expectedExecutionDate: '2024-07-12'
                consideration:
                  currency: EUR
                  amount: 2550
                fees:
                  realtimeExecution:
                    currency: EUR
                    amount: 0
                createdAt: '2024-07-12T10:30:00Z'
                settledAt: '2024-07-12T00:00:00.000Z'
                filledAt: '2024-07-12T15:45:00Z'
                unitPrice:
                  currency: EUR
                  amount: 17
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      deprecated: true
components:
  parameters:
    XUserId:
      name: x-user-id
      in: header
      required: true
      description: >-
        User identifier for the M2M client to specify which user's data to
        access.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
    OrderId:
      name: id
      in: path
      required: true
      description: Order identifier (MongoDB ObjectId)
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
  schemas:
    Order:
      type: object
      description: Order information including execution details and fees
      required:
        - id
        - displayId
        - isin
        - side
        - status
        - orderType
        - displayDate
        - isCancellable
      properties:
        id:
          type: string
        displayId:
          type: string
          description: User-friendly display identifier for the order (e.g., ORD-XXXXX)
          example: ORD-ABC12
        isin:
          type: string
        side:
          type: string
          enum:
            - Buy
            - Sell
        status:
          type: string
          enum:
            - Pending
            - Matched
            - Settled
            - Rejected
            - Cancelled
        orderType:
          type: string
          enum:
            - Market
            - Limit
          description: Order type (`Market` or `Limit`).
        quantity:
          type: number
          format: double
          description: Asset units (may be null for pending buy orders)
        executionWindow:
          allOf:
            - $ref: '#/components/schemas/ExecutionWindow'
          nullable: true
        consideration:
          type: object
          properties:
            currency:
              type: string
            amount:
              type: number
              format: double
        limitPrice:
          allOf:
            - $ref: '#/components/schemas/UnitPriceType'
          nullable: true
          description: Limit price per unit for limit orders
        expiresAt:
          type: string
          format: date-time
          nullable: true
          description: ISO datetime when a limit order expires
        fees:
          allOf:
            - $ref: '#/components/schemas/TransactionFees'
          nullable: true
        partnerFees:
          allOf:
            - $ref: '#/components/schemas/PartnerFees'
          nullable: true
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the order was created (optional)
        settledAt:
          type: string
          format: date-time
          nullable: true
          description: ISO datetime when the order settled or is expected to settle
        filledAt:
          type: string
          format: date-time
          nullable: true
          description: ISO datetime when order was matched
        displayDate:
          type: string
          format: date-time
          description: Display date (`filledAt` when matched, otherwise `createdAt`)
        isCancellable:
          type: boolean
          description: Whether the order can be cancelled by the user
        unitPrice:
          allOf:
            - $ref: '#/components/schemas/UnitPriceType'
          nullable: true
        fxRate:
          allOf:
            - $ref: '#/components/schemas/ExchangeRate'
          nullable: true
          description: Exchange rate used
    ExecutionWindow:
      type: object
      description: Execution timing communicated to the client.
      properties:
        executionType:
          type: string
          description: Internal execution type such as `REALTIME` or `MARKET_HOURS`.
        start:
          type: string
          format: date-time
          nullable: true
        end:
          type: string
          format: date-time
          nullable: true
      additionalProperties: true
    UnitPriceType:
      type: object
      description: Price per unit in major units (e.g. 200.00 for €200.00).
      properties:
        amount:
          type: number
          format: double
          description: Price per unit in major units (e.g. 200.00 for €200.00).
        currency:
          type: string
          description: ISO 4217 currency code
          enum:
            - GBP
            - EUR
            - USD
      additionalProperties: false
    TransactionFees:
      type: object
      description: >-
        Wealthyhood fees on orders and settled transactions (commission, FX, and
        real-time execution when applicable).
      properties:
        commission:
          $ref: '#/components/schemas/FeeBreakdown'
        fx:
          $ref: '#/components/schemas/FeeBreakdown'
      additionalProperties: false
    PartnerFees:
      type: object
      description: >-
        ETE/NBG countervalue fees charged to partner users (sibling of
        Wealthyhood `fees`)
      properties:
        commission:
          $ref: '#/components/schemas/FeeBreakdown'
        fx:
          $ref: '#/components/schemas/FeeBreakdown'
      additionalProperties: false
    ExchangeRate:
      type: object
      description: Exchange rate with currency information
      properties:
        rate:
          type: number
          format: double
          description: Exchange rate value
        currency:
          type: string
          description: ISO 4217 currency code
          enum:
            - GBP
            - EUR
            - USD
      additionalProperties: false
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: integer
        error:
          type: object
          properties:
            message:
              type: string
            description:
              type: string
              nullable: true
        responseId:
          type: string
          format: uuid
    FeeBreakdown:
      type: object
      properties:
        currency:
          type: string
        amount:
          type: number
          format: double
      additionalProperties: false
  responses:
    UnauthorizedError:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 401
            error:
              message: User not found
            responseId: 145f2b0d-1d5b-4e91-8d0d-7af0ae9ad13a
    ForbiddenError:
      description: >-
        Authenticated user cannot act on the requested portfolio or lacks
        scopes.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 403
            error:
              message: Portfolio does not belong to user
            responseId: 5e467f79-c62c-4d83-9810-7a0f8529fd76
    NotFoundError:
      description: Portfolio or related resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 404
            error:
              message: Portfolio not found
            responseId: 65c0b1f6-2a48-4c4f-a5aa-9b9c8c6f9b58
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Auth0-issued access token that includes the scopes listed for the
        endpoint.

````