> ## 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

### Table Details

| Property     | Value                          |
| ------------ | ------------------------------ |
| Table Name   | `apechain.assets.fungible_pnl` |
| Table Status | Production-Ready               |
| Unique Key   | `block_timestamp`, `unique_id` |

### Table Columns

| Column Name                           | Data Type         | Description                                                                                                                                       |
| ------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| token\_type                           | VARCHAR(16777216) | Token standard or category (e.g. erc20, native).                                                                                                  |
| address                               | VARCHAR(16777216) | Wallet or contract address holding the token.                                                                                                     |
| token\_address                        | VARCHAR(16777216) | Contract address of the token. On EVM chains native currency is represented as the zero address.                                                  |
| token\_name                           | VARCHAR(16777216) | Human-readable name of the token.                                                                                                                 |
| token\_symbol                         | VARCHAR(16777216) | Ticker symbol of the token.                                                                                                                       |
| prev\_balance                         | FLOAT             | Token balance held by the address immediately before this transaction, normalized by token decimals.                                              |
| balance                               | FLOAT             | Token balance held by the address after this transaction, normalized by token decimals.                                                           |
| balance\_change                       | FLOAT             | Change in token balance produced by this transaction.                                                                                             |
| usd\_exchange\_rate                   | FLOAT             | USD price of one unit of the token at the record's timestamp.                                                                                     |
| usd\_balance                          | FLOAT             | USD value of the balance at the record's timestamp.                                                                                               |
| usd\_balance\_change                  | FLOAT             | Change in USD value of the address's balance produced by this transaction.                                                                        |
| usd\_exchange\_rate\_latest           | FLOAT             | Latest available USD price of one unit of the token.                                                                                              |
| usd\_balance\_latest                  | FLOAT             | USD value of the address's balance valued at the latest available price.                                                                          |
| transaction\_type                     | VARCHAR(16777216) | Type or category of the transaction that produced this record (e.g. buy, sell, transfer).                                                         |
| tokens\_purchased                     | FLOAT             | Quantity of tokens purchased in this transaction.                                                                                                 |
| tokens\_sold                          | FLOAT             | Quantity of tokens sold in this transaction.                                                                                                      |
| average\_cost                         | FLOAT             | Average USD cost basis per token unit held by the address, updated as positions change.                                                           |
| cumulative\_costs                     | FLOAT             | Running total USD cost of tokens acquired by the address.                                                                                         |
| cumulative\_quantities                | FLOAT             | Running total quantity of tokens acquired by the address.                                                                                         |
| cumulative\_cost\_from\_purchases     | FLOAT             | Running total USD cost from purchase transactions only.                                                                                           |
| cumulative\_quantity\_from\_purchases | FLOAT             | Running total quantity of tokens from purchase transactions only.                                                                                 |
| realized\_pnl                         | FLOAT             | Cumulative realized profit and loss (USD) from tokens the address has sold.                                                                       |
| realized\_pnl\_this\_block            | FLOAT             | Realized profit and loss (USD) attributable to this block.                                                                                        |
| unrealized\_pnl                       | FLOAT             | Unrealized profit and loss (USD) on the address's remaining holdings at this record's time.                                                       |
| unrealized\_pnl\_latest               | FLOAT             | Unrealized profit and loss (USD) on the address's holdings valued at the latest available price.                                                  |
| group\_vwap                           | FLOAT             | Volume-weighted average price for the current position group.                                                                                     |
| group\_id                             | NUMBER(38,0)      | Identifier for the position group, incremented when a position is fully closed and reopened.                                                      |
| block\_timestamp                      | TIMESTAMP\_NTZ(9) | Timestamp (UTC) of the block that contains this record.                                                                                           |
| block\_number                         | NUMBER(38,0)      | Sequential number of the block that contains this record. Starts at 0 (genesis) and increments by 1 per block.                                    |
| unique\_id                            | VARCHAR(16777216) | Allium's deterministic unique identifier for this row, generated from the fields that uniquely identify the record. Stable across full refreshes. |
| \_created\_at                         | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was created in the database.                                                                                          |
| \_updated\_at                         | TIMESTAMP\_NTZ(9) | Timestamp of when the entry was last updated in the database.                                                                                     |

### Related Docs

* [EVM Assets Fungible Pnl](/historical-data/supported-blockchains/evm/core-schemas/assets/fungible-pnl)
