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

# List completed trades

> Returns completed trades. Defaults to a 24h window if no time filters are provided.



## OpenAPI

````yaml /api-reference/openapi.json get /completed-trades/
openapi: 3.0.3
info:
  title: 'Hypedexer API: Indexed Data'
  version: 1.0.0
  description: >-
    API to query indexed Hyperliquid trading data.


    This API provides access to stored/indexed trading data:

    - **Fills**: Executed orders and fills (Spot-only or All = Spot + Perp)

    - **Analytics**: Aggregations and statistics based on indexed data

    - **Completed Trades**: Trade objects and their related fills

    - **Users**: User overviews, performance and activity

    - **Social Trading**: Per-trader equity curve, PnL calendar, account
    leverage and top trades

    - **Funding**: Funding rate history, user funding payments, predicted rates

    - **Liquidations**: Liquidation events with filters

    - **Overview**: Market dashboard metrics (volume, fees, traders, PnL)

    - **Spot**: Spot token metadata, pairs, and auctions

    - **TWAPs**: TWAP orders, execution stats and fills

    - **Vaults**: Vault details, summaries, equity, ledger


    > Note: No live streaming. Responses are computed from indexed data.
servers:
  - url: https://api.hypedexer.com
    description: Production, routed to the nearest region (EU or JP)
security:
  - ApiKeyAuth: []
tags:
  - name: Fills
    description: Fills endpoints.
  - name: Analytics
    description: Aggregations and stats.
  - name: Completed Trades
    description: Trades and fills.
  - name: Users
    description: User profiles.
  - name: Funding
    description: Funding rates and payments (HL-compatible).
  - name: Liquidations
    description: Liquidation events.
  - name: Overview
    description: Market dashboard metrics.
  - name: Spot
    description: Spot token metadata, pairs and auctions.
  - name: TWAPs
    description: TWAP orders, stats and fills.
  - name: Vaults
    description: Vault details, summaries, equity and ledger.
  - name: Social Trading
    description: >-
      Per-trader equity, PnL calendar, performance, account leverage and top
      trades.
  - name: Market history
    description: >-
      Historical Hyperliquid market microstructure: best bid/offer aggregates
      and spread statistics (April 2024 to February 2026), and the order book
      reconstructed minute by minute: April 2024 to February 2026 from our
      archive (top ~20 levels per side) and, since 23 September 2026, the full
      order book replayed from our own node. Served from the EU region.
paths:
  /completed-trades/:
    get:
      tags:
        - Completed Trades
      summary: List completed trades
      description: >-
        Returns completed trades. Defaults to a 24h window if no time filters
        are provided.
      parameters:
        - name: user
          in: query
          description: User address
          schema:
            type: string
        - name: coin
          in: query
          schema:
            type: string
        - name: direction
          in: query
          description: Trade direction
          schema:
            type: string
            enum:
              - long
              - short
        - name: start_time
          in: query
          schema:
            type: string
            format: date-time
        - name: end_time
          in: query
          schema:
            type: string
            format: date-time
        - name: min_pnl
          in: query
          description: Minimum PnL filter
          schema:
            type: number
        - name: max_pnl
          in: query
          description: Maximum PnL filter
          schema:
            type: number
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
        - name: sort_by
          in: query
          description: Sort field
          schema:
            type: string
            default: end_time
        - name: sort_dir
          in: query
          schema:
            type: string
            default: DESC
            enum:
              - ASC
              - DESC
        - name: X-API-Key
          in: header
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
                  total_count:
                    type: integer
                    nullable: true
                  next_cursor:
                    type: string
                    nullable: true
                  has_more:
                    type: boolean
                    nullable: true
              example:
                success: true
                message: 2 trades
                data:
                  - user: '0x4414fa41e91445894b1ef363148782c4788329c2'
                    coin: io:ANTH
                    direction: short
                    start_time: '2026-09-19T07:03:46.266000'
                    end_time: '2026-09-19T07:10:23.379000'
                    duration_s: 397
                    entry_price: 2158
                    exit_price: 2159.7
                    size_close: 0.011
                    pnl_realized: -0.0187
                    leverage_type: cross
                    position_value: 23.738
                    total_fills: 2
                    total_fees: 0.004274
                    avg_fill_price: 2158.85
                    first_fill_time: '2026-09-19T07:03:46.266000'
                    last_fill_time: '2026-09-19T07:10:23.379000'
                    total_volume: 47.494699999999995
                    trade_id: trade_io:ANTH_64b6df8e
                    close_hash: >-
                      0x08f54f4f98eaa2950a6f0444ba790802016e003533edc167acbdfaa257ee7c7f
                    created_at: '2026-09-19T07:10:23.879000'
                  - user: '0x0d27167884f7d478a55f376864c49ff4d2a323b7'
                    coin: NEAR
                    direction: short
                    start_time: '2026-09-19T07:08:00.011000'
                    end_time: '2026-09-19T07:10:22.849000'
                    duration_s: 142
                    entry_price: 3.711
                    exit_price: 3.7178999999999998
                    size_close: 52.9
                    pnl_realized: -0.36501
                    leverage_type: cross
                    position_value: 196.31189999999998
                    total_fills: 2
                    total_fees: 0.366263
                    avg_fill_price: 3.7144499999999994
                    first_fill_time: '2026-09-19T07:08:00.011000'
                    last_fill_time: '2026-09-19T07:10:22.849000'
                    total_volume: 392.98880999999994
                    trade_id: trade_NEAR_d4ceb6a1
                    close_hash: >-
                      0x4db069342f5294f44f2a0444ba79000202950019ca55b3c6f1791486ee566ede
                    created_at: '2026-09-19T07:10:23.354000'
                total_count: 2
                execution_time_ms: null
                next_cursor: null
                has_more: null
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your Hypedexer API key. Create one in the console at
        https://app.hypedexer.com. `Authorization: Bearer <key>` and the
        `api_key` query parameter are accepted as well.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.