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

# Exchange Events

### Table Details

| Property            | Value                                        |
| ------------------- | -------------------------------------------- |
| Table Name          | `provenance.dex.exchange_events`             |
| Table Status        | Production-Ready                             |
| Unique Key          | `block_timestamp`, `unique_id`, `event_type` |
| Clustering Key(s)   | `block_timestamp::date`                      |
| Search Optimization | `account`, `market_id`, `denom`              |

### Table Columns

| Column Name                     | Data Type         | Description                                                                                                                                                                                                        |
| ------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| event\_type                     | VARCHAR(16777216) | Type or category of the onchain event that produced this record. The specific values depend on the model (e.g. `transfer_single` / `batch_transfer` for ERC-1155, `deposit` / `withdraw` for bridges).             |
| project                         | VARCHAR(16777216) | Business name of the protocol being used (e.g. `uniswap`, `aave`, `lido`, `paraswap`). Consistent across verticals — every table with a `project` column uses this field to identify the top-level protocol brand. |
| protocol                        | VARCHAR(16777216) | Specific version or variant of the protocol (e.g. `uniswap_v3`, `aave_v2`, `stargate_v2`). Qualifies the `project` field with version information.                                                                 |
| account                         | VARCHAR(16777216) | Hedera account ID in the format `{shard}.{realm}.{num}`. Identifies a specific Hedera account.                                                                                                                     |
| market\_id                      | VARCHAR(16777216) | Internal Allium identifier for a market. Consistent across chains and protocol versions for the same logical market.                                                                                               |
| denom                           | VARCHAR(16777216) | Token denomination identifier on Cosmos chains. For native tokens this is typically the base denom (e.g. `uatom` for ATOM, `uosmo` for OSMO\`). For IBC tokens, this is the IBC denom hash.                        |
| name                            | VARCHAR(16777216) | Name of this token or asset. Short alias for `token_name` used in tables that preserve the original blockchain field naming convention.                                                                            |
| symbol                          | VARCHAR(16777216) | Ticker symbol of this token or asset. Short alias for `token_symbol` used in tables that preserve the original blockchain field naming convention.                                                                 |
| raw\_amount                     | VARCHAR(16777216) | Token amount in the smallest indivisible unit (not decimal-adjusted). Same concept as `amount_raw` — the column is named `raw_amount` in models that follow the `raw_` prefix convention.                          |
| amount\_str                     | VARCHAR(16777216) | Normalized token amount stored as a string to preserve full precision. Equivalent to `amount` but avoids floating-point truncation for very large or very small values.                                            |
| amount                          | FLOAT             | Token amount normalized by the token's decimal precision (amount\_raw / 10^decimals). This is the human-readable value (e.g. 1.5 USDC rather than 1500000).                                                        |
| usd\_amount                     | FLOAT             | USD value of the token amount at the time of the event, computed using the hourly USD exchange rate.                                                                                                               |
| usd\_exchange\_rate             | FLOAT             | USD price per unit of the token at the time of the event, used to compute `usd_amount`. Sourced from Allium's hourly price feed.                                                                                   |
| extra\_fields                   | VARIANT           | JSON object containing additional fields from the onchain event that are not part of the standard schema (e.g. nonce, fee metadata, protocol-specific parameters).                                                 |
| event\_index                    | NUMBER(38,0)      | Zero-based index of this event within its transaction. The specific semantics depend on the chain — on Aptos this is the `event_index` within the transaction; on Cosmos this is within the message.               |
| transaction\_hash               | VARCHAR(16777216) | Hash of the transaction that produced this record. Uniquely identifies a transaction within the blockchain.                                                                                                        |
| transaction\_index              | NUMBER(38,0)      | Zero-based position of the transaction within its block. The first transaction in a block has index 0.                                                                                                             |
| 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 block) and increments by 1 for each new block.                                                                                      |
| block\_hash                     | VARCHAR(16777216) | Cryptographic hash of the block header that contains this record. Uniquely identifies a block.                                                                                                                     |
| unique\_id                      | VARCHAR(16777216) | Allium's deterministic unique identifier for this row. Generated from the fields that uniquely identify the record (e.g. transaction hash + log index). 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.                                                                                                                                                      |
| \_changed\_since\_full\_refresh | BOOLEAN           | Indicates if the record has changed since the last full data refresh.                                                                                                                                              |
