> ## 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.

# Top trades

> Best round-trip trades with ticker, direction, leverage, PnL, notional, entry/exit price and close date. Open positions can be ranked alongside closed ones (by unrealized PnL): they come back with `status: "open"`, no `closed_at`, and an `as_of` snapshot time.

Leverage on a closed trade comes from the first hourly snapshot taken while the position was open, so trades closed before **2026-09-06** return `leverage: null`. Round-trip trades are available from **2025-09-10**.



## OpenAPI

````yaml /api-reference/openapi.json get /users/{user}/top-trades
openapi: 3.0.3
info:
  title: HL Indexer 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: EU production
security: []
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.
paths:
  /users/{user}/top-trades:
    get:
      tags:
        - Social Trading
      summary: Top trades
      description: >-
        Best round-trip trades with ticker, direction, leverage, PnL, notional,
        entry/exit price and close date. Open positions can be ranked alongside
        closed ones (by unrealized PnL): they come back with `status: "open"`,
        no `closed_at`, and an `as_of` snapshot time.


        Leverage on a closed trade comes from the first hourly snapshot taken
        while the position was open, so trades closed before **2026-09-06**
        return `leverage: null`. Round-trip trades are available from
        **2025-09-10**.
      parameters:
        - name: user
          in: path
          required: true
          description: Trader address (0x + 40 hex, any case).
          schema:
            type: string
            example: '0x0000000000bdc2fd416def2d8688069052eb0f87'
        - name: limit
          in: query
          schema:
            type: integer
            default: 5
            minimum: 1
            maximum: 50
        - name: window
          in: query
          description: Rolling window on trade close time.
          schema:
            type: string
            default: all
            enum:
              - 7d
              - 30d
              - 90d
              - all
        - name: sort
          in: query
          description: >-
            `pnl` = biggest gains, `pnl_abs` = biggest moves either way,
            `notional` = largest positions, `loss` = worst losses.
          schema:
            type: string
            default: pnl
            enum:
              - pnl
              - pnl_abs
              - notional
              - loss
        - name: include_open
          in: query
          description: Rank currently open positions alongside closed trades.
          schema:
            type: boolean
            default: true
        - name: X-API-Key
          in: header
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    default: true
                  message:
                    type: string
                    default: OK
                  data:
                    type: object
                  execution_time_ms:
                    type: number
        '400':
          description: Invalid user address (expected 0x + 40 hex)

````