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

# fetch_order

> Fetch one order by its globally-unique `order_id`.

Fetch one order by its globally-unique `order_id`.


## OpenAPI

````yaml openpx.openapi.yaml GET /v1/orders/fetch_order
openapi: 3.1.0
info:
  title: OpenPX Unified API
  description: >-
    Unified API surface across prediction-market exchanges. One `Exchange`
    trait, one set of models, one shape — implemented in Rust with
    auto-generated Python and TypeScript SDKs.


    This OpenAPI spec is **auto-generated** from
    `engine/core/src/exchange/traits.rs` and `schema/openpx.schema.json`. Edit
    the trait or the schema, then regenerate via `just openapi`. The spec models
    trait methods as REST operations for documentation rendering only — OpenPX
    is an in-process Rust library, not a REST service.
  version: 0.3.1
  license:
    name: MIT
servers:
  - url: https://github.com/openpx-trade/openpx
    description: >-
      Documentation surface only. OpenPX is an in-process Rust library; there is
      no hosted REST endpoint.
security: []
tags:
  - name: Markets
  - name: Orders
  - name: Positions
  - name: Balance
  - name: Orderbook
  - name: Trades
  - name: Fills
  - name: Server
paths:
  /v1/orders/fetch_order:
    get:
      tags:
        - Orders
      summary: Fetch order
      description: Fetch one order by its globally-unique `order_id`.
      operationId: fetch_order
      parameters:
        - name: order_id
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        default:
          description: Unified error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenPxError'
components:
  schemas:
    Order:
      description: An order on the unified surface.
      properties:
        created_at:
          description: Order creation time (UTC) (e.g. `"2026-04-25T12:00:00Z"`).
          format: date-time
          type: string
        fee:
          default: null
          description: >-
            Volume-weighted per-contract fee in quote dollars; `null` on
            Polymarket and on unfilled orders.
          format: double
          type:
            - number
            - 'null'
        filled:
          description: Cumulative filled size in contracts (e.g. `25.0`).
          format: double
          type: number
        id:
          description: Globally-unique exchange order id (e.g. `"a1b2c3d4-..."`).
          type: string
        market_ticker:
          description: >-
            Unified market ticker the order belongs to (e.g.
            `"KXBTCD-25APR1517"`).
          type: string
        outcome:
          description: >-
            Outcome label as published by the exchange (e.g. `"Yes"`, `"No"`, or
            a categorical label).
          type: string
        price:
          description: Limit price as YES probability in `(0, 1)` (e.g. `0.62`).
          format: double
          type: number
        side:
          allOf:
            - $ref: '#/components/schemas/OrderSide'
          description: 'Order direction. Options: `buy`, `sell`.'
        size:
          description: Order size in contracts (e.g. `100.0`).
          format: double
          type: number
        status:
          allOf:
            - $ref: '#/components/schemas/OrderStatus'
          description: >-
            Order lifecycle state. Options: `pending`, `open`, `filled`,
            `partially_filled`, `cancelled`, `rejected`.
        updated_at:
          default: null
          description: Last update time (UTC); `null` if untouched since creation.
          format: date-time
          type:
            - string
            - 'null'
      required:
        - created_at
        - filled
        - id
        - market_ticker
        - outcome
        - price
        - side
        - size
        - status
      title: Order
      type: object
    OpenPxError:
      type: object
      description: >-
        Unified error type returned when an exchange call fails. The `kind`
        field is the canonical category; `message` carries the upstream
        explanation. Per-exchange variants are mapped into this shape before
        they cross the trait boundary.
      required:
        - kind
        - message
      properties:
        kind:
          type: string
          enum:
            - Authentication
            - InsufficientFunds
            - MarketNotFound
            - OrderNotFound
            - RateLimited
            - NetworkError
            - Api
            - Config
            - NotSupported
        message:
          type: string
    OrderSide:
      description: 'Order direction. Options: `buy`, `sell`.'
      enum:
        - buy
        - sell
      type: string
    OrderStatus:
      description: >-
        Order lifecycle state. Options: `pending`, `open`, `filled`,
        `partially_filled`, `cancelled`, `rejected`.
      enum:
        - pending
        - open
        - filled
        - partially_filled
        - cancelled
        - rejected
      title: OrderStatus
      type: string

````