Use Case 2: Find & Copytrade Wallets on Hyperliquid
Use Nansen API To Find and Copytrade Profitable Wallets on Hyperliquid
1. Scenario
Identify and replicate trades from successful perpetual traders on Hyperliquid by monitoring their positions and trade activity in real-time.
Goal: Build an automated copytrading system that:
Discovers profitable traders using the Hyperliquid leaderboard
Monitors their perpetual positions and recent trades
Replicates their trading activity in your own account
2. Solution
Use three Nansen API endpoints:
Perp Leaderboard (Link Here) - Discover top performing traders by PnL and ROI
Perp Positions (Link Here) - Monitor current open positions for selected wallets
Perp Trades (Link Here) - Track all trades executed by profitable wallets
Optional: Filter the leaderboard to smart money wallets only for higher quality signals.
Example workflow:
Discover top Smart Money traders from Step 1
Every 30 minutes to an hour:
Fetch recent trades (last 1 hour) for all traders
Identify new "Open" or "Add" Actions
Execute matching trades on your account
Every couple of hours
Check current positions vs tracked wallets
Close any positions where traders have exited
Rebalance position sizes if needed
3. Step-by-Step Guide
Step 1: Find Profitable Traders on Hyperliquid
Use the Perp Leaderboard endpoint to discover the most profitable perpetual traders over a specific timeframe.
Call the perp leaderboard endpoint:
curl -X POST "https://api.nansen.ai/api/v1/perp-leaderboard" \
-H "apiKey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"date": {
"from": "2025-10-01",
"to": "2025-10-31"
},
"filters": {
"total_pnl": { "min": 10000 },
"roi": { "min": 20 },
"account_value": { "min": 50000 },
"include_smart_money_labels": ["Fund", "Smart Trader"]
},
"pagination": { "page": 1, "per_page": 20 },
"order_by": [{ "field": "total_pnl", "direction": "DESC" }]
}'Process the response:
Extract
trader_addressfrom top performersNote their
total_pnl,roi, andaccount_valuefor rankingFilter by
trader_address_labelto identify known smart money walletsStore addresses for monitoring in the next steps
Example response:
{
"data": [
{
"trader_address": "0x28c6c06298d514db089934071355e5743bf21d60",
"trader_address_label": "Smart Money Trader [0x28c6c0]",
"total_pnl": 45230.50,
"roi": 35.2,
"account_value": 150000.0
}
],
"pagination": {
"page": 1,
"per_page": 20,
"total": 150
}
}Step 2: Monitor Current Positions
For each profitable trader identified, check their current open positions to understand what they're actively trading.
Call the perp positions endpoint:
curl -X POST "https://api.nansen.ai/api/v1/profiler/perp-positions" \
-H "apiKey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"address": "0x28c6c06298d514db089934071355e5743bf21d60",
"order_by": [{ "field": "position_value_usd", "direction": "DESC" }]
}'Process the response:
Identify active positions by
token_symbol(e.g., BTC, ETH, SOL)Note position direction from
size(positive = long, negative = short)Review
unrealized_pnl_usdto gauge current profitabilityCheck
leverage_valueto understand risk levelsUse
entry_price_usdandliquidation_price_usdfor position context
Key fields to monitor:
token_symbol: The perpetual contract being tradedsize: Position size (negative for short, positive for long)position_value_usd: Total position valueunrealized_pnl_usd: Current unrealized profit/lossleverage_value: Leverage multiplier usedentry_price_usd: Average entry pricemark_price_usd: Current market price
Step 3: Track Trading Activity
Monitor recent trades to identify entry and exit signals you can replicate.
Call the perp trades endpoint:
curl -X POST "https://api.nansen.ai/api/v1/profiler/perp-trades" \
-H "apiKey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"address": "0x28c6c06298d514db089934071355e5743bf21d60",
"date": {
"from": "2025-10-30T00:00:00Z",
"to": "2025-10-31T23:59:59Z"
},
"filters": {
"value_usd": { "min": 5000 }
},
"pagination": { "page": 1, "per_page": 100 },
"order_by": [{ "field": "timestamp", "direction": "DESC" }]
}'Process the response:
Identify new positions from trades where
action= "Open"Detect position increases where
action= "Add"Track exits where
action= "Close" or "Reduce"Note the
side(Long/Short) andtoken_symbolfor each tradeMonitor
price,size, andvalue_usdto replicate sizingCheck
closed_pnlto understand profitability of closed trades
Key fields for copytrading:
timestamp: When the trade occurredtoken_symbol: What contract was traded (e.g., BTC, ETH)side: Position direction (Long or Short)action: Trade action (Open, Add, Close, Reduce)price: Execution pricesize: Trade size in token unitsvalue_usd: USD value of the tradestart_position: Position size before this tradeclosed_pnl: Realized profit/loss (for closing trades)
Last updated
Was this helpful?