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

# Aggregator Trades

### Table Details

| Property            | Value                                                     |
| ------------------- | --------------------------------------------------------- |
| Table Name          | `celo.dex.aggregator_trades`                              |
| Table Status        | Production-Ready                                          |
| Unique Key          | `block_timestamp`, `unique_id`                            |
| Clustering Key(s)   | `block_timestamp::date`                                   |
| Search Optimization | `transaction_hash`, `project`, `transaction_from_address` |

### Table Columns

| Column Name                     | Data Type          | Description                                                                                                                                             |
| ------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| integrator                      | VARCHAR(134217728) | Name of the integrator/frontend used for the trade (e.g., matcha, 1inch) inferred from the integrator tag. This will be null if there are no integrator |
| integrator\_tag                 | VARCHAR(134217728) | Contract address, event log field or other relevant field that is used to indicate the frontend integrator                                              |
| project                         | VARCHAR(134217728) | Name of the project. Includes dodo, paraswap, zeroex, cow\_protocol, kyberswap\_aggregator, tokenlon, openocean.                                        |
| protocol                        | VARCHAR(134217728) | DEX protocol or project contract which executed the aggregator trade.                                                                                   |
| event\_name                     | VARCHAR(134217728) | This field will be null for majority of DEX aggregator trades. Unless the event specifies the pools that the trade was routed through.                  |
| contract\_address               | VARCHAR(42)        | The name of the event (or the function call) for this trade.                                                                                            |
| liquidity\_pool\_address        | VARCHAR(42)        | The contract address of the aggregator.                                                                                                                 |
| sender\_address                 | VARCHAR(42)        | Address of the sender of the swap event log, which can be the Router.                                                                                   |
| to\_address                     | VARCHAR(42)        | Address of the recipient of the swap event.                                                                                                             |
| token\_sold\_address            | VARCHAR(42)        | Address of the token sold.                                                                                                                              |
| token\_sold\_name               | VARCHAR(134217728) | Name of the token sold.                                                                                                                                 |
| token\_sold\_symbol             | VARCHAR(134217728) | Symbol of the token sold.                                                                                                                               |
| token\_sold\_amount\_raw\_str   | VARCHAR(134217728) | Amount of token sold (not divided by the number of decimals) in string.                                                                                 |
| token\_sold\_amount\_raw        | FLOAT              | Amount of token sold (not divided by the number of decimals).                                                                                           |
| token\_sold\_amount\_str        | VARCHAR(134217728) | token\_sold\_amount\_raw divided by the number of decimals of the token in string.                                                                      |
| token\_sold\_amount             | FLOAT              | token\_sold\_amount\_raw divided by the number of decimals of the token.                                                                                |
| usd\_sold\_amount               | FLOAT              | USD value of tokens sold.                                                                                                                               |
| token\_bought\_address          | VARCHAR(42)        | Token address of the token bought, i.e. the asset acquired from the trade.                                                                              |
| token\_bought\_name             | VARCHAR(134217728) | Name of the token bought.                                                                                                                               |
| token\_bought\_symbol           | VARCHAR(134217728) | Symbol of the token bought.                                                                                                                             |
| token\_bought\_amount\_raw\_str | VARCHAR(134217728) | Amount of token bought (not divided by the number of decimals) in string.                                                                               |
| token\_bought\_amount\_raw      | FLOAT              | Amount of token bought (not divided by the number of decimals).                                                                                         |
| token\_bought\_amount\_str      | VARCHAR(134217728) | token\_bought\_amount\_raw divided by the number of decimals of the token in string.                                                                    |
| token\_bought\_amount           | FLOAT              | token\_bought\_amount\_raw divided by the number of decimals of the token.                                                                              |
| usd\_bought\_amount             | FLOAT              | USD value of tokens bought.                                                                                                                             |
| usd\_amount                     | FLOAT              | USD value of the swap. Note that this preferentially selects the price and value of the more reputable token.                                           |
| extra\_fields                   | VARIANT            | This field contains all the extra columns emitted from the event/function call that were not part of the convetional DEX trades columns.                |
| transaction\_from\_address      | VARCHAR(42)        | The address of the sending party of this transaction.                                                                                                   |
| transaction\_to\_address        | VARCHAR(42)        | The address of the receiving party of this transaction (could be a contract address).                                                                   |
| transaction\_hash               | VARCHAR(66)        | Transaction hash of this trade.                                                                                                                         |
| transaction\_index              | NUMBER(38,0)       | Transaction index of this trade in the block.                                                                                                           |
| transaction\_fees               | FLOAT              | Fees paid at the transaction level.                                                                                                                     |
| transaction\_fees\_usd          | FLOAT              | Fees paid in USD.                                                                                                                                       |
| fee\_details                    | VARIANT            | Additional fee details of the transaction, including max priority fee, gas price and gas used for the transaction.                                      |
| selector                        | VARCHAR(134217728) | The 4-byte function selector of the transaction calldata.                                                                                               |
| log\_index                      | NUMBER(38,0)       | Log index of this trade.                                                                                                                                |
| block\_timestamp                | TIMESTAMP\_NTZ(9)  | Block timestamp of this trade.                                                                                                                          |
| block\_number                   | NUMBER(38,0)       | Block number of this trade.                                                                                                                             |
| block\_hash                     | VARCHAR(66)        | Block hash of this trade.                                                                                                                               |
| unique\_id                      | VARCHAR(134217728) | Unique ID of each trade.                                                                                                                                |
| \_created\_at                   | TIMESTAMP\_NTZ(9)  | Timestamp of the entry creation.                                                                                                                        |
| \_updated\_at                   | TIMESTAMP\_NTZ(9)  | Timestamp of the entry update.                                                                                                                          |
| \_changed\_since\_full\_refresh | BOOLEAN            | Whether the entry was recreated.                                                                                                                        |

### Related Docs

* [EVM DEX Aggregator Trades](/historical-data/supported-blockchains/evm/core-schemas/dex/aggregator-trades)
