PeumeAPI

Finance & crypto

Closed Trades Aggregate

Returns 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.

$0.036 per call

Call it

curl https://api.peume.com/v1/call/closed-trades-aggregate \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "address": "your address",
    "group_by": "day",
    "fill_gaps": false
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: closed-trades-aggregate.

Parameters

addressRequiredstring

Wallet address: a 0x EVM address or an ENS name (e.g. vitalik.eth). Solana addresses are not supported.

group_bystring

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".

day · symbol · direction · size_bucket · hold_bucket

Example: day

fromstring

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.

tostring

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.

dexstring

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.

main_dex · xyz · flx · vntl · hyna · km · abcd · cash · para · mkts

fill_gapsboolean

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.

Example: false

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.