get_pnl_summary
Calculate wallet-level net profit and loss across EVM (Ethereum/Arbitrum/Polygon/Base/Optimism), TRON, and Solana for a chosen time period. Returns total PnL in USD with per-chain and per-asset breakdowns.
Instructions
Wallet-level net PnL over a preset time window across EVM (Ethereum/Arbitrum/Polygon/Base/Optimism), TRON, and Solana. Returns the headline pnlUsd (= ending value − starting value − net user contribution), with per-chain and per-asset breakdown. Math: starting quantity per asset is reconstructed as currentQty − netFlowQty (clamped at zero when negative — user received the asset entirely within the window), priced at the period's start via DefiLlama historical, then pnlUsd = walletValueChange − (inflowsUsd − outflowsUsd). Use this for the simple 'how much did I make?' question; pair with get_portfolio_diff for the same window when the user wants the price-vs-quantity decomposition narrative. Periods: 24h / 7d / 30d / ytd / inception (capped at 365d in v1 — "since wallet creation" is not literal because the underlying history fetcher caps at ~50 items per chain). At least one of wallet / tronAddress / solanaAddress is required. v1 caveats: wallet token balances only (DeFi position interest accrual collapses into the residual); gas costs not subtracted; Solana program-interaction txs (Jupiter swaps, MarginFi actions, native staking actions) are skipped from net-flow accounting because their balance deltas mix intra-tx swap legs; truncation flagged when history caps. Bitcoin is intentionally NOT supported in v1 — the BTC path lacks in-window flow accounting and a price-effect-only number would be misleading.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | No | EVM wallet (Ethereum / Arbitrum / Polygon / Base / Optimism). Used to fetch current balances and walk EVM tx history for the period. | |
| tronAddress | No | TRON mainnet base58 address (T-prefix). Folds TRX + TRC-20 balances and TRON history into the PnL. | |
| solanaAddress | No | Solana mainnet base58 pubkey. Folds SOL + SPL balances and Solana history into the PnL. | |
| period | No | Time window. "24h" / "7d" / "30d" are rolling; "mtd" is calendar-month-to-date (UTC, from the 1st of the current month); "ytd" is calendar-year-to-date (UTC); "inception" is a 365-day rolling window in v1 — "since wallet creation" is approximated, not literal, to keep the history fetch bounded. Periods longer than ~30d may under-count flows because the underlying history fetcher caps at ~50 items per chain; the response surfaces `truncated: true` when this happens. | 30d |