---
title: "Trading Performance"
method: GET
path: "/gateway/v1/hyperliquid/performance"
tags: ["Hyperliquid"]
---

# Trading Performance

`GET /gateway/v1/hyperliquid/performance`

Returns the connected user's lifetime trading-performance summary — the dashboard header: re-rolled realized performance (win rate, profit factor, gross/net PnL — **funding-excluded**, net = gross − fees), the live position snapshot, and account value.

This is a lifetime, point-in-time summary: it takes NO `from`/`to` window (use `/hyperliquid/trades` for windowed, paginated closed trades) and carries NO trade list. `account_value` is the live **perp clearinghouse** equity only — NOT total portfolio; for total equity incl. spot/vault use `/hyperliquid/account` (`total_value_usd`). Sections degrade independently: a failed section is named in `errors[]` and the call still returns 200. A genuinely flat perp account returns `account_value` 0 with no `errors[]`; the field is omitted only when the snapshot section degraded (which also adds an `errors[]` entry) — so detect degradation via `errors[]`, not a 0 value.

## Query parameters

- `address` string, required — Wallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported.
- `dex` string — NOT SUPPORTED on /performance — returns 400 if set. The lifetime summary always spans ALL markets; market scoping lives on /trades/aggregate (dex=...).

## Response `200`

OK

- DataObjectResponseHyperliquidPerformanceView
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `data` HyperliquidPerformanceView, required
    - `account_value` number, double — Live PERP clearinghouse equity, USD (from the snapshot) — not total portfolio (spot/vault excluded; see /hyperliquid/account.total_value_usd). A genuinely flat/empty perp account returns 0 with NO errors[] entry; the field is OMITTED only when the snapshot section degraded (which also adds an errors[] entry) — so detect degradation via errors[], not a 0 value.
    - `address` string, required — Wallet address (lowercased)
    - `errors` HyperliquidSectionError[], nullable — Sections whose fetch failed (gap_fill, snapshot, ledger); omitted when everything succeeded
      - `reason` string, required — Short reason for the failure
      - `section` string, required — Section that failed: perp, spot, vaults, staking, or pricing (the HYPE-mark lookup that values total_value_usd)
    - `open_positions` HyperliquidPosition[], nullable, required — Live open positions from the clearinghouse snapshot (empty when the snapshot section degraded — see errors[])
      - `cum_funding` HyperliquidCumFunding, required
        - `all_time` number, double, required — Funding since the account opened, USD
        - `since_change` number, double, required — Funding since this position last changed, USD
        - `since_open` number, double, required — Funding since this position was opened, USD
      - `distance_to_liquidation` number, double — Fraction the mark must move to reach the liquidation price (e.g. 0.05 = 5%), always positive — a RELATIVE fraction, not an absolute price/USD distance. Omitted when there is no liquidation price.
      - `entry_price` number, double, required — Average entry price, USD
      - `leverage_type` string, required — cross or isolated
      - `leverage_value` integer, required — Leverage used
      - `liquidation_price` number, double — Liquidation price, USD. Omitted when Hyperliquid returns none upstream — common for cross positions whose spot collateral backstops them; fall back to the account-level margin_ratio for proximity.
      - `margin_used` number, double, required — Margin on this position, USD
      - `mark_price` number, double, required — Current mark price, USD (= position_value / |size|)
      - `max_leverage` integer, required — Max allowed leverage for this market
      - `position_value` number, double, required — Current value, USD
      - `return_on_equity` number, double, required — Return on equity (0.45 = 45%)
      - `side` string, required — long or short
      - `size` number, double, required — Position size; positive = long, negative = short
      - `symbol` string, required — Market id (BTC, kPEPE, xyz:GOLD)
      - `unrealized_pnl` number, double, required — Unrealized profit/loss, USD
    - `partial` boolean, required — true when one or more upstream sections degraded (= errors[] is non-empty); the present sections are still returned
    - `performance` HyperliquidWalletPerf
      - `avg_loss` number, double — Average net_pnl of losing trades, USD (negative); omitted when there are no losses
      - `avg_win` number, double — Average net_pnl of winning trades, USD; omitted when there are no wins
      - `fees` number, double, required — Sum of episode fees, USD
      - `first_trade` integer, required — Earliest episode close (Unix seconds); 0 when no trades
      - `gross_pnl` number, double, required — Sum of episode gross_pnl, USD
      - `last_trade` integer, required — Latest episode close (Unix seconds); 0 when no trades
      - `losses` integer, required — Episodes with net_pnl < 0
      - `net_pnl` number, double, required — Sum of episode net_pnl, USD (funding excluded)
      - `profit_factor` number, double — Total win PnL / total loss PnL; omitted when there are no losses
      - `scratches` integer, required — Episodes with net_pnl == 0
      - `trades` integer, required — Closed episodes (trades)
      - `volume_usd` number, double, required — Notional volume traded, USD
      - `win_rate` number, double, required — wins / trades (0-1)
      - `wins` integer, required — Episodes with net_pnl > 0
    - `total_unrealized_pnl` number, double — Sum of unrealized PnL across the live open positions, USD. Omitted when the snapshot section degraded (see errors[]); 0 for a flat account.
    - `traded_pairs` integer, required — Distinct markets this wallet has closed trades in (warehouse + live tail), e.g. for a breadth badge. 0 when the wallet has never traded.
    - `watermark` integer, required — Warehouse episode watermark = the boundary the live gap-fill resumes from (Unix SECONDS); 0 means full backfill
  - `meta` ObjectResponseMeta, required
    - `cached` boolean, required — Whether this response was served from cache
    - `credits_used` integer, required — Credits deducted for this request
    - `empty_reason` string — Hint explaining why the data array is empty, when applicable

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api.md) · [All operations](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/asksurf/asksurf-public-rest-api/revisions/498f461e81c4/schema)
