Aggregate an account's closed trades by the selected period. Returns period buckets containing trade counts, gross and net PnL, fees, win rate and separately reported funding context. Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0288 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
Up to 0.0288 credits / call
The final charge is based on confirmed usage. Unused reserved credits return to your available balance.
Surf
Hyperliquid Trade History Aggregate · Surf
Aggregate an account's closed trades by the selected period. Returns period buckets containing trade counts, gross and net PnL, fees, win rate and separately reported funding context. Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0288 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
You receive
Returns period buckets containing trade counts, gross and net PnL, fees, win rate and separately reported funding context. Here net PnL is gross PnL minus fees, excluding funding. Compare funding_status before combining it with funding-inclusive leaderboard figures.
Start with your task
Share [a Hyperliquid profile link] and choose one summary: [by day], [by coin], [price up or down], [trade size], or [time held]. Default: all available records by day. Add [start date] and [end date] for a shorter period. If the link doesn't identify the account, I'll ask.
Inputs & outputs
Inspect the current inputs, availability, and maximum charge before starting.
Input schema
Input schema
Field / Path
Type
Requirement
Meaning
queryParamsqueryParams
object
Required
Required fields
address
toqueryParams.to
string
Optional
Window end, inclusive, bounds close_time: Unix seconds, an ISO datetime, or a bare date — a bare date means the END of that UTC day, so from=X&to=X covers the whole day X. Defaults to now. Example: 2026-03-31.
Minimum length
1
dexqueryParams.dex
string
Optional
Market scope: main_dex for the native market only, omit to aggregate across ALL markets, or a builder market — one of: xyz, flx, vntl, hyna, km, abcd, cash, para, mkts. NOTE: the omit default differs from /leaderboard, where omitting dex means the native market only.
Options
main_dex, xyz, flx, vntl, hyna, km, abcd, cash, para, mkts
fromqueryParams.from
string
Optional
Window start, bounds close_time: Unix seconds, an ISO datetime (2026-03-01T12:00:00Z), or a bare date (= midnight UTC). Omit for full history. Example: 2026-03-01.
Minimum length
1
addressqueryParams.address
string
Required
Wallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported.
Minimum length
1
group_byqueryParams.group_by
string
Optional
Dimension to roll up by. day = UTC calendar day (the P&L calendar / equity-curve source); symbol = per market; direction = long vs short; size_bucket = notional-USD tiers; hold_bucket = holding-time tiers. Defaults to "day".
Default
day
Options
day, symbol, direction, size_bucket, hold_bucket
fill_gapsqueryParams.fill_gaps
boolean
Optional
group_by=day only: emit a zero row for every no-trade UTC day in the window so the calendar is dense. Requires from (a bounded window); ignored for other group_by values. Defaults to false.
Default
false
View raw JSON
{
"type": "object",
"required": [
"queryParams"
],
"properties": {
"queryParams": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"address"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"to": {
"type": "string",
"minLength": 1,
"description": "Window end, inclusive, bounds close_time: Unix seconds, an ISO datetime, or a bare date — a bare date means the END of that UTC day, so from=X&to=X covers the whole day X. Defaults to now. Example: 2026-03-31."
},
"dex": {
"enum": [
"main_dex",
"xyz",
"flx",
"vntl",
"hyna",
"km",
"abcd",
"cash",
"para",
"mkts"
],
"type": "string",
"description": "Market scope: main_dex for the native market only, omit to aggregate across ALL markets, or a builder market — one of: xyz, flx, vntl, hyna, km, abcd, cash, para, mkts. NOTE: the omit default differs from /leaderboard, where omitting dex means the native market only."
},
"from": {
"type": "string",
"minLength": 1,
"description": "Window start, bounds close_time: Unix seconds, an ISO datetime (2026-03-01T12:00:00Z), or a bare date (= midnight UTC). Omit for full history. Example: 2026-03-01."
},
"address": {
"type": "string",
"minLength": 1,
"description": "Wallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported."
},
"group_by": {
"enum": [
"day",
"symbol",
"direction",
"size_bucket",
"hold_bucket"
],
"type": "string",
"default": "day",
"description": "Dimension to roll up by. day = UTC calendar day (the P&L calendar / equity-curve source); symbol = per market; direction = long vs short; size_bucket = notional-USD tiers; hold_bucket = holding-time tiers. Defaults to \"day\"."
},
"fill_gaps": {
"type": "boolean",
"default": false,
"description": "group_by=day only: emit a zero row for every no-trade UTC day in the window so the calendar is dense. Requires from (a bounded window); ignored for other group_by values. Defaults to false."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
Result schema
Output fields have not been documented yet.
Additional notes
Aggregate an account's closed trades by the selected period
How to use this Tool
Use the deployed input fields below. Required fields must be supplied; optional filters narrow the result.
queryParams.to (Optional): Window end, inclusive, bounds close_time: Unix seconds, an ISO datetime, or a bare date — a bare date means the END of that UTC day, so from=X&to=X covers the whole day X. Defaults to now. Example: 2026-03-31.
queryParams.dex (Optional): Market scope: main_dex for the native market only, omit to aggregate across ALL markets, or a builder market — one of: xyz, flx, vntl, hyna, km, abcd, cash, para, mkts. NOTE: the omit default differs from /leaderboard, where omitting dex means the native market only.
queryParams.from (Optional): Window start, bounds close_time: Unix seconds, an ISO datetime (2026-03-01T12:00:00Z), or a bare date (= midnight UTC). Omit for full history. Example: 2026-03-01.
queryParams.address (Required): Wallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported.
queryParams.group_by (Optional): Dimension to roll up by. day = UTC calendar day (the P&L calendar / equity-curve source); symbol = per market; direction = long vs short; size_bucket = notional-USD tiers; hold_bucket = holding-time tiers. Defaults to "day".
queryParams.fill_gaps (Optional): group_by=day only: emit a zero row for every no-trade UTC day in the window so the calendar is dense. Requires from (a bounded window); ignored for other group_by values. Defaults to false.
What this Tool returns
Returns period buckets containing trade counts, gross and net PnL, fees, win rate and separately reported funding context.
Response fields and how to read them
The table follows the official response contract, including nested fields and useful response metadata. [] denotes an array item. Required means required within its parent object, not that a conditional parent always exists. A nullable type permits null; an optional field can be absent. Use the documented conditions below to distinguish missing, empty and zero values. Units and reporting windows apply only where explicitly documented.
Field, type and presence
Meaning and conditions
data.[].avg_loss
number; Optional within parent; format: double
Average net_pnl of losing trades, USD (negative); omitted when this group has no losses
data.[].avg_win
number; Optional within parent; format: double
Average net_pnl of winning trades, USD; omitted when this group has no wins
data.[].fees
number; Required within parent; format: double
Sum of episode fees, USD
data.[].funding_pnl
number; Required within parent; format: double
Sum of separately-attributed episode funding, USD (positive = received). Never included in net_pnl; check funding_status before use.
data.[].funding_status
string; Required within parent; enum: ["complete", "partial", "unavailable"]
Coverage of funding_pnl for episodes in this group.
data.[].gross_pnl
number; Required within parent; format: double
Sum of episode gross_pnl, USD (before fees)
data.[].key
string; Required within parent
Group identifier: a UTC date (YYYY-MM-DD) for group_by=day; the market id for symbol; long/short for direction; or the tier label (e.g. 10k-100k, 1h-1d) for size_bucket / hold_bucket
data.[].net_pnl
number; Required within parent; format: double
Sum of episode net_pnl, USD (funding excluded — gross_pnl − fees)
data.[].trade_count
integer; Required within parent; format: int64
Closed episodes (trades) in this group
data.[].volume_usd
number; Required within parent; format: double
Notional volume traded, USD (sum of opened_sz × entry price)
data.[].win_rate
number; Required within parent; format: double
Share of trades with net_pnl > 0 (0-1)
meta.cached
boolean; Required within parent
Whether this response was served from cache
meta.credits_used
integer; Required within parent; format: int64
Credits deducted for this request
meta.empty_reason
string; Optional within parent
Hint explaining why the data array is empty, when applicable
meta.has_more
boolean; Optional within parent
Whether more items may exist beyond this response. For offset-paged endpoints, continue with a larger offset. For time-series endpoints without offset/cursor controls, true means the requested time range hit an upstream cap; narrow from/to to continue. Omitted when exhaustion cannot be proven.
meta.limit
integer; Required within parent; format: int64
Maximum number of items returned in this response
meta.offset
integer; Required within parent; format: int64
Number of items skipped (pagination offset)
meta.total
integer; Optional within parent; format: int64
Total number of matching items (before pagination). Omitted when total is unknown.
meta.watermark
integer; Optional within parent; format: int64
Warehouse watermark (Unix seconds) this response was computed at, on warehouse-backed endpoints (e.g. Hyperliquid /trades/aggregate) — rows up to this time come from the warehouse, newer rows from the live tail. Omitted elsewhere.
Coverage, units and freshness
Here net PnL is gross PnL minus fees, excluding funding. Compare funding_status before combining it with funding-inclusive leaderboard figures.
Inspect any returned observation time, cache status, watermark, pagination and errors using their documented meanings. A successful request alone does not establish complete coverage. Where no freshness or completeness guarantee is documented, treat it as unknown. Saved Examples are historical and viewing them does not refresh data or execute a new call.
Data source and references
Surf supplies this endpoint through its Data API. Response contract and deployed Tool inputs reviewed on 2026-10-03 against official OpenAPI v0.2.102. This is a contract review date, not a data observation time. Coverage depends on the selected endpoint and request.
Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0288 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
See results day by day
Example request: [Summarize my closed Hyperliquid trades by day]. Account: [Hyperliquid profile link].
Example request: [Summarize my closed trades by coin from September 1 to September 30, 2026]. Account: [Hyperliquid profile link].
Share [a Hyperliquid profile link] and choose one summary: [by day], [by coin], [price up or down], [trade size], or [time held]. Default: all available records by day. Add [start date] and [end date] for a shorter period. If the link doesn't identify the account, I'll ask.
Compare trades by price direction
Example request: [Compare trades where I expected prices to rise with trades where I expected prices to fall over the last 30 days]. Account: [Hyperliquid profile link].
Questions about this tool.
Inputs, results and details to know before running it.
Share a [Hyperliquid profile link], then choose one way to summarize the closed trades, such as [by day] or [by coin]. By default, available records are summarized by day. For a shorter period, add [a start date] and [an end date]. If the link does not identify the account, I will ask for a profile link that does or a public wallet address.
Returns period buckets containing trade counts, gross and net PnL, fees, win rate and separately reported funding context.
Here net PnL is gross PnL minus fees, excluding funding. Compare funding_status before combining it with funding-inclusive leaderboard figures.
Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0288 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
Ask your agent to Aggregate an account's closed trades by the selected period. Provide the required inputs above. If Toolmu is already connected, reuse that connection; otherwise use the setup instructions on this page. Before a paid execution, the agent must read the current Tool contract and check availability, the credit ceiling, balance, budget and your authorization. It should then execute the Tool and explain the returned fields and limitations.
Inspect any returned observation time, cache status, watermark, pagination and errors using their documented meanings. A successful request alone does not establish complete coverage. Where no freshness or completeness guarantee is documented, treat it as unknown. Saved Examples are historical and viewing them does not refresh data or execute a new call.