# Hyperliquid Whale Tracker - Top Perp Trader Positions API (`gochujang/hyperliquid-whale-tracker`) Actor

Monitor top Hyperliquid perpetual traders' live positions, unrealized PnL, entry prices, and recent fills. Powered by Hyperliquid's public API.

- **URL**: https://apify.com/gochujang/hyperliquid-whale-tracker.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Hyperliquid Whale Tracker

> Monitor top **Hyperliquid** perpetual traders' live positions, unrealized PnL, leverage, and distance-to-liquidation. Track copy-trade targets, spot crowded longs/shorts, and get pinged when whales blow up. No API key required.

---

### What It Does

Hyperliquid is the largest on-chain perp DEX of 2025-26 with full position transparency — every trader's wallet, open positions, and fills are public. This Actor turns that firehose into a clean dataset:

- Real-time **open positions** per tracked trader (coin, size, direction, leverage)
- **Entry price, mark price, unrealized PnL, return-on-equity**
- **Distance-to-liquidation** in % — early-warning signal for cascading liquidations
- **Recent fills** (last N hours) with closed PnL + traded coins
- **Trader-level summaries**: account value, total notional, cross-leverage

---

### Why This Matters

Most top crypto traders broadcast their wallet on Twitter. Following their positions used to require manual checks on hyperdash.info. This Actor automates it for your bot/dashboard:

- **Copy-trade signals** — see what 0xWhaleX is long/short before they tweet
- **Liquidation cascades** — when major whales are 1% from liq, the chain reaction starts there
- **Crowded trade detection** — if 8/10 tracked whales are short BTC, that's contrarian gold

---

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `traders` | string[] | seed list | Wallet addresses to track. Empty = bundled seed of known public whales |
| `minPositionUsd` | integer | `10000` | Skip positions below this notional |
| `includeRecentFills` | boolean | `true` | Also fetch each trader's recent fills |
| `fillsLookbackHours` | integer | `24` | Fills time window |
| `sortBy` | string | `size_desc` | `size_desc`, `pnl_desc`, `pnl_asc`, `leverage_desc`, `distance_to_liq_asc` |
| `alertPnlUsd` | integer | `0` | Alert when any tracked position has \|PnL\| above this |
| `telegramBotToken` | string (secret) | — | Telegram bot token for alerts |
| `telegramChatId` | string | — | Chat ID to receive alerts |

#### Example: Track 5 whales, alert on $500K+ positions
```json
{
  "traders": ["0xabc...", "0xdef...", "0x111..."],
  "minPositionUsd": 500000,
  "sortBy": "size_desc",
  "alertPnlUsd": 1000000,
  "telegramBotToken": "<token>",
  "telegramChatId": "<chat>"
}
````

#### Example: Liquidation early warning

```json
{
  "minPositionUsd": 100000,
  "sortBy": "distance_to_liq_asc"
}
```

***

### Output

Two record types per trader:

**Position rows** (`_type: "position"`):

```json
{
  "_type": "position",
  "trader": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
  "coin": "BTC",
  "direction": "long",
  "position_size": 12.5,
  "position_size_usd": 859500,
  "leverage": 20,
  "leverage_type": "cross",
  "entry_px": 67800,
  "mark_px": 68760,
  "unrealized_pnl_usd": 12000,
  "return_on_equity_pct": 27.94,
  "liquidation_px": 64850,
  "distance_to_liq_pct": 5.69,
  "margin_used_usd": 42975
}
```

**Trader summary** (`_type: "trader_summary"`):

```json
{
  "_type": "trader_summary",
  "trader": "0x31ca8395cf837de08b24da3f660e77761dfb974b",
  "account_value_usd": 1245000,
  "total_position_notional": 6800000,
  "open_positions_count": 8,
  "long_count": 5,
  "short_count": 3,
  "total_unrealized_pnl_usd": 42500,
  "fills_count_recent": 23,
  "recent_realized_pnl_usd": 8400,
  "recent_volume_usd": 4200000,
  "recent_traded_coins": ["BTC", "ETH", "SOL", "HYPE"]
}
```

***

### Pricing

Pay-Per-Event (PPE):

- **$0.003 per trader scanned** (one charge regardless of position count)

Examples:

- Track 20 whales hourly: **$0.06/run** = $1.44/day = $44/month
- Track 100 whales: **$0.30/run**

***

### Use Cases

**Copy-trade scanner** — Pull top whales' positions every 5 min:

```bash
curl -X POST "https://api.apify.com/v2/acts/gochujang~hyperliquid-whale-tracker/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"traders": ["0x...", "0x..."], "minPositionUsd": 500000, "sortBy": "pnl_desc"}'
```

**Liquidation early-warning** — Pipe `distance_to_liq_pct < 2` rows to a Telegram bot for cascade alerts.

***

### Data Source

Live data via Hyperliquid's official public REST API: `https://api.hyperliquid.xyz/info`. Free, no auth, no rate limits at single-actor scale.

***

### Related Actors

- **[Smart Money Wallet Tracker](https://apify.com/gochujang/smart-money-tracker)** — Spot-market whale activity on Ethereum, Base, Arbitrum, BSC, Solana.
- **[CEX Funding Rate Aggregator](https://apify.com/gochujang/cex-funding-aggregator)** — Funding rates + OI + long/short ratio across CEX perps.
- **[Token Unlock Calendar](https://apify.com/gochujang/token-unlock-calendar)** — Upcoming VC unlocks with selling-pressure score.

***

### Feedback

If this Actor saves you time, a quick review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/hyperliquid-whale-tracker#reviews)

# Actor input Schema

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

Hyperliquid trader wallet addresses to monitor (0x... format). Empty = use the bundled seed list of known public whales.

## `vaults` (type: `array`):

Hyperliquid public vault addresses to track. Each emits a vault\_summary row (name/leader/APR/followers/TVL) plus all its positions. Empty + includeSeedVaults=true uses bundled seed.

## `includeSeedVaults` (type: `boolean`):

When vaults list is empty, use bundled seed list of well-known public HL vaults (currently HLP).

## `minPositionUsd` (type: `integer`):

Only return positions whose notional value exceeds this. 0 = include all.

## `includeRecentFills` (type: `boolean`):

Also fetch and emit each trader's recent fills (last 100). Adds detail but doubles API calls per trader.

## `fillsLookbackHours` (type: `integer`):

When recent fills enabled, only return fills from the last N hours.

## `sortBy` (type: `string`):

Sort order for position rows.

## `alertPnlUsd` (type: `integer`):

Alert when any tracked trader has a position with |unrealized PnL| above this. 0 = disabled.

## `telegramBotToken` (type: `string`):

Telegram bot token for alerts. Leave empty to disable.

## `telegramChatId` (type: `string`):

Chat ID to receive alerts.

## Actor input object example

```json
{
  "traders": [
    "0x31ca8395cf837de08b24da3f660e77761dfb974b",
    "0x0f7f9e6d18b07cee5d22a23fcf0816f4ea9c44a2"
  ],
  "vaults": [
    "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303"
  ],
  "includeSeedVaults": true,
  "minPositionUsd": 10000,
  "includeRecentFills": true,
  "fillsLookbackHours": 24,
  "sortBy": "size_desc",
  "alertPnlUsd": 0,
  "telegramChatId": ""
}
```

# 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": [
        "0x31ca8395cf837de08b24da3f660e77761dfb974b",
        "0x0f7f9e6d18b07cee5d22a23fcf0816f4ea9c44a2"
    ],
    "vaults": [
        "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/hyperliquid-whale-tracker").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": [
        "0x31ca8395cf837de08b24da3f660e77761dfb974b",
        "0x0f7f9e6d18b07cee5d22a23fcf0816f4ea9c44a2",
    ],
    "vaults": ["0xdfc24b077bc1425ad1dea75bcb6f8158e10df303"],
}

# Run the Actor and wait for it to finish
run = client.actor("gochujang/hyperliquid-whale-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "0x31ca8395cf837de08b24da3f660e77761dfb974b",
    "0x0f7f9e6d18b07cee5d22a23fcf0816f4ea9c44a2"
  ],
  "vaults": [
    "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303"
  ]
}' |
apify call gochujang/hyperliquid-whale-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gochujang/hyperliquid-whale-tracker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Hyperliquid Whale Tracker - Top Perp Trader Positions API",
        "description": "Monitor top Hyperliquid perpetual traders' live positions, unrealized PnL, entry prices, and recent fills. Powered by Hyperliquid's public API.",
        "version": "0.1",
        "x-build-id": "xA7FocO7qdcTCUEax"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gochujang~hyperliquid-whale-tracker/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gochujang-hyperliquid-whale-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/gochujang~hyperliquid-whale-tracker/runs": {
            "post": {
                "operationId": "runs-sync-gochujang-hyperliquid-whale-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/gochujang~hyperliquid-whale-tracker/run-sync": {
            "post": {
                "operationId": "run-sync-gochujang-hyperliquid-whale-tracker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "traders": {
                        "title": "Trader Addresses",
                        "type": "array",
                        "description": "Hyperliquid trader wallet addresses to monitor (0x... format). Empty = use the bundled seed list of known public whales.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "vaults": {
                        "title": "Vault Addresses (optional)",
                        "type": "array",
                        "description": "Hyperliquid public vault addresses to track. Each emits a vault_summary row (name/leader/APR/followers/TVL) plus all its positions. Empty + includeSeedVaults=true uses bundled seed.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeSeedVaults": {
                        "title": "Include Seed Vaults (HLP etc.)",
                        "type": "boolean",
                        "description": "When vaults list is empty, use bundled seed list of well-known public HL vaults (currently HLP).",
                        "default": true
                    },
                    "minPositionUsd": {
                        "title": "Min Position Size (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only return positions whose notional value exceeds this. 0 = include all.",
                        "default": 10000
                    },
                    "includeRecentFills": {
                        "title": "Include Recent Fills",
                        "type": "boolean",
                        "description": "Also fetch and emit each trader's recent fills (last 100). Adds detail but doubles API calls per trader.",
                        "default": true
                    },
                    "fillsLookbackHours": {
                        "title": "Fills Lookback Hours",
                        "minimum": 1,
                        "maximum": 720,
                        "type": "integer",
                        "description": "When recent fills enabled, only return fills from the last N hours.",
                        "default": 24
                    },
                    "sortBy": {
                        "title": "Sort Positions By",
                        "enum": [
                            "size_desc",
                            "pnl_desc",
                            "pnl_asc",
                            "leverage_desc",
                            "distance_to_liq_asc"
                        ],
                        "type": "string",
                        "description": "Sort order for position rows.",
                        "default": "size_desc"
                    },
                    "alertPnlUsd": {
                        "title": "Telegram Alert: |PnL| Threshold (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Alert when any tracked trader has a position with |unrealized PnL| above this. 0 = disabled.",
                        "default": 0
                    },
                    "telegramBotToken": {
                        "title": "Telegram Bot Token",
                        "type": "string",
                        "description": "Telegram bot token for alerts. Leave empty to disable."
                    },
                    "telegramChatId": {
                        "title": "Telegram Chat ID",
                        "type": "string",
                        "description": "Chat ID to receive alerts.",
                        "default": ""
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
