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

# Look up a single order by id

> Returns one order (active or completed) by order_id and subaccount_id; the subaccount filter enforces ownership. Returns the order or an order-does-not-exist error.



## OpenAPI

````yaml /openapi.json post /private/get_order
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: System
    description: Rate limits and transaction lookups.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Other
    description: Uncategorized.
paths:
  /private/get_order:
    post:
      tags:
        - Orderbook
      summary: Look up a single order by id
      description: >-
        Returns one order (active or completed) by order_id and subaccount_id;
        the subaccount filter enforces ownership. Returns the order or an
        order-does-not-exist error.
      operationId: private_get_order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetOrderRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    GetOrderRequest:
      type: object
      required:
        - order_id
        - subaccount_id
      properties:
        order_id:
          description: UUID v4 string
          type: string
          format: uuid
        subaccount_id:
          type: integer
          format: int64
    Order:
      type: object
      required:
        - amount
        - average_price
        - creation_timestamp
        - direction
        - extra_fee
        - filled_amount
        - instrument_name
        - is_transfer
        - last_update_timestamp
        - limit_price
        - max_fee
        - mmp
        - nonce
        - order_fee
        - order_id
        - order_status
        - order_type
        - quote_id
        - replaced_order_id
        - signature
        - signature_expiry_sec
        - signed_limit_price
        - signer
        - subaccount_id
        - time_in_force
        - trigger_price
      properties:
        algo_duration_sec:
          type:
            - integer
            - 'null'
          format: int32
        algo_num_slices:
          type:
            - integer
            - 'null'
          format: int32
        algo_slices_completed:
          type:
            - integer
            - 'null'
          format: int32
        algo_type:
          anyOf:
            - $ref: '#/components/schemas/AlgoType'
            - type: 'null'
        amount:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        average_price:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        cancel_reason:
          $ref: '#/components/schemas/CancelReason'
          default: ''
        creation_timestamp:
          type: integer
          format: int64
        direction:
          $ref: '#/components/schemas/Direction'
        extra_fee:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        filled_amount:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        instrument_name:
          type: string
        is_transfer:
          type: boolean
        label:
          default: ''
          type: string
        last_update_timestamp:
          type: integer
          format: int64
        limit_price:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        max_fee:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        mmp:
          type: boolean
        nonce:
          type: string
        order_fee:
          description: >-
            Decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits; a string or JSON number is accepted
          type: string
          format: decimal
        order_id:
          type: string
        order_status:
          $ref: '#/components/schemas/OrderStatus'
        order_type:
          $ref: '#/components/schemas/OrderType'
        quote_id:
          description: Optional UUID v4 string
          type:
            - string
            - 'null'
          format: uuid
        replaced_order_id:
          description: Optional UUID v4 string
          type:
            - string
            - 'null'
          format: uuid
        signature:
          type: string
        signature_expiry_sec:
          type: integer
          format: int64
        signed_limit_price:
          description: >-
            Optional decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits, or null; a string or JSON number is accepted
          type:
            - string
            - 'null'
          format: decimal
        signer:
          type: string
        subaccount_id:
          type: integer
          format: int64
        time_in_force:
          $ref: '#/components/schemas/TimeInForce'
        trigger_price:
          description: >-
            Optional decimal string of the human value (e.g. `"1.5"`), up to 12
            fractional digits, or null; a string or JSON number is accepted
          type:
            - string
            - 'null'
          format: decimal
        trigger_price_type:
          anyOf:
            - $ref: '#/components/schemas/TriggerPriceType'
            - type: 'null'
        trigger_reject_message:
          type:
            - string
            - 'null'
        trigger_type:
          anyOf:
            - $ref: '#/components/schemas/TriggerType'
            - type: 'null'
    AlgoType:
      type: string
      enum:
        - twap
    CancelReason:
      type: string
      enum:
        - ''
        - user_request
        - mmp_trigger
        - insufficient_margin
        - signed_max_fee_too_low
        - cancel_on_disconnect
        - ioc_or_market_partial_fill
        - session_key_deregistered
        - subaccount_withdrawn
        - compliance
        - trigger_failed
        - validation_failed
        - algo_completed
    Direction:
      type: string
      enum:
        - buy
        - sell
    OrderStatus:
      type: string
      enum:
        - open
        - filled
        - rejected
        - cancelled
        - expired
        - untriggered
        - algo_active
    OrderType:
      type: string
      enum:
        - limit
        - market
    TimeInForce:
      type: string
      enum:
        - gtc
        - post_only
        - fok
        - ioc
    TriggerPriceType:
      type: string
      enum:
        - mark
        - index
    TriggerType:
      type: string
      enum:
        - stoploss
        - takeprofit

````

## Related topics

- [Cancel a single order by id](/api-reference/orderbook/cancel-a-single-order-by-id.md)
- [Look up an operation's on-chain status](/api-reference/system/look-up-an-operations-on-chain-status.md)
- [Cancel a trigger order by id](/api-reference/orderbook/cancel-a-trigger-order-by-id.md)
