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

# Completed trades over full history

> Every round trip of one wallet over its whole history, with filters and sorts.



## OpenAPI

````yaml /data-api/openapi.json get /v1/accounts/{address}/completed-trades
openapi: 3.1.0
info:
  title: Hyperdash Data API
  version: v1
  description: >-
    Hyperliquid data from Hyperdash's own nodes and stored datasets; requests
    never call Hyperliquid's public API. Every response reports the credits it
    cost.
servers:
  - url: https://data.hyperdash.com
security: []
tags:
  - name: Accounts
  - name: Async jobs
  - name: Builders
  - name: Cohorts
  - name: HIP-3 dexes
  - name: Leaderboards
  - name: Lending
  - name: Liquidations
  - name: Markets
  - name: 'Markets: analytics'
  - name: 'Markets: funding'
  - name: 'Markets: liquidation and stop levels'
  - name: 'Markets: open interest and positioning'
  - name: 'Markets: order book'
  - name: 'Markets: prices and candles'
  - name: 'Markets: queue priority'
  - name: 'Markets: trades and flow'
  - name: 'Markets: TWAPs'
  - name: Network
  - name: Outcomes
  - name: Positions
  - name: Referrals
  - name: Snapshots
  - name: Spot
  - name: Staking
  - name: Traders
  - name: Vaults
paths:
  /v1/accounts/{address}/completed-trades:
    get:
      tags:
        - Accounts
      summary: Completed trades over full history
      description: >-
        Every round trip of one wallet over its whole history, with filters and
        sorts. A round trip is a position opened and fully closed.


        **Filters**

        - Filter by market, side, result and minimum notional. Notional is
        absolute size times entry price.

        - Sort by any of the columns the site shows for this table. The default
        is newest close first.


        **Coverage**

        - Wallets Hyperdash has admitted to the completed-trades table are
        covered: every wallet trading since about August 2025 and any wallet
        viewed on hyperdash.com. An older inactive wallet can have no rows.

        - Trades come from the fills archive (2025-03).

        - Your plan's history window applies and is given in
        `meta.history_from`. Trades closed before it are not delivered, counted
        or paged through, in every sort and order.

        - The first page pins the window for the query's cursor, so offsets stay
        stable while the window slides. A later page leaves out trades that have
        since aged out of it.

        - A cursor continues for up to a day past its window. After that, or
        once your plan's history is shorter than when the query started, it is
        refused with `history_limit`. Restart the query.


        **Paging**

        - Each page has `limit` trades. Pages start at offsets of at most
        10,000, as on the site, so one query reaches at most 10,000 plus `limit`
        trades.

        - `meta.truncated` means more trades exist. Narrow with a filter or
        reverse the order.

        - Pages are offsets into the live table, as on the site. Trades that
        close while you page shift newest-first pages, so a trade can repeat.
        `order=asc` walks stably.

        - `meta.total` is the number of matching trades when a filter is set,
        counted within your plan's history window on the first page and carried
        by the cursor. It is `null` without filters.


        **Notes**

        - These rows come from the completed-trades table on hyperdash.com, the
        source of its Completed Trades and Best Trades tabs and of `GET
        /v1/accounts/{address}/stats`.

        - `GET /v1/accounts/{address}/trades` has the same round trips by close
        time, at most 90 days per call, oldest first. Its `net_pnl` leaves out
        funding.

        - `net_pnl` is gross minus signed fees plus funding, so maker rebates
        add.

        - `fees` is the sum of absolute fees, as in `GET
        /v1/accounts/{address}/stats`.


        **Credits:** 300 per request + 2 per trade.


        **Scope:** `analytics:read`
      operationId: getWalletCompletedTrades
      parameters:
        - name: address
          in: path
          required: true
          description: 'Wallet address: `0x` followed by 40 hex characters.'
          schema:
            type: string
        - name: coin
          in: query
          required: false
          description: One market, for example `BTC` or `xyz:TSLA`. Not case-sensitive.
          schema:
            type: string
        - name: side
          in: query
          required: false
          description: '`long` or `short`. Leave it out for both.'
          schema:
            type: string
            enum:
              - long
              - short
        - name: result
          in: query
          required: false
          description: >-
            `win` is a net PnL above 0 and `loss` is a net PnL below 0. Leave it
            out for all trades.
          schema:
            type: string
            enum:
              - win
              - loss
        - name: min_notional
          in: query
          required: false
          description: >-
            Minimum notional in USD, which is absolute size times entry price:
            `1000`, `10000`, `100000` or `1000000`.
          schema:
            type: string
            enum:
              - '1000'
              - '10000'
              - '100000'
              - '1000000'
        - name: sort
          in: query
          required: false
          description: Sort column. Ties are ordered newest close first.
          schema:
            type: string
            default: close_time
            enum:
              - close_time
              - net_pnl
              - notional
              - duration
              - entry_px
              - exit_px
              - funding_pnl
              - coin
              - side
        - name: order
          in: query
          required: false
          description: Sort order.
          schema:
            type: string
            default: desc
            enum:
              - desc
              - asc
        - name: limit
          in: query
          required: false
          description: Trades per page.
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 100
        - name: cursor
          in: query
          required: false
          description: >-
            Opaque cursor from `next_cursor`. Keep the same filters, sort and
            limit.
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            X-Credits-Charged:
              schema:
                type: integer
            X-Credit-Price-Version:
              schema:
                type: integer
            X-Request-Id:
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - has_more
                  - next_cursor
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        coin:
                          type: string
                          description: Market.
                        side:
                          type: string
                          description: '`long` or `short`.'
                        open_time:
                          type: integer
                          description: Open time, in epoch milliseconds.
                        close_time:
                          type: integer
                          description: Close time, in epoch milliseconds.
                        duration_ms:
                          type: integer
                          description: Holding time, in milliseconds.
                        entry_px:
                          type: string
                          description: Average entry price. Decimal string.
                        exit_px:
                          type: string
                          description: Average exit price. Decimal string.
                        size:
                          type: string
                          description: Size closed, in base units. Decimal string.
                        max_size:
                          type: string
                          description: >-
                            Largest position size during the trade. Decimal
                            string.
                        notional:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Absolute `size` times entry price, in USD. This is
                            the `min_notional` and `sort=notional` measure.
                            Decimal string.
                        volume:
                          type: string
                          description: >-
                            Traded notional, entries plus exits, in USD. Decimal
                            string.
                        gross_pnl:
                          type: string
                          description: PnL before fees and funding. Decimal string.
                        funding_pnl:
                          type: string
                          description: Funding over the trade. Decimal string.
                        fees:
                          type: string
                          description: >-
                            Fees, the sum of absolute fees. Rebates are counted
                            as fees. Decimal string.
                        net_pnl:
                          type: string
                          description: >-
                            Net PnL, which is gross minus signed fees plus
                            funding. Decimal string.
                        fills:
                          type: integer
                          description: Fills.
                        maker_fills:
                          type: integer
                          description: Maker fills.
                        leverage:
                          type:
                            - integer
                            - 'null'
                          description: Leverage. `null` when not recorded.
                        is_cross:
                          type:
                            - boolean
                            - 'null'
                          description: >-
                            `true` when cross margin was used. `null` when the
                            leverage is not recorded.
                        builder:
                          type:
                            - string
                            - 'null'
                          description: >-
                            Builder code of the trade's orders. `null` when
                            none.
                        tx_index:
                          type:
                            - integer
                            - 'null'
                          description: Index of the closing transaction in its block.
                    description: Result rows.
                  has_more:
                    type: boolean
                    description: '`true` when another page follows.'
                  next_cursor:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Cursor for the next page, passed as `cursor`. `null` on
                      the last page.
                  meta:
                    type: object
                    description: >-
                      Response metadata. Its keys depend on the endpoint and are
                      described above.
        '400':
          description: 'Invalid parameter (also: a request body that is not valid JSON)'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Invalid, expired or revoked key
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Scope, plan, history or credit limit
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Price version changed, or a cursor's snapshot expired
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: >-
            Rate limited (Retry-After; free): request rate, concurrent requests
            (a request counts one slot per 1,000 rows it can return), or this
            server busy with your workspace's requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '502':
          description: Upstream data source failed (free; retry later)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Backend at capacity or temporarily unavailable (Retry-After)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '504':
          description: Upstream data source timed out (free; retry later)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - bearer: []
      x-codeSamples:
        - lang: curl
          source: >-
            curl -H "Authorization: Bearer $HYPERDASH_API_KEY"
            'https://data.hyperdash.com/v1/accounts/0x…/completed-trades?sort=net_pnl&limit=20'
components:
  schemas:
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - code
        - request_id
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        code:
          type: string
        detail:
          type: string
        hint:
          type: string
        request_id:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Your API key, sent as `Bearer hdk_sk_live_v1_…`.

````

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