BlogDeveloper

Hyperliquid Builder Codes: Fees, Dashboards & Revenue

How Hyperliquid builder codes work: fee limits, user approval, adding a code to orders, live builder leaderboards (Flowscan), and revenue tracking.

HydromancerTeam
Hyperliquid Builder Codes: how they work and how to track your fees

A builder code lets your app add a small fee to the trades it sends to Hyperliquid for its users. The user approves the fee first, and it's paid to you onchain when the order fills.

That matters because it's how an app earns from the trades it brings, without running an exchange or making markets. You can add one to a trading app, bot, wallet or Telegram bot, and every order you send goes into Hyperliquid's order books. To track what your code earns, Hydromancer's builderFillsByTime returns every fill routed through your builder address over any time range from 28 July 2025, with the builder fee where one was charged, and the builderFills stream sends them live.

In the code, replace 0xYourBuilderAddress and the other placeholders with real addresses. If you don't write code, skip the code blocks and you'll still follow along.

If you'd rather see the proof first, you can skip straight to the Test and Validation section. It covers the testnet attempt, where the builder figures came from, how the official daily files were checked and how one day of fills was counted three ways.

This guide covers:

  1. Why builders explore builder codes
  2. How builder codes work: approval, fee caps and what the user pays
  3. How users approve your fee
  4. How to check what a user has approved
  5. How to add your builder code to an order
  6. Four ways to track your builder code revenue

Why builders explore builder codes

Building a trading product usually starts with a hard problem: liquidity. Without enough buyers and sellers on the other side, your users' orders don't fill, and they leave.

With Hyperliquid's builder codes, you skip that problem. Whether you're building a trading app, a bot, a wallet or a Telegram bot, every order you send goes into Hyperliquid's order books, the same ones its own app uses.

Your users get that liquidity from day one, and you can focus on making a great app.

Builder codes are what turn that app into a business. They let you earn a fee on the trades you bring, without running an exchange or making markets yourself:

#1: You set the fee

You choose the fee order by order, up to 0.1% on perps and 1% on spot, and never above what the user approved.

#2: The fee is paid onchain

Hyperliquid takes your fee as part of its own fee logic when each order fills, so you never have to bill users.

#3: A builder code isn't a referral code

Referrals pay you 10% of a referred user's fees, less any discount they get, and only for their first $1B in volume. A builder code is your own fee, on every filled order you send with it.

#4: What one large builder earned from builder fees

For a sense of scale, one large builder had earned about 27.5 million USDC in builder fees by 21 October, according to Hyperliquid's own referral request. On 19 October alone, fills from more than 4,200 wallets paid it about 39,674 USDC.

How Hyperliquid builder codes work

The basics:

#1: The user approves a maximum fee first

The user signs an ApproveBuilderFee action with their main wallet. An API wallet (a separate key that can trade for them) can't approve it.

The user can revoke the approval any time. Hyperliquid's app also has a Builder Code Approvals page.

#2: You add your code to each order

Every order your app sends can carry {"b": your_address, "f": fee}.

f is in tenths of a basis point, so 10 means 0.01%. You can change it order by order, up to what the user approved.

#3: There are caps on the fee

The builder fee is at most 0.1% on perps and 1% on spot. On spot, the fee only applies when the user sells, because builder fees are charged in the quote or collateral asset, such as USDC.

Each user can have up to 10 builder approvals active at once.

#4: The fee is added on top of Hyperliquid's own trading fee

In fill data, fee is the total paid, including builderFee. For one builder charging 0.05% on 19 October, a typical taker fill on Hyperliquid's own perps paid about 0.093% in total: 0.05% to the builder and about 0.043% to Hyperliquid.

#5: What your builder address needs, and how you claim earnings

Your builder address needs at least 100 USDC of account value in perps and must use the standard account mode. You claim earnings through the normal referral rewards claim.

How users approve your fee

In a web app, the user signs ApproveBuilderFee with their own wallet, usually once, the first time they trade through you. With the Python SDK it's exchange.approve_builder_fee(builder, "0.05%"), signed by the main wallet.

For a browser wallet in JavaScript, Privy's builder codes recipe shows the same step.

Signing it with an API wallet doesn't work. On testnet, the request was rejected with Must deposit before performing actions, because Hyperliquid treated the API wallet's own address as the user.

Check what a user has approved

Before you send an order with a fee, check the user's approval. If the fee on an order is higher than what they approved, the order is rejected.

Send {"type": "maxBuilderFee", "user": "0xUserWalletAddress", "builder": "0xYourBuilderAddress"} to Hyperliquid's info endpoint, https://api.hyperliquid.xyz/info.

The answer is a number in tenths of a basis point, so 10 means 0.01% and 100 means 0.1%. For a real builder and one of its users, it came back as 50, an approval of up to 0.05%.

Add your builder code to an order

With the Python SDK, the builder code is one extra argument. This excerpt places a small BTC buy on testnet.

wallet is the key that signs for the account (the main wallet or an API wallet), account is the trader's main wallet, and price sits far below the market, so the order rests on the book rather than fills. Cancel it afterwards with exchange.cancel("BTC", oid).

code
from hyperliquid.exchange import Exchange
from hyperliquid.utils import constants

# wallet: the signing key; account: the trader's main wallet
exchange = Exchange(wallet, constants.TESTNET_API_URL,
                    account_address=account)
result = exchange.order(
    "BTC", True, 0.0003, price, {"limit": {"tif": "Gtc"}},
    builder={"b": "0xYourBuilderAddress", "f": 10},  # 10 = 0.01%
)

One gotcha: if the user hasn't approved your builder, the request still comes back with "status": "ok". The error sits inside the order status instead:

json
{'error': 'Builder fee has not been approved.'}

So check each status, not just the top-level status. Our Hyperliquid API guide covers this and other silent rejections.

If you're new to signing orders, try this on testnet first; our Hyperliquid testnet guide shows how.

Hyperliquid builder code dashboards and leaderboards

Before pulling raw fills by API, you can check live builder code revenue, volume, and app rankings on public Hyperliquid dashboards:

Dashboard What it tracks Best for
Flowscan BuildersLive Hyperliquid builder code leaderboard, volume, fill counts, and daily/total fee revenueChecking top builder codes and inspecting individual builder addresses on Hyperliquid
DeFiLlama Hyperliquid BuildersBuilder fee and revenue rankings alongside broader DeFi protocol metricsComparing Hyperliquid builder apps against other on-chain protocols
ASXN HyperScreenerBuilder code fee breakdown, market share, and active user statsTracking frontend share across Hyperliquid trading apps

For our analysis of which frontends earn the most, see top Hyperliquid builders by revenue. To verify your own fills or reconcile payouts programmatically, use one of the four methods below.

How to track your builder code revenue

Hyperliquid's info API gives you a running total, but no request for every fill under your code over a time range you choose. You have four options.

You want… Use Covers
Your all-time totalOfficial referral requestOne number
Fills for one day, as a fileOfficial daily CSVOne file per day, see the caveat below
Fills and fees for any time rangeHydromancer builderFillsByTimeFrom 28 Jul 2025
Bulk history to analyseReservoir builder_fills filesDaily Parquet, from 28 Jul 2025

If you only want a dashboard of builder revenue across Hyperliquid, Flowscan's builders page already shows it, and we track the top builders by revenue on the blog.

1. Your all-time total

Send {"type": "referral", "user": "0xYourBuilderAddress"} to the info endpoint. The reply's builderRewards field is your total builder fees paid in USDC.

It's a single running number, with no breakdown by day, market or user.

2. The official daily CSV files

Hyperliquid also publishes each builder's fills as one compressed CSV file per day. The address is https://stats-data.hyperliquid.xyz/Mainnet/builder_fills/{builder}/{YYYYMMDD}.csv.lz4, and the builder address in it must be lowercase, or the request is refused.

Decompress the file with LZ4 and read it as a CSV; the builder_fee column holds your fee on each fill.

Check the time range before you trust the totals.

For several large builders, every file checked from 15 September onward stopped around midday UTC (between 11:50 and 12:15), so it held roughly the first half of the day. The 1 September files ran to midnight.

Check the first and last time in your own files.

One builder on 19 Oct 2026: the official daily CSV ends at 12:12 UTC with 21,018 fills and 17,628.47 USDC, while builderFillsByTime and Reservoir both cover the full day with 45,852 fills and 39,674.31 USDC

3. Any time range, by API

Hydromancer's REST API has builderFillsByTime, which returns the fills sent with your code between two times, with the user, market, price, size and builder fee.

builderFillsByTime returns up to 2,000 fills per request, so page through: add a cursor made from the last fill's time and txIndex, joined by an underscore, and stop when a page comes back short.

Send the request to https://api.hydromancer.xyz/info with your Hydromancer API key as a Bearer token in the Authorization header. Times are UTC milliseconds; this asks for all of 19 October 2026:

json
{
  "type": "builderFillsByTime",
  "builder": "0xYourBuilderAddress",
  "startTime": 1792368000000,
  "endTime": 1792454399999
}

For the same builder and the same day, 19 October, this returned 45,852 fills and 39,674 USDC in fees.

The official file for that day held 21,018 fills and 17,628 USDC, because it ended at 12:12 UTC. For each full hour both sources cover, the fill counts matched exactly.

A few fills come back with no fee amount (45 out of 45,852 that day). Count them separately and leave them out of the total rather than guessing.

Check feeToken too; every fill that day was paid in USDC.

4. Bulk history from Reservoir

If you want months of builder fills to analyse, Reservoir, Hydromancer's Hyperliquid historical data archive, has them as daily Parquet files. It's separate from the Hydromancer API: you don't need a plan or API key, but you do need an AWS account.

The bucket is requester-pays, so AWS bills you for requests and downloads.

Each venue has its own builder_fills folder, so Hyperliquid's own markets and each HIP-3 venue (such as xyz for Trade[XYZ]) are separate files.

This query uses the DuckDB setup from our Reservoir query guide. Write the builder address in lowercase, as it's stored that way.

code
SELECT coin, count(*) AS fills,
       round(sum(builder_fee), 2) AS fees
FROM read_parquet(
  's3://hydromancer-reservoir/by_dex/hyperliquid/fills/perp/'
  || 'builder_fills/date=2026-10-19/fills.parquet')
WHERE builder = '0xyourbuilderaddress'
GROUP BY coin ORDER BY fees DESC;

For that builder on 19 October, the hyperliquid, xyz and io builder files held 33,531, 12,310 and 11 fills. Together that's 45,852 fills and 39,674.31 USDC in fees, the same as builderFillsByTime.

Both totals match the figure from the top of this guide: about 39,674 USDC in builder fees for one builder on 19 October.

Test and Validation

The revenue figures in this guide describe one large builder. Its all-time total is as of 21 October 2026 and its fills are for 19 October 2026, so treat them as a picture of that moment.

What was tried on testnet

The fee approval was signed with an API wallet on testnet. The request was rejected with Must deposit before performing actions.

Where the builder figures came from

The all-time total of about 27.5 million USDC came from Hyperliquid's own referral request.

The total fee of about 0.093% is for one builder charging 0.05% on 19 October, on a typical taker fill on Hyperliquid's own perps. In fill data, fee is the total paid and includes builderFee.

The maxBuilderFee request was sent for a real builder and one of its users, and it came back as 50.

How the official daily files were checked

The official daily CSV files were downloaded on 21 October 2026 for several large builders. Every file checked from 15 September onward stopped between 11:50 and 12:15 UTC, and the 1 September files ran to midnight.

That result covers the files checked for those builders.

How one day was counted three ways

For one builder, 19 October 2026 was counted three ways: from the official daily CSV, from Hydromancer's builderFillsByTime and from the Reservoir builder_fills files.

builderFillsByTime returned 45,852 fills and 39,674 USDC in fees. The Reservoir files for hyperliquid, xyz and io held 33,531, 12,310 and 11 fills, which together is 45,852 fills and 39,674.31 USDC in fees.

The official file held 21,018 fills and 17,628 USDC and ended at 12:12 UTC. For each full hour that the official file and builderFillsByTime both cover, the fill counts matched exactly.

Of the 45,852 fills from builderFillsByTime, 45 came back with no fee amount. Every fill that day was paid in USDC.

FAQ

What is a builder code on Hyperliquid?

A builder address plus a fee that your app attaches to orders it sends for users. If the user has approved it, the fee goes to your address onchain when the order fills.

Do builder fees add to Hyperliquid's trading fees?

Yes. The user pays Hyperliquid's normal fee plus the builder fee, and a fill's fee field shows the total.

How much can a builder charge?

Up to 0.1% on perps and 1% on spot, and never more than the user approved.

Can an API wallet approve a builder fee?

No. The user must sign the approval with their main wallet.

How do I see every fill from my builder code?

Use the official daily CSV for a quick look and check where it ends. For full days and longer ranges, use builderFillsByTime or Reservoir.

Sources

[1] Hyperliquid docs: Builder codes
[2] Hyperliquid docs: Info endpoint
[3] Hyperliquid Python SDK: builder fee example
[4] Hydromancer docs: builderFillsByTime
[5] Hydromancer docs: Reservoir
[6] Privy: Builder codes recipe

Continue