> ## 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 account's open orders

> Retrieve all currently open perp and spot orders for a specific account.
Each order row carries `asset_type`; use `?asset_type=perp|spot` to filter.
Includes limit orders, stop orders, and TP/SL orders attached to positions. Supports pagination.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/open_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/open_orders:
    get:
      tags:
        - Account
      summary: Get account's open orders
      description: >-
        Retrieve all currently open perp and spot orders for a specific account.

        Each order row carries `asset_type`; use `?asset_type=perp|spot` to
        filter.

        Includes limit orders, stop orders, and TP/SL orders attached to
        positions. Supports pagination.
      operationId: handle_open_orders
      parameters:
        - name: account
          in: query
          description: User account address (`user` query alias is also accepted)
          required: true
          schema:
            type: string
        - name: asset_type
          in: query
          description: >-
            Optional asset_type filter (`"perp"` | `"spot"`). Omit to UNION
            both.

            Each row carries an `asset_type` field for client-side demux.
          required: false
          schema:
            $ref: '#/components/schemas/AssetType'
          example: perp
        - name: limit
          in: query
          description: Page size
          required: false
          schema:
            type: integer
            format: int32
            default: 10
            maximum: 1000
            minimum: 0
          example: 100
        - name: offset
          in: query
          description: Page offset
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            maximum: 10000
            minimum: 0
          example: 0
      responses:
        '200':
          description: Open orders retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_OrderDto'
        '500':
          description: Database error
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
    PaginatedResponse_OrderDto:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            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
          description: The items in the current page
        total_count:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            The total number of items across all pages.

            Optional: history endpoints omit this field to avoid expensive
            COUNT(*) queries.
          minimum: 0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````