Time-series FIFO PnL with unrealized valuation
Time-series PnL with FIFO cost-basis and unrealized position valuation. Each bucket includes cumulative realized PnL, unrealized PnL (open lots marked from OHLCV closes), and total PnL (realized + unrealized) in SOL.
Wallet-wide (no mint): from and to (Unix seconds) are required. All trades
for the wallet up to limit (time-ordered) feed a single multi-token FIFO simulation.
Per-token (mint set): FIFO and marks apply only to that token mint. Use either
both from and to, or omit both to span first trade on that mint (bucket-aligned)
through now; the response echoes the resolved window as from / to when applicable.
One continuous series across exit and re-entry for the same mint (same methodology as
wallet-wide, sliced to one asset).
Documentation Index
Fetch the complete documentation index at: https://docs.raze.bot/llms.txt
Use this file to discover all available pages before exploring further.
Overview
FIFO time-series PnL in SOL: each bucket has cumulative realized PnL, unrealized PnL (open lots marked from OHLCV), and totalPnlSol (realized + unrealized). Wallet-wide and per-mint modes use the same accounting; per-mint is a slice of that engine for one mint.
Requests
Wallet-wide —from and to (Unix seconds) are required:
from and to:
limit (default 50000) caps how many trades are read (globally for wallet-wide; per mint for mint=).
Example responses
Wallet-wide (excerpt):mint, from, to, no tokensTracked):
truncated is true, raise limit or narrow the time range; the FIFO replay may not include older trades.Authorizations
Path Parameters
Query Parameters
Token mint (base58). When set, series is scoped to this mint only; from/to are both required unless both omitted (auto window).
Start timestamp (Unix seconds). Required when mint is omitted; with mint, omit together with to for auto window.
End timestamp (Unix seconds). Required when mint is omitted; with mint, omit together with from for auto window.
Time bucket resolution
1h, 1d Maximum trades to process (wallet-wide uses global trade cap; per-mint uses cap on trades for that mint only)
x <= 50000Response
Success
Present when the request scoped PnL to a single token mint.
Resolved window start (Unix seconds); included for mint-scoped responses with an explicit or auto-derived range.
Resolved window end (Unix seconds); included for mint-scoped responses.
1h, 1d True if trade rows hit limit (wallet-wide or per-mint); PnL may be incomplete past the cap.
Number of unique tokens in the processed trade set (wallet-wide only).
