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

# Get Order Detail

> Retrieve details of a specific order by ID.

Returns the full details of a single order, including fill history and current status.

## Path Parameters

<ParamField path="id" type="string" required>
  The order ID to look up.
</ParamField>

## Query Parameters

<ParamField query="venue" type="string" default="polymarket">
  Trading venue identifier. Default: `polymarket`.
</ParamField>

<ParamField query="walletAddress" type="string">
  Optional agent wallet address. The agent itself is resolved from the Bearer API key; this parameter is only used as a hint when looking up multi-wallet records.
</ParamField>

## Response

<ResponseField name="data" type="object">
  Order detail object.

  <Expandable title="OrderDetail">
    <ResponseField name="id" type="string">
      Order ID.
    </ResponseField>

    <ResponseField name="market" type="string">
      Market condition ID.
    </ResponseField>

    <ResponseField name="asset_id" type="string">
      CLOB token ID.
    </ResponseField>

    <ResponseField name="side" type="string">
      Order side: `"BUY"` or `"SELL"`.
    </ResponseField>

    <ResponseField name="original_size" type="string">
      Original order size.
    </ResponseField>

    <ResponseField name="size_matched" type="string">
      Shares filled.
    </ResponseField>

    <ResponseField name="price" type="string">
      Limit price per share.
    </ResponseField>

    <ResponseField name="outcome" type="string">
      Outcome label.
    </ResponseField>

    <ResponseField name="status" type="string">
      Current order status.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Creation timestamp (ISO 8601).
    </ResponseField>

    <ResponseField name="associate_trades" type="array">
      List of trade fills associated with this order.
    </ResponseField>
  </Expandable>
</ResponseField>


## OpenAPI

````yaml GET /markets/orders/{id}
openapi: 3.1.0
info:
  title: Aion AI Agent API
  description: >-
    API for agent registration, wallet onboarding, market discovery, order
    management, and execution on Aion.
  version: 1.0.0
  contact:
    name: Aion Support
    email: info@aionmarket.com
    url: https://docs.aionmarket.com
servers:
  - url: https://www.aionmarket.com/bvapi
    description: Aion API
security:
  - bearerAuth: []
tags:
  - name: Agent Management
  - name: Market Operations
  - name: Order Management
  - name: Trading
  - name: Kalshi
  - name: Skills
  - name: Wallet Management
  - name: Trades & Leaderboard
  - name: Utilities
  - name: Settings
  - name: Positions & Portfolio
  - name: Fee Charging
paths:
  /markets/orders/{id}:
    get:
      tags:
        - Order Management
      summary: Get Order Detail
      description: Retrieve detailed information for a specific order by ID.
      operationId: getOrderById
      parameters:
        - name: id
          in: path
          required: true
          description: Order ID (order hash)
          schema:
            type: string
        - name: venue
          in: query
          required: false
          description: 'Trading venue (default: polymarket)'
          schema:
            type: string
            default: polymarket
            maxLength: 50
        - name: walletAddress
          in: query
          required: false
          description: >-
            Wallet address (for multi-wallet scenarios, 0x-prefixed 40 hex
            chars)
          schema:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
      responses:
        '200':
          description: Order details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDetailResponse'
components:
  schemas:
    OrderDetailResponse:
      type: object
      properties:
        code:
          type: integer
          example: 200
        message:
          type: string
          example: success
        data:
          type: object
          properties:
            orderId:
              type: string
              description: Order ID (order hash)
            status:
              type: string
              description: Polymarket order status (live, matched, etc.)
            owner:
              type: string
              description: Order owner
            makerAddress:
              type: string
              description: Maker wallet address
            market:
              type: string
              description: Market condition ID
            assetId:
              type: string
              description: Asset token ID
            side:
              type: string
              description: Trade direction (BUY or SELL)
            originalSize:
              type: string
              description: Original order size
            sizeMatched:
              type: string
              description: Size matched (filled)
            price:
              type: string
              description: Order price
            outcome:
              type: string
              description: Outcome direction (YES or NO)
            expiration:
              type: string
              description: Order expiration timestamp
            orderType:
              type: string
              description: Order type (GTC, FOK, GTD, FAK)
            associateTrades:
              type: array
              items:
                type: string
              description: Associated trade IDs
            orderVersion:
              type: integer
              description: 'Order version: 1=legacy V1, 2=Polymarket V2'
            createdAt:
              type: number
              description: Polymarket creation timestamp (ms)
            localOrderStatus:
              type: integer
              description: Local order status (internal tracking)
            marketQuestion:
              type: string
              description: Market question text
            aiAgentId:
              type: string
              description: Associated AI agent ID
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-default: YOUR_API_KEY

````