How to Build a Hyperliquid Tax Report Tool
Build a Hyperliquid tax report tool: every trade, fee, funding payment, deposit and transfer for a wallet, and where each source's history stops. Tested.

A Hyperliquid tax report tool turns a wallet address into a full record of the tax year, sorted into the categories a tax professional asks for.
At tax time, a Hyperliquid trader needs a full list of what happened in the year: every trade with its fee, every funding payment, every deposit, withdrawal and transfer.
Crypto tax software usually gets that from an exchange export. Hyperliquid's own app has no full-year export (its docs point to a third-party exporter), but every one of those events is public, so a tool can build the report from a wallet address.
Users pay for a report they can trust, usually per report or per tax year. That trust depends on nothing being missing.
For one active wallet, Hyperliquid's API returned 38,702 fills and stopped in late August, though the wallet had been trading since April. A report built from it would be missing about four months of trades, with no error to say so.
If you'd rather see the proof first, you can skip straight to the Test and Validation section. It covers what was collected and when, how each count in the tables was reached, and what the test did not cover.
This guide covers:
- Why build a crypto tax report tool on Hyperliquid
- The four requests a report needs, how far back each one goes, and the categories the rows sort into
- How to pull a full year of trades, funding and transfers from Hyperliquid's API and Hydromancer's API
- Where Hyperliquid's ledger history goes further back
- How to check that the report adds up
Why build a crypto tax report tool on Hyperliquid?
#1: A wallet's records pile up fast
One active wallet, trading since April, had 159,800 fills and 25,689 hourly funding payments.
#2: Funding adds a row every hour
On Hyperliquid, funding is a payment every hour for every open position, and every one has to be in the report.
#3: No exchange keys to chase
Users paste a wallet address; there are no read-only API keys to create, expire or debug.
Four requests, four cut-off dates
The hard part isn't the format. It's making sure nothing is missing, because each kind of event comes from a different request, and each request stops at a different point in the past.
| What | Official request | How far back (official) | Hydromancer |
|---|---|---|---|
| Trades and fees | userFillsByTime | A wallet's most recent fills only | From 28 July 2025 |
| Funding | userFunding | Long; rows older than about a week merged per day | Hourly rows |
| Deposits, withdrawals, transfers | userNonFundingLedgerUpdates | Back to the account's first deposit | From 28 July 2025 |
| Vault moves | Same ledger request | Same | Same |
Once you have the four, your tool sorts every row into the categories a tax professional asks for.
How each category is taxed is a question for a local professional. Your tool's job is to make the categories complete and add up.
#1: Closed trades
Each fill carries closedPnl, the realized gain or loss, and fee. Perps and spot sells both land here.
#2: Funding payments
Funding payments are the hourly payments received or paid, kept separate from trading gains. Each row's amount is delta.usdc, positive when received.
#3: Trading fees
Trading fees, including any builder fees, get their own total.
#4: Rewards from staking and vaults
Staking rewards come from Hyperliquid's delegatorRewards (and delegatorHistory for delegation changes), whichever API you use for the rest. Vault payouts come from the ledger.
#5: Deposits, withdrawals and transfers
Deposits, withdrawals and moves between your own accounts aren't gains at all and must not be counted as one.
Each ledger row names its kind in delta.type (deposit, withdraw, send, spotTransfer and so on); for a send, compare user and destination with the wallet to see which way the money went.
Pull a full year of trades, funding and transfers
Both versions run the same loop over the three requests a report needs, paging forward from 365 days ago until nothing new comes back.

This guide is about collecting the data, not tax advice. The snippets are prototypes that prove each step works, not an app to copy as is; the request bodies and URLs are exact.
#1: A full year from the Hyperliquid API
On Hyperliquid's API, the loop below runs with a pause between pages so a big wallet doesn't use up the IP's rate limit:
import json, time, requests
URL, H, PAUSE = "https://api.hyperliquid.xyz/info", {}, 5 # stay in budget
USER = "0x77ee3604adbdefa66a817b3cf776412a6613a018"
for kind in ["userFillsByTime", "userFunding", "userNonFundingLedgerUpdates"]:
rows, start = {}, int(time.time() * 1000) - 365 * 86400000
while True:
page = requests.post(URL, headers=H, json={
"type": kind, "user": USER, "startTime": start}).json()
new = {json.dumps(r, sort_keys=True): r["time"] for r in page}
if not new.keys() - rows.keys():
break
rows, start = rows | new, page[-1]["time"]
time.sleep(PAUSE)
print(kind, len(rows), "rows since", time.ctime(min(rows.values()) / 1000))A full page of 2,000 fills weighs 120, so for steady paging a pause of 6 seconds or more keeps you under 1,200 a minute. The 5-second pause in this loop stayed inside because each request also takes time.
userFillsByTime 38702 rows since Sat Aug 22 13:10:02 2026
userFunding 1800 rows since Thu Apr 30 08:00:00 2026
userNonFundingLedgerUpdates 103 rows since Thu Apr 30 08:15:05 2026#2: A full year from the Hydromancer API
Hydromancer's API takes the same loop as Hyperliquid's, with the address changed and no pause:
import json, os, time, requests
URL, PAUSE = "https://api.hydromancer.xyz/info", 0
H = {"Authorization": "Bearer " + os.environ["HYDROMANCER_API_KEY"]}
USER = "0x77ee3604adbdefa66a817b3cf776412a6613a018"
for kind in ["userFillsByTime", "userFunding", "userNonFundingLedgerUpdates"]:
rows, start = {}, int(time.time() * 1000) - 365 * 86400000
while True:
page = requests.post(URL, headers=H, json={
"type": kind, "user": USER, "startTime": start}).json()
new = {json.dumps(r, sort_keys=True): r["time"] for r in page}
if not new.keys() - rows.keys():
break
rows, start = rows | new, page[-1]["time"]
time.sleep(PAUSE)
print(kind, len(rows), "rows since", time.ctime(min(rows.values()) / 1000))userFillsByTime 159800 rows since Thu Apr 30 08:48:04 2026
userFunding 25689 rows since Thu Apr 30 09:00:00 2026
userNonFundingLedgerUpdates 103 rows since Thu Apr 30 08:15:05 2026#3: A full year from both APIs, side by side
The table below shows what each loop returned and what it cost, for one active wallet's last 365 days.
| Hyperliquid API | Hydromancer API | |
|---|---|---|
| Trades found | 38,702, back to 22 Aug | 159,800, back to 30 Apr |
| Funding rows | 1,800 (older ones merged per day) | 25,689 (one per payment) |
| Ledger events | 103 | 103 |
| Time | 135 s | 26 s |
| Requests | 28 | 98 |
| Rate-limit cost | 2,615 weight of 1,200/min per IP | 980 points of 20,000/min (Growth plan) |
Both versions work, and the ledger and funding agreed: the same 103 ledger events, and funding totals that matched to the cent ($117,713.02 on both).
Hyperliquid merges funding older than about a week into one row per coin per day, so you lose the hour of each payment, not the money. If your users' rules need each payment with its time, use the hourly rows.
#4: Trades are where the two APIs part
For one active wallet's last 365 days, the two APIs agreed on the ledger and funding but not on trades.
This wallet's first ledger event was a deposit in late April. Hydromancer returned 159,800 fills going back to it.
Hyperliquid stopped in late August after 38,702: its fill requests only reach a wallet's most recent fills, and this wallet trades too much for that to cover the year.
A report on this wallet built from Hyperliquid's fills would be missing about four months of trades without any error to say so.
Hydromancer's history covers most traders but leaves out some very high-volume addresses, so check the trade counts for your heaviest users.
Each fill carries the fee and the token it was paid in (feeToken), so don't assume USDC. Spot pairs show as @ plus an index; look the name up in spotMeta.
Without Hydromancer, a year of history for an active trader comes from Hyperliquid's S3 archive (node_fills_by_block, raw files you download and index yourself) or from Reservoir's daily fill files (free from August 2025, you pay only AWS download charges; the trading journal guide compares both).
Ledger history: Hyperliquid goes further back
For trades, Hyperliquid's API was the one that ran out. For deposits, withdrawals and transfers, it is the one that reaches further back.
#1: Ledger history from the Hyperliquid API
For an account opened in December 2023, userNonFundingLedgerUpdates returned all 416 non-trade events back to that month: deposits, withdrawals, transfers, vault deposits and staking. Responses hold up to 500 rows, so page with startTime as the prototype does.
#2: Ledger history from the Hydromancer API
On Hydromancer's API, userNonFundingLedgerUpdates covers the same events, but Hydromancer's history begins on 28 July 2025, so it started in August 2025 for the account opened in December 2023.
#3: Ledger history side by side
The two ledgers matched for the active wallet's last 365 days, and differed for the account opened in December 2023.
| Hyperliquid API | Hydromancer API | |
|---|---|---|
| Ledger for an account opened in Dec 2023 | Back to Dec 2023 (416 events) | Back to Aug 2025 |
| Ledger for our year-long test wallet | 103 events | The same 103 |
For a multi-year report, take the ledger from Hyperliquid.
Checking the report adds up
Before giving users a report, reconcile it: starting balance plus deposits, minus withdrawals, plus realized PnL, plus funding, minus fees, plus rewards and the unrealized PnL of open positions should land near today's balance.
A gap means a missing event type, usually a transfer between sub-accounts or a vault move. Hyperliquid's portfolio request has account value history to compare against.
A report that reconciles is the one users trust enough to pay for, usually per report or per tax year. Keep the wallet address private and don't store more than you need.
Related reading
• How to get a Hyperliquid wallet's trade history
• How to build a trading journal for Hyperliquid
• Hyperliquid fees and revenue
• Hyperliquid historical data API & S3 archive
Test and Validation
The year of records in this guide was collected on 31 October 2026, from Hyperliquid's API and from Hydromancer's API. Treat the counts as a picture of that day.
What was runThe prototype collected one active wallet's last 365 days of trades, funding payments and ledger events from each API. That 365-day window stands in for a tax year in this guide.
The same loop ran against both APIs, with a 5-second pause between pages on Hyperliquid's API and no pause on Hydromancer's.
How each count was reachedEach count is the number of distinct rows the loop collected for one request. Each "back to" date is the time of the oldest row.
Hyperliquid's API returned 38,702 fills back to 22 August, 1,800 funding rows and 103 ledger events. Hydromancer's API returned 159,800 fills back to 30 April, 25,689 funding rows and 103 ledger events.
The wallet's first ledger event was a deposit in late April. The fills from Hydromancer's API went back to that deposit, and the fills from Hyperliquid's API began about four months later.
The two funding totals matched to the cent, at $117,713.02. Hyperliquid's API had merged the rows older than about a week into one row per coin per day, which is why it returned fewer rows.
The loop on Hyperliquid's API made 28 requests at a total weight of 2,615 in 135 seconds. With its 5-second pause it stayed inside the limit of 1,200 a minute per IP, because each request also takes time.
The loop on Hydromancer's API made 98 requests at a cost of 980 points in 26 seconds, against a limit of 20,000 a minute on the Growth plan.
Each loop ran more than once. Both times, 135 seconds and 26 seconds, are the middle value across that loop's runs.
The older account used for the ledger checkA second, older account was checked for its ledger history. It was opened in December 2023, and Hyperliquid's userNonFundingLedgerUpdates returned all 416 of its non-trade events back to that month.
On Hydromancer's API, the same account's ledger started in August 2025, because Hydromancer's history begins on 28 July 2025.
What the test did not coverThe year of records came from one wallet, and the longer ledger comparison from one older account.
The loop collects the rows. The guide has no code for sorting them into categories, for staking rewards or for the reconciliation check.
FAQ
Does Hyperliquid have a tax export?
Not in its own app. Hyperliquid's docs link a third-party exporter (Enigma's trade export).
A tool can also combine fills, funding and ledger updates from the API, which is what this guide does.
Why can't I get a year of trades from Hyperliquid's API?
Because fill requests stop at a wallet's most recent fills. For a wallet that trades a lot, those can cover less than a year.
The prototype above shows how to fill the gap. To see where a wallet's history stops, run it and read the oldest date it prints for each request.
How do I do my Hyperliquid taxes?
Start with a complete record of the year: every trade with its fee, every hourly funding payment, and every deposit, withdrawal and transfer.
Hyperliquid's app doesn't export that, so use a tool built on the API (like the one in this guide) or a crypto tax service that supports Hyperliquid, and check its totals against your account.
How each item is taxed depends on where you live, so take the record to a tax professional.
Is funding taxable?
That depends on where you live. We cover how to get the data, not how it's taxed.
Sources
- Hyperliquid docs: Info endpoint, Historical data
- Hydromancer docs: Tax and compliance tools guide, userFunding
Read next

Hyperliquid Frontend: Top Launch Checklist for Builders
Launch checklist for a Hyperliquid trading frontend: builder code fees, API wallet security, HIP-3 and HIP-4 markets, referrals, analytics and monitoring.

Hyperliquid Smart Money: How to Read Wallet Labels
Tell Hyperliquid market makers, delta-neutral wallets, vaults, whales and new wallets apart, and see why a wallet's label matters more than its size.

Deploy a HIP-3 Market on Hyperliquid: Guide for Builders
Step-by-step HIP-3 deployment on Hyperliquid: the 500k HYPE stake, the Dutch auction, registerAsset2, setOracle, margin tables, OI caps and fees.