AArtery

PnL summary across every event the caller org has fills on

get/v1/me/pnl

Aggregates the canonical account-fill projection per (event × market) and returns realized PnL + an unrealized mark. Polymarket includes only maker-owned V2 OrderFilled rows for bound wallets; taker-only counterparty rows are excluded. **Realized PnL basis (QF-10754):** Hyperliquid uses the exchange-authoritative per-fill `closedPnl` (gross of fees, and already inclusive of spot — HL reports closedPnl on spot sells) — the SAME number as `/me/stats?roi=true` and `/v1/me/wallets/{id}/roi`, so the surfaces agree; non-HL providers (Polymarket) use a FIFO buy/sell cost-basis walk (no exchange closedPnl available). Open position / unrealized are still derived from the FIFO lot queue. Unrealized uses the resolved payoff (1 if YES, 0 if NO) when the event has resolved unanimously, otherwise the most recent observed trade price. Pass `groupBy=wallet` to partition by bound wallet or `groupBy=provider` to roll up by provider; the response keeps the same `{ total, data, pagination, applied }` envelope across all three groupings. Sort with a single `sort=` param (prefix `-` for descending). Cursor pagination via `limit`/`cursor` is supported only for `groupBy=event`; the bounded wallet/provider groups always return the full list.

PnL summary across every event the caller org has fills on · Artery API Docs