> ## 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: '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: this API is REST only. Responses are computed from indexed data.
    Real-time data is pushed on the [WebSocket](/websocket/overview).
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:
  /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
                  message:
                    type: string
                  data:
                    type: object
                  total_count:
                    type: integer
                    nullable: true
                  next_cursor:
                    type: string
                    nullable: true
                  has_more:
                    type: boolean
                    nullable: true
              example:
                success: true
                message: User top trades
                data:
                  user: '0x010461c14e146ac35fe42271bdc1134ee31c703a'
                  window: all
                  sort: pnl
                  include_open: true
                  trades_coverage_start: '2025-09-10'
                  leverage_coverage_start: '2026-09-06'
                  trades:
                    - status: closed
                      trade_id: trade_BTC_02791f26
                      coin: BTC
                      direction: long
                      opened_at: '2025-10-12T14:46:34.492000Z'
                      closed_at: '2025-11-21T07:40:45.603000Z'
                      duration_s: 3430451
                      entry_px: 103770.63792050733
                      exit_px: 103862.81506672615
                      size: 1283.0431199996517
                      pnl: 861394.9388500022
                      pnl_pct: 0.6241430039239507
                      notional: 138012431.99626726
                      volume: 275366831.90262157
                      fees: 0
                      funding: 0
                      fills: 154269
                      leverage: null
                      leverage_type: null
                total_count: null
                execution_time_ms: 449.86
                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.