BlogDeveloper

How to Get a Hyperliquid Wallet's Trade History (API + Bulk)

Learn how to get a Hyperliquid wallet's trade history by API: userFills, paging with userFillsByTime, reaching older fills, and turning fills into PnL by market.

HydromancerTeam
How to Get a Hyperliquid Wallet's Trade History (API + Bulk)

A trading journal, a tax export or a PnL dashboard all start with the same thing: a wallet's complete trade history. On Hyperliquid, that history is the wallet's fills, one record each time an order executes, and getting every one of them takes more than one request.

Hyperliquid trade history: any wallet, not just yours

On a centralized exchange (CEX), the trade API usually covers only your own account. Hyperliquid runs its order books on-chain, so every wallet's trades are public:

Trade history on Hyperliquid Trade history on a CEX
Whose trades you can readAny wallet's,
through the free API
Usually only your
own account's
How you get itPublic API requests,
no key needed
Typically an API key
for your own account
What each trade includesPrice, size, side, fee
and realized PnL per fill
Depends on the exchange

That makes it possible to study any trader, audit a vault, or build analytics across many wallets.

Below, we get a wallet's latest fills, page further back, and turn fills into realized PnL by market. Then we look at how to reach history older than Hyperliquid keeps. Outputs are from our test runs.

Which request gets a wallet's fills

You want Use Reach
The latest fillsuserFillsUp to the 2,000 most recent
A time rangeuserFillsByTime2,000 per call; the docs say
the 10,000 most recent in total
TWAP slice fillsuserTwapSliceFillsUp to the 2,000 most recent
Every fill, any ageHyperliquid's S3 fill files (hl-mainnet-node-data)Hourly from 27 July 2025,
requester-pays, you parse them
Older historyHydromancer's APIFrom 28 July 2025
A one-off bulk exportReservoir daily filesFrom 28 July 2025

The limits come from Hyperliquid's info endpoint docs. If you want an alert the moment a wallet trades, rather than its history, see our whale tracker guide.

The examples are JSON request bodies. POST them to https://api.hyperliquid.xyz/info; no key is needed there. 0x… stands for the wallet address you want.

Step 1: Get a wallet's latest fills with userFills

The quickest way to see what a wallet traded is userFills. One request returns its most recent fills, newest first, for any public address:

json
{"type": "userFills", "user": "0x…"}
json
[{"coin": "UNI", "px": "7.1019", "sz": "8.1", "side": "A",
  "time": 1793004737139, "dir": "Close Long", "closedPnl": "-0.008181",
  "fee": "-0.000575", "tid": 1030060899931697, "feeToken": "USDC", …},
 …]

We used an active public wallet. Any address works; for a busy one, take a top address from Hyperliquid's leaderboard file, https://stats-data.hyperliquid.xyz/Mainnet/leaderboard. The response is a list of fills, newest first. If you get 2,000 back, you've hit the cap, and older fills aren't in this response. For an active wallet, that can be only a few days.

The fields you'll use:

Field Meaning
coinThe market: BTC , xyz:SP500 for HIP-3, @107 for a spot pair
px, szFill price and size, as strings
dirOpen Long , Close Short , Buy , Sell and so on
closedPnlRealized PnL from this fill, before fees
fee, feeTokenThe fee, usually in USDC. Negative means a rebate
crossedtrue for a taker fill, false for a maker fill
time, oid, tidFill time (ms), order ID, trade ID

Two things trip people up. closedPnl doesn't include fees, so subtract fee yourself, converting first if feeToken isn't USDC. And funding isn't in fills at all; it comes from userFunding. Our Hyperliquid fees guide explains how fees are set.

Step 2: Page further back with userFillsByTime

For more than the latest 2,000, userFillsByTime takes a startTime and an optional endTime, in milliseconds. It returns fills oldest first, 2,000 per call, so you page forward from where the last page stopped:

  • Restart on the last timestamp, not one millisecond after. Many fills can share a timestamp, so skipping ahead can skip fills.
  • Drop repeats by time, coin and trade ID after each restart. Trade ID alone can repeat.
  • Fix endTime before you start, so new fills don't shift the pages.
  • Stay within the rate limit. A full page costs 120 of the 1,200 request weight each IP gets per minute. See Hyperliquid rate limits.

Both fill requests also take aggregateByTime: true, which merges an order's partial fills into fewer rows. Use it for a cleaner journal. Leave it off when you need every trade ID, for example to match fills against your own order log.

Hyperliquid's docs say a wallet's 10,000 most recent fills are available this way. Across five wallets we tested, the real reach ran from about 12,000 to more than 78,000 fills, and the request stops without an error. For a busy wallet, that can still be just a few days.

Step 3: Turn fills into realized PnL by market

Sum closedPnl minus fee for each coin, and you have a wallet's realized result per market. Keep fills with non-USDC fees separate, or convert them first. Here it is for the wallet from Step 1, over its latest 2,000 fills:

Bar chart of one Hyperliquid wallet's realized PnL minus fees by market over its latest 2,000 fills. Six markets are positive, led by xyz:SP500 at about $11.7k; UNI and BTC are slightly negative.

Most of this wallet's result came from HIP-3 markets such as xyz:SP500. BTC ended slightly negative once fees were counted.

Before you show a number like this to users:

  • It's a window, not a lifetime. It covers only the fills you fetched.
  • Add funding from userFunding.
  • Fills record trades, not open positions. Current positions and unrealized PnL come from clearinghouseState.

Hyperliquid trade history older than 10,000 fills

Steps 1 to 3 use Hyperliquid's own API, and they're enough for a wallet whose history fits in its 10,000 most recent fills. For anything older, or for many wallets, here's what changes:

What you need Without Hydromancer (Hyperliquid's API only) With Hydromancer's API
Fills older than the latest 10,000Hyperliquid's S3 fill
files, hourly, which you
download and parse
yourself
userFillsByTime
from 28 July
2025, with the
same request body
Paging through long historiesRestart on
timestamps and
drop repeats
A cursor of the
last fill's time
and txIndex
("cursor": "{time}_{txIndex}",
sent instead of
startTime;
Hydromancer's fills
include txIndex)
Whole days of every wallet's tradesThe same S3 files:
every fill, hourly
Reservoir : free
daily Parquet files
of every fill
(requester-pays S3)
Win rate and per-trade statsCompute them from
fills ( portfolio
gives PnL history)
userPnlSummary :
realized PnL, win
rate, fees and
funding from fully
closed positions,
since 1 August 2025
Live fills from many walletsOne subscription
per wallet; the
docs allow 10
users per IP
(15 in our test)
One userFills
subscribe request
for up to 1,000
addresses; each
counts toward your
plan's
subscription total
(500 on Starter)

Example: the same request, sent to both

Take a wallet that trades thousands of times a day, and ask for its fills since 28 July 2025 (startTime in milliseconds). Both APIs take the same request body.

Without Hydromancer: POST this body to https://api.hyperliquid.xyz/info. Hyperliquid returns only the most recent fills it still keeps:

json
{"type": "userFillsByTime", "user": "0x…", "startTime": 1753660800000}
code
Hyperliquid, oldest fill still available: 22 Oct 2026

With Hydromancer: POST the same body to https://api.hydromancer.xyz/info, with the header Authorization: Bearer and your API key (Python's urllib also needs a User-Agent header, or the API returns 403). It reaches back to 28 July 2025:

code
Hydromancer, first fill returned: 28 Jul 2025

Each line is the first fill's time, shown as a date. Only the URL and the Authorization header changed. TWAP fills are merged in from 2 August 2025, and you can filter by builder or dex.

If Hyperliquid's API reaches back far enough for the wallet, stick with it. For older fills, use Hydromancer; for whole days of every wallet's trades, use Reservoir.

FAQ

Can I see anyone's trade history on Hyperliquid?

Yes. Every wallet's fills are public on Hyperliquid. Send userFills with any address to https://api.hyperliquid.xyz/info; no API key is needed.

Can I download a wallet's full trade history?

Hyperliquid's API returns a wallet's recent fills only. For older fills, use Hydromancer's API from 28 July 2025, Reservoir's daily files, or Hyperliquid's own S3 fill files if you're happy to parse them.

How far back does the Hyperliquid API keep a wallet's trade history?

Hyperliquid's docs say the 10,000 most recent fills are available through userFillsByTime. For an active wallet, that can be only a few days.

How many fills does userFills return?

At most 2,000, newest first. If you get exactly 2,000, page further back with userFillsByTime.

Does closedPnl include fees?

No. Subtract fee yourself, and get funding separately from userFunding.

Are TWAP fills included?

Hyperliquid has a separate request for them, userTwapSliceFills. Hydromancer's userFills and userFillsByTime merge TWAP and normal fills, from 2 August 2025.

Next steps

Continue