for ChatGPT, Claude, Perplexity…
PNL RECONCILIATION

Hyperliquid realized PnL: reconcile closedPnl, fees and funding

· Not tax advice

Compare realized PnL, fees and funding as separate components over the same period. The scanner reads the API’s closedPnl and fee fields from fills and delta.usdc from funding entries. Open-position unrealized PnL, deposits and withdrawals answer different questions.

Key facts
  • Fill-level closedPnl: a source field, not a completed tax computation or proof of full account coverage.
  • Fees: keep the fee token and check whether the number you compare already includes fees.
  • Funding: compare gross paid and received, not just the net; it comes from a separate endpoint.
  • Same basis: use the same wallet, period, timezone, activity scope and currency in both reports.

Realized versus unrealized PnL

Realized PnL relates to closed activity; unrealized PnL describes an open position at a valuation price. Hyperliquid’s entry-price and PnL documentation explains average entry and the app’s display calculations. Do not assume an app display, API field, tax report and account-equity change use identical definitions.

Whether and when a gain is reportable depends on jurisdiction, instrument and accounting treatment. This page explains data reconciliation. It does not settle mark-to-market elections, capital versus income treatment, or the correct tax form.

A worked example with matching sample CSVs

Fabricated BTC/USDC example: assume two closing fills report 120 and −20 USDC in closedPnl, with fees of 2 and 1 USDC. Funding entries show +5 and −8 USDC. There are no other rows in this example.

ComponentCalculationUSDC
Sum of fill closedPnl120 − 20100
Fees2 + 13
Funding receivedPositive funding entries5
Funding paidAbsolute value of negative entries8
Net funding5 − 8−3
Scanner’s combined reference result100 − 3 + 5 − 894

The final row assumes the starting 100 excludes both fees and funding. If a comparison total already includes either component, subtracting it again double-counts it. The 94 is an illustration of the scanner’s formula, not a taxable-gain classification or independent verification of a particular wallet.

Inspect the matching annual summary, fills CSV and funding CSV. All use fabricated data.

Checklist when two reports disagree

  1. Match the account. Main accounts, subaccounts and agent addresses are not interchangeable.
  2. Match the period. Use explicit UTC timestamps. Local calendar and fiscal years can cut across different trades.
  3. Match the currency. USDC reference amounts and local-currency gains can differ because of conversion and valuation.
  4. Check history coverage. Compare counts and first/last timestamps. API retention may exclude older activity even after pagination.
  5. Compare each component. Review closedPnl, fee amounts/tokens, funding received and funding paid independently.
  6. Inspect duplicates and scope. Check repeated imports and whether spot, vault, staking or transfers were included.
A matching net total is a useful check, not proof of completeness. Missing receipts and payments can cancel each other. Keep the individual ledgers and source records.

Get your reference totals

Run a free wallet preview, then compare the available UTC-year totals. Downloading live-data CSVs is a separate paid option. Read the CSV export guide for fields, samples and coverage limits, or use the Koinly reconciliation workflow.

Common questions

What is closedPnl in a Hyperliquid export?

closedPnl is a field returned on fills by the Hyperliquid Info API. This scanner sums that field for the retrieved records. It is distinct from an open position’s unrealized PnL, and its sum is not automatically a taxable gain or the account’s total return.

Is Hyperliquid funding included in trade fills?

The scanner retrieves funding from userFunding separately and reads the signed amount at delta.usdc. Compare funding receipts and payments separately from fill-level closedPnl and fees; check the definition of any app total before comparing.

Why does my tax software PnL differ from Hyperliquid?

First match the wallet, activity type, date range, timezone and reporting currency. Then compare source coverage, fees, funding and duplicate records separately. A mismatch does not by itself prove either system is wrong or identify an importer defect.

Does matching the PnL total prove my export is complete?

No. Offsetting omissions can leave the same net total. Check first and last timestamps, record counts, separate funding flows and all relevant accounts. The source API has retention limits, and a UTC-year summary may not match your local tax year.

Primary sources

Check the linked sources for the rules, integration limits and API definitions discussed on this page. A general source does not settle every classification question or verify every third-party integration behavior.

  1. Hyperliquid docs — Entry price and PnL Official explanation of average entry and app-level PnL displays. Compare display and API definitions before reconciling totals.
  2. Hyperliquid docs — Info endpoint Official read-only query definitions, returned fields and documented history limits for fills, funding and ledger activity.
  3. IRS — Frequently asked questions on virtual currency transactions US virtual-currency FAQ on taxable transactions, basis and valuation. Apply only where relevant to the activity and taxpayer.

How this page was produced