# Hyperliquid Trader Profiler: PnL, Win Rate, Drawdown & Score (`metallic_pastry/hyperliquid-trader-profiler`) Actor

Profile any Hyperliquid wallet or the leaderboard's top N: 30-day and all-time PnL, time-weighted return, max drawdown, round-trip win rate, profit factor, funding, open positions with liquidation distance and a transparent smart-money score. Public info API, no login. Errors are free.

- **URL**: https://apify.com/metallic_pastry/hyperliquid-trader-profiler.md
- **Developed by:** [Simon Liarsgård](https://apify.com/metallic_pastry) (community)
- **Categories:** Developer tools, Integrations, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 trader profileds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Hyperliquid Trader Profiler: PnL, Win Rate, Drawdown & Score

**Turn any Hyperliquid wallet, or the top of the leaderboard, into one clean row per trader: 30-day and all-time PnL, time-weighted return, max drawdown, round-trip win rate, profit factor, funding, open positions with liquidation distance and a transparent smart-money score.**

Paste a few addresses or explorer links, or ask for the top 25 wallets of the month by PnL, and get structured data you can sort, filter and export. Everything comes from Hyperliquid's public info API and the public leaderboard stats. No login, no wallet connection, no browser.

**$0.01 per profiled trader. Invalid input, unknown addresses, API wallets, empty accounts and API errors are free.**

### Who it is for

- **Copy-trading and signal research:** shortlist wallets that are actually profitable over time, not just lucky this week.
- **Leaderboard screening:** rank the top 100 by PnL or ROI and see who did it with sane drawdowns and leverage.
- **Risk monitoring:** track leverage, margin usage and distance to liquidation for wallets you follow.
- **Dashboards and bots:** feed a sheet, a database or an alerting workflow on a schedule.

### How to use it

1. Add addresses to **Traders** (`0x…`, or a link from app.hyperliquid.xyz/explorer, hypurrscan.io or hyperdash.info), and/or set **Also profile the leaderboard's top N**.
2. Pick the leaderboard window (24 h, 7 d, 30 d, all time), sort (PnL, ROI, volume) and a minimum account value. Wallets with no trading volume in the window are left out, so balance changes alone can't top the ROI list.
3. Run. Each trader becomes one dataset item. The **Overview** view shows the headline numbers; **Detail** has everything.

Schedule it daily to build your own history of how wallets evolve.

### What you get per trader

- **Account:** equity (perp plus spot), account type (user, vault, sub-account), first seen date and age.
- **Performance windows** (24 h, 7 d, 30 d, all time): PnL, perp PnL, volume, start and end equity, time-weighted return and max drawdown in % and USD.
- **Daily stats (30 d):** profitable vs. losing days, best and worst day, daily volatility, annualized Sharpe.
- **Trading stats** from fills in the lookback: closed round trips, win rate, profit factor, expectancy, average and largest win and loss, median hold time, long vs. short results, maker share, fees and builder fees.
- **Per-coin breakdown:** volume, share, trips, win rate and net PnL per coin, plus best and worst coin.
- **Top wins and losses:** the best and worst closed round trips with entry, exit, size and hold time.
- **Funding:** paid, received and net, with the top coins.
- **Open positions:** side, size, notional, entry and mark price, unrealized PnL, leverage, margin mode, liquidation price and distance, funding since open. Account leverage, margin usage, long and short exposure and nearest liquidation.
- **Spot balances** and fee tier (14-day volume, taker and maker rate).
- **Smart-money score** (0 to 100) with each component's formula, inputs and points, a yes/no verdict against your thresholds, and behaviour **flags**.

#### Example (shortened)

```json
{
  "trader": "0xf5d81a135f756ca16544e53c20fc20643ec3ad53",
  "status": "ok",
  "accountType": "user",
  "accountValueUsd": 1936164.06,
  "pnl30dUsd": 173583.38,
  "return30d": 0.1042,
  "maxDrawdown30d": 0.0742,
  "allTimePnlUsd": 580230.91,
  "returnAllTime": 0.2552,
  "daily30d": { "profitableDays": 22, "losingDays": 8, "sharpeAnnualized": 3.41 },
  "trading": { "fills": 2000, "closedTrips": 26, "winRate": 0.5385, "medianHoldMinutes": 0.8, "fillsCapped": true },
  "account": { "accountLeverage": 1.99, "marginUsage": 0.6618, "openPositions": 27, "nearestLiquidationPct": 0.6224 },
  "smartMoneyScore": 58.2,
  "smartMoney": true,
  "flags": ["short_sample", "high_frequency"],
  "explorerUrl": "https://app.hyperliquid.xyz/explorer/address/0xf5d81a135f756ca16544e53c20fc20643ec3ad53"
}
```

### Input

| Field | Default | What it does |
|---|---|---|
| `traders` | | Addresses or explorer URLs. Duplicates are removed. |
| `leaderboardTopN` | 0 | Also profile the top N leaderboard wallets (0 = off, max 1000). |
| `leaderboardWindow` | `month` | `day`, `week`, `month` or `allTime`. |
| `leaderboardSortBy` | `pnl` | `pnl`, `roi` or `volume` within the window. |
| `leaderboardMinAccountValueUsd` | 10000 | Skip leaderboard wallets with less equity. |
| `maxTraders` | 100 | Hard cap per run. |
| `lookbackDays` | 30 | Window for fills and funding (1 to 365). |
| `maxFills` | 2000 | Fills read per trader (100 to 10,000). |
| `includeFunding` | true | Read funding payments. |
| `openPositionsInOutput`, `coinsInOutput`, `topTradesInOutput` | 10, 10, 5 | How many rows to list. |
| `minClosedTrips`, `minMonthReturn`, `minAllTimePnlUsd`, `minAccountValueUsd` | 20, 0.05, 10000, 10000 | Smart-money thresholds. |
| `concurrency` | 3 | Traders in parallel (1 to 5). |

Example:

```json
{
  "traders": ["0x25497a776b4ef14f83c664509e905ccb387c9741"],
  "leaderboardTopN": 25,
  "leaderboardWindow": "month",
  "leaderboardSortBy": "pnl",
  "leaderboardMinAccountValueUsd": 50000
}
```

### Methodology

**Returns and drawdown.** Hyperliquid's portfolio history gives equity and cumulative PnL points for each window. Return is time-weighted: each step's PnL change is divided by the equity at the start of the step and the steps are compounded, so deposits and withdrawals don't count as profit or loss. Steps that start below $10 of equity are skipped. Max drawdown is the deepest peak-to-trough fall of that compounded curve; the USD figure is the deepest fall in cumulative PnL.

**Daily stats.** The 30-day history is resampled to UTC days. A day counts as profitable or losing when PnL moved more than one cent. Sharpe is mean daily return over its standard deviation times √365, shown when there are at least 7 days.

**Round trips.** Perp fills are replayed per coin. A trip opens when a position leaves flat and closes when it returns to flat; a flip closes one trip and opens the next. Realized PnL and fees from all fills in the trip are summed, so partial closes are handled. Positions already open when the sample starts count toward PnL but have no known open time, and trips still open at the end are not counted as wins or losses. Win rate is wins over closed trips; profit factor is gross wins over gross losses.

**Fill sample.** Up to 2,000 fills cost one API request; more are paged backwards in time. Hyperliquid serves only the latest 10,000 fills per wallet, so for very active accounts the sample may cover minutes or hours rather than the full lookback. `trading.fillsCapped`, `sampleFrom`, `sampleDays` and the `short_sample` flag tell you when that happened. Portfolio returns and drawdown are not affected, because they come from the portfolio history.

**Funding.** Funding payments in the lookback are summed (up to 2,000 payments, starting from the beginning of the lookback; `funding.sampleCapped` tells you when the cap was hit).

**Positions.** Open perp positions come from Hyperliquid's main perp market. Trades on builder-deployed (HIP-3) markets appear in fills, funding and coin stats, but their open positions are not listed.

**Smart-money score.** Six components, each between 0 and 1, weighted and summed to 0 to 100:

| Component | Weight | Formula |
|---|---|---|
| profitability | 25% | `max(0, return30d) / (max(0, return30d) + 0.1)` |
| longTerm | 15% | `max(0, returnAllTime) / (max(0, returnAllTime) + 0.5)` |
| consistency | 20% | `(profitableDays + 1) / (profitableDays + losingDays + 2)` over 30 days |
| risk | 15% | `1 - min(maxDrawdown30d / 0.5, 1)` |
| winRate | 15% | `(wins + 1) / (wins + losses + 2)` over closed round trips |
| sampleSize | 10% | `min(closedTrips / 50, 1)` |

`smartMoney` is true when the trader meets all four thresholds: closed trips, 30-day return, all-time PnL and account value. Each check is listed in `smartMoneyCriteria`.

**Flags.** `vault`, `sub_account`, `inactive` (no fills in the lookback), `small_sample` (fewer closed trips than your threshold), `short_sample` (capped fills covering less than a day), `market_maker_like` (500+ fills, 80%+ maker volume), `high_frequency` (500+ fills a day), `high_leverage` (10x or more), `near_liquidation` (a position within 10% of liquidation), `concentrated_coin` (80%+ of volume in one coin), `funding_heavy` (net funding of $1,000+ and at least a quarter of the 30-day PnL), `in_drawdown` (all-time PnL more than 20% below its peak), `losing_30d`.

### Pricing

Pay per event:

- **$0.01 per profiled trader** (`trader-profiled`).
- **Free:** invalid input, addresses that have never used Hyperliquid, API wallets (the item points you to the owner account), accounts with no equity and no activity, and traders that fail because of an API error. They appear as items with a `status` and an `errorCode` so you can see what happened.
- A tiny start fee of $0.00005 per run.

100 traders cost about $1. If you set a maximum cost per run, the actor stops before going over it and lists the traders it skipped in the run summary.

### Speed

Requests are paced to stay well inside Hyperliquid's public rate limit, which is shared by everyone calling from the same IP. A typical trader takes a few API calls, so expect roughly 2 to 4 traders a minute; raising `maxFills` makes very active wallets slower.

### Run summary

The `RUN_SUMMARY` record in the key-value store lists profiled, charged, free and skipped counts, plus request, retry and rate-limit stats.

### Data source and limits

- Data comes from Hyperliquid's public info API (`api.hyperliquid.xyz/info`) and the public leaderboard stats file. Nothing requires an account or a key.
- Mainnet only.
- Numbers are as of the moment the actor runs. Leaderboard values can lag the live API slightly.
- The `leaderboard.roi` field is Hyperliquid's own figure and can be huge for accounts that started tiny and were topped up later. The actor's `return30d` is time-weighted, so the two can differ a lot; when they do, the time-weighted number is the one that reflects trading.
- Display names come from the leaderboard and are only shown for wallets that appear there.

### Disclaimer

This actor is an independent tool and is not affiliated with, endorsed by or sponsored by Hyperliquid or Hyper Foundation. It only reads publicly available data. Nothing it outputs is financial or investment advice. Past performance does not predict future results, and leveraged perpetual futures can lose more than you expect. Check the rules that apply to crypto derivatives where you live before trading.

# Changelog

This Actor's version history is a separate document: https://apify.com/metallic_pastry/hyperliquid-trader-profiler/changelog.md

# Actor input Schema

## `traders` (type: `array`):

Hyperliquid addresses (0x…) or address URLs from app.hyperliquid.xyz/explorer, hypurrscan.io or hyperdash.info. Duplicates are removed. Invalid entries, unknown addresses and API wallets return a free item.

## `leaderboardTopN` (type: `integer`):

Pull the top N wallets from Hyperliquid's public leaderboard and profile them too. 0 = off. Wallets with no trading volume in the chosen window are skipped. Combine with window, sort and minimum account value below.

## `leaderboardWindow` (type: `string`):

Which leaderboard window to rank by.

## `leaderboardSortBy` (type: `string`):

Rank leaderboard wallets by PnL, ROI or traded volume within the window.

## `leaderboardMinAccountValueUsd` (type: `number`):

Skip leaderboard wallets with less equity than this. Keeps ROI rankings from being dominated by tiny accounts.

## `maxTraders` (type: `integer`):

Hard cap on traders profiled in one run (explicit plus leaderboard). Extra traders are skipped and not charged.

## `lookbackDays` (type: `integer`):

How far back fills and funding are read for trade statistics. Portfolio PnL, return and drawdown always cover 24 h, 7 d, 30 d and all time.

## `maxFills` (type: `integer`):

Fills read per trader for round trips, win rate and per-coin stats. Up to 2,000 costs one API call; more pages back further for very active wallets (Hyperliquid serves at most the latest 10,000).

## `includeFunding` (type: `boolean`):

Sum funding paid and received in the lookback (up to 2,000 payments), with the top coins.

## `openPositionsInOutput` (type: `integer`):

Largest open perp positions listed per trader (all are counted in the account summary).

## `coinsInOutput` (type: `integer`):

Per-coin breakdown rows per trader, by traded volume.

## `topTradesInOutput` (type: `integer`):

Best and worst closed round trips listed per trader.

## `minClosedTrips` (type: `integer`):

A trader needs at least this many closed round trips in the sample to be marked smart money.

## `minMonthReturn` (type: `number`):

Minimum time-weighted 30-day return as a fraction (0.05 = 5%).

## `minAllTimePnlUsd` (type: `number`):

Minimum all-time PnL on Hyperliquid.

## `minAccountValueUsd` (type: `number`):

Minimum current equity (perp plus spot).

## `concurrency` (type: `integer`):

Traders profiled in parallel. Requests are paced to stay inside Hyperliquid's public rate limit either way, so higher values rarely help.

## Actor input object example

```json
{
  "traders": [
    "0x25497a776b4ef14f83c664509e905ccb387c9741",
    "https://app.hyperliquid.xyz/explorer/address/0xf5d81a135f756ca16544e53c20fc20643ec3ad53"
  ],
  "leaderboardTopN": 25,
  "leaderboardWindow": "month",
  "leaderboardSortBy": "pnl",
  "leaderboardMinAccountValueUsd": 50000,
  "maxTraders": 100,
  "lookbackDays": 30,
  "maxFills": 2000,
  "includeFunding": true,
  "openPositionsInOutput": 10,
  "coinsInOutput": 10,
  "topTradesInOutput": 5,
  "minClosedTrips": 20,
  "minMonthReturn": 0.05,
  "minAllTimePnlUsd": 10000,
  "minAccountValueUsd": 10000,
  "concurrency": 3
}
```

# Actor output Schema

## `overview` (type: `string`):

Default dataset, Overview view: equity, PnL, return, drawdown, win rate and smart-money score per trader.

## `detail` (type: `string`):

Default dataset, Detail view: every field including windows, daily stats, trading stats, funding, open positions, coins and top trades.

## `runSummary` (type: `string`):

RUN_SUMMARY record in the default key-value store: profiled, charged and free counts plus API request and weight stats.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "traders": [
        "0x25497a776b4ef14f83c664509e905ccb387c9741"
    ],
    "leaderboardTopN": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("metallic_pastry/hyperliquid-trader-profiler").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "traders": ["0x25497a776b4ef14f83c664509e905ccb387c9741"],
    "leaderboardTopN": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("metallic_pastry/hyperliquid-trader-profiler").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "traders": [
    "0x25497a776b4ef14f83c664509e905ccb387c9741"
  ],
  "leaderboardTopN": 0
}' |
apify call metallic_pastry/hyperliquid-trader-profiler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,metallic_pastry/hyperliquid-trader-profiler"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/eCPQcP3ecVLCv0s18/builds/11WsBtMZdwo3W8FhC/openapi.json
