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

# Order history

> Endpoint providing order history by user address

This endpoint provides historical order data for Hyperliquid user addresses.

<Info>
  **Drop-in Replacement**

  This endpoint is a 1-1 replacement for the `historicalOrders` endpoint in Hyperliquid, with no limits on how far back you can query.

  We include two optional parameters, `startTime` and `endTime`, to facilitate flexible time range queries.
</Info>

<Warning>
  **30-day interval limit**

  The interval between `startTime` and `endTime` cannot exceed 30 days. Paginate by issuing successive requests with 30-day windows to cover longer ranges.

  If `startTime` and `endTime` are omitted, the endpoint returns the most recent orders.
</Warning>


## OpenAPI

````yaml /_openapi/go-src-api.json POST /api/v1/developer/trading/hyperliquid/info/order/history
openapi: 3.0.3
info:
  title: Hyperliquid API Server
  description: API server for Hyperliquid trading data including orders and fills
  version: 1.0.0
servers:
  - url: https://api.allium.so
    description: Production server
security: []
paths:
  /api/v1/developer/trading/hyperliquid/info/order/history:
    post:
      summary: Get order history
      description: Retrieve historical orders for a user with optional time filtering
      operationId: getOrderHistory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderHistoryRequest'
            example:
              type: historicalOrders
              user: '0x1234567890abcdef1234567890abcdef12345678'
              startTime: 1640995200000
              endTime: 1641081600000
      responses:
        '200':
          description: Order history retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HyperliquidGetOrderStatusResponse'
        '400':
          description: Bad request - Invalid type
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal server error
          content:
            text/plain:
              schema:
                type: string
      security:
        - APIKeyBearer: []
components:
  schemas:
    OrderHistoryRequest:
      type: object
      required:
        - type
        - user
      properties:
        type:
          type: string
          enum:
            - historicalOrders
          description: Request type - must be 'historicalOrders'
        user:
          type: string
          description: User's wallet address (hex string)
        startTime:
          type: integer
          format: int64
          description: >-
            Start time filter (Unix timestamp in milliseconds). The interval
            between startTime and endTime cannot exceed 30 days.
        endTime:
          type: integer
          format: int64
          description: >-
            End time filter (Unix timestamp in milliseconds). The interval
            between startTime and endTime cannot exceed 30 days.
    HyperliquidGetOrderStatusResponse:
      type: object
      properties:
        order:
          $ref: '#/components/schemas/HyperliquidOrder'
        status:
          type: string
          nullable: true
          description: Order status
        statusTimestamp:
          type: integer
          format: int64
          nullable: true
          description: Timestamp when status was last updated
    HyperliquidOrder:
      type: object
      properties:
        coin:
          type: string
          nullable: true
          description: Trading pair symbol
        side:
          type: string
          nullable: true
          description: Order side (A for long/buy, B for short/sell)
        limitPx:
          type: string
          nullable: true
          description: Limit price
        sz:
          type: string
          nullable: true
          description: Order size
        oid:
          type: integer
          format: int64
          nullable: true
          description: Order ID
        timestamp:
          type: integer
          format: int64
          nullable: true
          description: Order creation timestamp
        triggerCondition:
          type: string
          nullable: true
          description: Trigger condition for conditional orders
        isTrigger:
          type: boolean
          nullable: true
          description: Whether this is a trigger order
        triggerPx:
          type: string
          nullable: true
          description: Trigger price for conditional orders
        children:
          nullable: true
          description: Child orders (raw JSON)
        isPositionTpsl:
          type: boolean
          nullable: true
          description: Whether this is a position take-profit/stop-loss order
        reduceOnly:
          type: boolean
          nullable: true
          description: Whether this is a reduce-only order
        orderType:
          type: string
          nullable: true
          description: Order type
        origSz:
          type: string
          nullable: true
          description: Original order size
        tif:
          type: string
          nullable: true
          description: Time in force
        cloid:
          type: string
          nullable: true
          description: Client order ID
  securitySchemes:
    APIKeyBearer:
      type: apiKey
      in: header
      name: X-API-KEY

````