Closed Trades Aggregate
/hyperliquid/trades/aggregateReturns a wallet's closed trades rolled up server-side into one row per group — so the P&L calendar, per-symbol / direction / size attribution, and the realized equity curve are one call each instead of paging the whole trade history.
What to tell it
Say these in your message. Your AI agent fills them in when it runs the tool.
- AddressNeededWallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported.
- Group byOptionalDimension to roll up by. day = UTC calendar day (the P&L calendar / equity-curve source); symbol = per market; direction = long vs short; size_bucket = notiona…One of day, symbol, direction, size_bucket, hold_bucket
- FromOptionalWindow 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…
- ToOptionalWindow 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…
- DexOptionalMarket 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, pa…One of main_dex, xyz, flx, vntl, hyna, km, abcd, cash
- Fill gapsOptionalgroup_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…Like
false
Use it in chat
Paste this in chat with what you need, or type @ and pick it. Your AI agents also use it on their own when the work needs it.
@surf:/hyperliquid/trades/aggregateTopics
Derivatives & PerpsMore from Surf
All 105Bridge Protocol RankingList bridge protocols ranked by USD volume over a time range.2 credits a callToken DEX Trade HistoryReturns recent DEX swap events for a token contract address.4 credits a callKalshi TradesReturns individual trade records for a Kalshi market.4 credits a callClosed TradesReturns a wallet's closed round-trip trades — one row per open→close position lifecycle, with realized per-trade P&L (gross, net = gross −…4 credits a callExchange Trading PairsReturns trading pairs available on an exchange.1 credit a callToken Unlock ScheduleReturns token unlock time-series with cumulative amounts, allocation breakdowns, total supply denominator, and unlocked-supply percentage.2 credits a call