hyperd.wallet.pnl
Compute realized and unrealized profit and loss for any EVM wallet across a time window. Supports FIFO, LIFO, and HCFO cost-basis methods with per-token breakdown.
Instructions
Realized + unrealized P&L for a wallet over a time window. ERC-20 + native, single chain per call. Three cost-basis methods: FIFO (default, IRS standard), LIFO (last-in-first-out), HCFO (highest-cost-first-out, tax-loss-harvesting view). Per-token breakdown with weighted-avg cost + mark-to-market. Unpriced trades and untracked-proceeds gaps surfaced honestly under coverage.* fields. v1.0 defers per-tx gas-fee USD attribution. Costs $0.05 in USDC.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | 0x EVM wallet address | |
| chain | No | Chain to compute P&L on. Default 'base'. | |
| from | No | Window start, unix seconds. Default = to - 30 days. Must be >= 1577836800 (2020-01-01). | |
| to | No | Window end, unix seconds. Default = now. Cannot be > now+60. | |
| method | No | Cost-basis method. Default 'fifo'. |