PNL (WIP)
About PNL
what is it? the pnl api (profit and loss api) provides time series financial analytics for assets held in wallets on the ton blockchain it is designed to track the performance of tokens both ton and jettons across time, calculating balances, prices, and realized/unrealized profit and loss net worth flow returns the historical net worth of a given asset in a user wallet it combines the token balance and its usd price over a specified time range and interval (e g , hourly, daily) to compute \ balance token balance at each interval \ estimate usd estimated token price in usd \ net worth total value of the asset in usd pnl flow provides a detailed realized and unrealized pnl breakdown over time for each interval \ tracks tokens bought/sold and corresponding usd values \ computes realized pnl from sold assets \ computes unrealized pnl from the remaining balance pnl returns the current cumulative pnl state (not time series) it can be used to get a snapshot of a walletβs financial status including \ total bought/sold \ current balance \ realized and unrealized gains \ average entry price and latest token price