GET /api/prediction-wallet/pnl
Privy session → linked wallets; for each target (Polygon Polymarket + Solana DFlow as applicable) the Edge API calls the portfolio service, which refetches in-window trades and returns hourly series points. combined forward-fills each wallet’s series on the union of timestamps, then sums portfolio_value / realized_pnl / unrealized_pnl / total_pnl — use this JSON to render the PnL line in the client (no image is returned). Polymarket uses full on-chain history when the service has POLYGON_RPC_URL; without it, the public data-api is capped. Query: start, end (ISO or now), wallet, source (polymarket | dflow), starting_usdc, refresh (bypass short-lived cache), max_age_ms.
Authorization
privy Privy access token. For live POST /execute, use the wallet-auth JWT instead.
In: header
Query Parameters
Window start (default 2020-01-01).
Window end (default now).
Optional. Restrict to one linked address (0x or Solana).
Optional. Only that venue’s linked wallet.
"polymarket" | "dflow"If 1 / true / yes, prefer bypassing the edge DB cache for this key.
Response Body
curl -X GET "https://api.pear.trade/api/prediction-wallet/pnl"