> ## 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 user order history

> Retrieve paginated order history for a specific user including filled, cancelled, and expired orders.
Supports filtering by market, order type, status, side, reduce-only, and timestamp range.
Supports sorting by timestamp (default: descending). Page size is capped at 200.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/order_history
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: 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: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
paths:
  /api/v1/order_history:
    get:
      tags:
        - Account
      summary: Get user order history
      description: >-
        Retrieve paginated order history for a specific user including filled,
        cancelled, and expired orders.

        Supports filtering by market, order type, status, side, reduce-only, and
        timestamp range.

        Supports sorting by timestamp (default: descending). Page size is capped
        at 200.
      operationId: handle_account_order_history
      parameters:
        - name: account
          in: query
          description: User account address
          required: true
          schema:
            type: string
          example: 0x123...
        - name: pagination
          in: query
          description: Pagination parameters
          required: true
          schema:
            $ref: e45932a1-a46c-406d-a9c6-3a0c388c79e9
        - name: filter
          in: query
          description: Timestamp range filter
          required: true
          schema:
            $ref: 24e93dfc-f72d-4b88-9b3a-91162ef46f02
        - name: sorting
          in: query
          description: Sorting parameters
          required: true
          schema:
            $ref: 250c3ae3-9c34-48a6-b4be-a45159c4bc4d
        - name: market
          in: query
          description: Filter by market address
          required: false
          schema:
            type: string
        - name: order_type
          in: query
          description: >-
            Filter by order type (e.g. "Limit", "Market", "Stop Limit", "Stop
            Market")
          required: false
          schema:
            type: string
        - name: status
          in: query
          description: >-
            Filter by order status (e.g. "Open", "Filled", "Cancelled",
            "Expired")
          required: false
          schema:
            type: string
        - name: side
          in: query
          description: 'Filter by side: "buy" (long) or "sell" (short)'
          required: false
          schema:
            $ref: 103a553b-2c52-4c5a-aba3-3ed022aa3126
        - name: reduce_only
          in: query
          description: Filter by reduce-only flag
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Order history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_OrderDto'
        '500':
          description: Database error
components:
  schemas:
    PaginatedResponse_OrderDto:
      type: object
      required:
        - items
        - total_count
      properties:
        items:
          type: array
          items:
            type: object
            required:
              - 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:
              cancellation_reason:
                type: string
              client_order_id:
                type: string
              details:
                type: string
              is_buy:
                type: boolean
              is_reduce_only:
                type: boolean
              is_tpsl:
                type: boolean
              market:
                type: string
              order_direction:
                type: string
              order_id:
                type: string
              order_type:
                type: string
              orig_size:
                type:
                  - number
                  - 'null'
                format: double
              parent:
                type: string
              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
              sl_trigger_price:
                type:
                  - number
                  - 'null'
                format: double
              status:
                type: string
              tp_limit_price:
                type:
                  - number
                  - 'null'
                format: double
              tp_trigger_price:
                type:
                  - number
                  - 'null'
                format: double
              transaction_version:
                type: integer
                format: int64
                minimum: 0
              trigger_condition:
                type: string
              unix_ms:
                type: integer
                format: int64
                minimum: 0
          description: The items in the current page
        total_count:
          type: integer
          format: int32
          description: The total number of items across all pages
          minimum: 0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````