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

# Get apiv1orders

> Get single order details

Retrieve details of a specific order by order_id (perp + spot) or
client_order_id (perp only). The `market` parameter is one concrete market
address; spot and perp markets with the same base asset have different
addresses and are not combined. The response is the perp `OrderUpdate` shape;
for spot, the inner `order` DTO carries `asset_type: "spot"` and the spot
`time_in_force` field is populated.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/orders
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Account
    description: Account-specific endpoints and data
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Points
    description: Points-related account metrics
  - name: Trading Points
    description: Trading points endpoints
  - name: Trading Hz
    description: Trading Hz endpoints
  - name: Tier
    description: Tier information endpoints
  - name: Streaks
    description: User streak tracking endpoints
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
  - name: Affiliates
    description: Affiliate code and earnings endpoints
  - name: Campaigns
    description: On-chain reward campaign endpoints
paths:
  /api/v1/orders:
    get:
      tags:
        - User
      description: >-
        Get single order details


        Retrieve details of a specific order by order_id (perp + spot) or

        client_order_id (perp only). The `market` parameter is one concrete
        market

        address; spot and perp markets with the same base asset have different

        addresses and are not combined. The response is the perp `OrderUpdate`
        shape;

        for spot, the inner `order` DTO carries `asset_type: "spot"` and the
        spot

        `time_in_force` field is populated.
      operationId: handle_order
      parameters:
        - name: market
          in: query
          description: >-
            Concrete market address. Spot and perp markets with the same base
            asset

            have different addresses.
          required: true
          schema:
            type: string
          example: 0xmarket123...
        - name: account
          in: query
          description: Account address
          required: true
          schema:
            type: string
          example: 0x123...
        - name: order_id
          in: query
          description: Order ID (provide either this or client_order_id)
          required: false
          schema:
            type: string
          example: '12345'
        - name: client_order_id
          in: query
          description: >-
            Client order ID (provide either this or order_id). Spot orders do
            not

            support client_order_id — this lookup is perp-only.
          required: false
          schema:
            type: string
          example: client_order_abc
        - name: asset_type
          in: query
          description: |-
            Optional asset_type filter. Omit (default) to look up the order in
            both perp and spot tables — the first non-empty hit wins. Pass
            `"perp"` or `"spot"` to scope to one product.
          required: false
          schema:
            $ref: '#/components/schemas/AssetType'
          example: perp
      responses:
        '200':
          description: Order details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderUpdate'
components:
  schemas:
    AssetType:
      type: string
      description: >-
        Discriminator carried on DTOs that can mix perp and spot rows (markets,

        orders, trades, bulk orders, bulk order fills, and WebSocket payloads).

        Also accepted as a query parameter on REST endpoints that can filter to
        one

        product.


        Wire format is lowercase (`"perp"` / `"spot"`) and accepted

        case-insensitively on the request side via
        [`impl_case_insensitive_deserialize`].
      enum:
        - perp
        - spot
    OrderUpdate:
      type: object
      required:
        - status
        - details
        - order
      properties:
        details:
          type: string
        order:
          $ref: '#/components/schemas/OrderDto'
        status:
          type: string
    OrderDto:
      type: object
      required:
        - asset_type
        - parent
        - market
        - client_order_id
        - order_id
        - status
        - order_type
        - trigger_condition
        - order_direction
        - is_buy
        - is_reduce_only
        - details
        - is_tpsl
        - cancellation_reason
        - transaction_version
        - unix_ms
      properties:
        asset_type:
          $ref: '#/components/schemas/AssetType'
          description: >-
            `"perp"` or `"spot"` — discriminator so callers can mix perp and
            spot

            rows in the same response without ambiguity. Per-row, lowercase.
        cancellation_reason:
          type: string
        client_order_id:
          type: string
          description: Perp client order ID. Empty for spot orders.
        details:
          type: string
        is_buy:
          type: boolean
        is_reduce_only:
          type: boolean
          description: Perp reduce-only flag. Always false for spot orders.
        is_tpsl:
          type: boolean
          description: Perp TP/SL marker. Always false for spot orders.
        market:
          type: string
        order_direction:
          type: string
          description: >-
            Perp position direction. For spot, buy/sell maps to
            OpenLong/OpenShort

            because spot has no reduce-only concept.
        order_id:
          type: string
        order_type:
          type: string
          description: >-
            Perp order type. Empty for spot orders; use `time_in_force` for
            spot.
        orig_size:
          type:
            - number
            - 'null'
          format: double
        parent:
          type: string
          description: >-
            Perp parent order ID. Empty for spot orders, which are always
            top-level.
        price:
          type:
            - number
            - 'null'
          format: double
        remaining_size:
          type:
            - number
            - 'null'
          format: double
        size_delta:
          type:
            - number
            - 'null'
          format: double
        sl_limit_price:
          type:
            - number
            - 'null'
          format: double
          description: Perp TP/SL field. Null for spot orders.
        sl_trigger_price:
          type:
            - number
            - 'null'
          format: double
          description: Perp TP/SL field. Null for spot orders.
        status:
          type: string
        time_in_force:
          type: string
          description: >-
            Time-in-force tag for spot orders (`"GTC"` / `"POST_ONLY"` /
            `"IOC"`).

            Empty string for perp orders, which carry this signal in
            `order_type`

            instead. Surfaced separately because the spot engine reports it as a

            first-class field on every `OrderEvent`.
        tp_limit_price:
          type:
            - number
            - 'null'
          format: double
          description: Perp TP/SL field. Null for spot orders.
        tp_trigger_price:
          type:
            - number
            - 'null'
          format: double
          description: Perp TP/SL field. Null for spot orders.
        transaction_version:
          type: integer
          format: int64
          minimum: 0
        trigger_condition:
          type: string
          description: Perp trigger condition. Empty for spot orders.
        unix_ms:
          type: integer
          format: int64
          minimum: 0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````