> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Fungible PnL 5Min

> Per-address fungible token profit-and-loss, cost basis, and realized/unrealized PnL, computed at 5-minute granularity.

The Fungible PnL 5Min table tracks the cost basis and profit-and-loss of fungible token positions (native and ERC20) for each address, updated on balance-changing events and bucketed to 5-minute intervals. Cost basis is computed using a volume-weighted average cost (VWAP) method with purchase-group tracking, so realized PnL is booked on sells and unrealized PnL reflects the remaining position at the latest price.

### Table Columns

| Column Name                           | Data Type         | Description                                                                                                                       |
| ------------------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| token\_type                           | VARCHAR           | Token standard for the asset. One of `erc20` (fungible) or the native currency symbol (e.g. `eth`)                                |
| address                               | VARCHAR           | Wallet or contract address of the account                                                                                         |
| token\_address                        | VARCHAR           | Contract address of the token. Native currency is represented as the zero address                                                 |
| token\_name                           | VARCHAR           | Full name of the token (e.g. "USD Coin", "Wrapped Ether")                                                                         |
| token\_symbol                         | VARCHAR           | Ticker symbol of the token (e.g. "USDC", "WETH")                                                                                  |
| prev\_balance                         | FLOAT             | Token balance for this address before this event                                                                                  |
| balance                               | FLOAT             | Token balance normalized by the token's decimal precision                                                                         |
| balance\_change                       | FLOAT             | Change in token balance from this event. Positive for inflows, negative for outflows                                              |
| usd\_exchange\_rate                   | FLOAT             | USD price per unit of the token at the time of the event                                                                          |
| usd\_balance                          | FLOAT             | USD value of the token balance, computed using the exchange rate at the time of the snapshot                                      |
| usd\_balance\_change                  | FLOAT             | USD value of the balance change at the token price at time of event                                                               |
| usd\_exchange\_rate\_latest           | FLOAT             | Most recent available USD price per token unit, used to compute current unrealized PnL                                            |
| usd\_balance\_latest                  | FLOAT             | Current USD value of the balance at the latest available price (balance × usd\_exchange\_rate\_latest)                            |
| transaction\_type                     | VARCHAR           | Ethereum transaction envelope type. 0 = Legacy, 1 = Access List (EIP-2930), 2 = EIP-1559 dynamic fee                              |
| tokens\_purchased                     | FLOAT             | Number of tokens acquired in this event (inflow quantity)                                                                         |
| tokens\_sold                          | FLOAT             | Number of tokens disposed of in this event (outflow quantity)                                                                     |
| average\_cost                         | FLOAT             | Volume-weighted average purchase price (VWAP) of the cost basis for current holdings                                              |
| cumulative\_costs                     | FLOAT             | Running total of USD spent acquiring this token by this address up to and including this event                                    |
| cumulative\_quantities                | FLOAT             | Running total of token quantity acquired up to and including this event                                                           |
| cumulative\_cost\_from\_purchases     | FLOAT             | Cumulative USD cost from buy (inflow) events only. Excludes sell proceeds                                                         |
| cumulative\_quantity\_from\_purchases | FLOAT             | Cumulative token quantity from buy (inflow) events only                                                                           |
| realized\_pnl                         | FLOAT             | Total realized profit or loss up to this event: (sell\_price − average\_cost) × quantity\_sold, summed across all sells           |
| realized\_pnl\_this\_block            | FLOAT             | Realized PnL from sell events in the current block only                                                                           |
| unrealized\_pnl                       | FLOAT             | Unrealized profit or loss of the position at the event-time price                                                                 |
| unrealized\_pnl\_latest               | FLOAT             | Unrealized profit or loss at the latest price: balance × (usd\_exchange\_rate\_latest − average\_cost). Zero when balance is zero |
| group\_vwap                           | FLOAT             | VWAP of the current purchase group — average cost per token for the most recent cluster of buys before any intervening sells      |
| group\_id                             | INTEGER           | Identifier for the purchase group used to compute cost basis. Resets when balance falls to zero after a sell                      |
| block\_timestamp                      | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the block that contains this record                                                                            |
| block\_number                         | INTEGER           | Sequential number of the block that contains this record                                                                          |
| unique\_id                            | VARCHAR           | Allium's deterministic unique identifier for this row                                                                             |
