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

# Trade Agg

> Reference documentation for the Trade Agg table in Hubble's Gold data dictionary.

## Table Metadata

| Property | Configuration |
| - | - |
| Natural Key(s) | day\_agg, asset\_a, asset\_b |
| Partition Field(s) | day\_agg (MONTH partition) |
| Clustered Field(s) | asset\_a, asset\_b |
| Documentation | [dbt docs](http://www.stellar-dbt-docs.com/#!/model/model.stellar_dbt_public.trade_agg) |

## Column Details

| Name | Description | Data Type | Domain Values | Required? | Notes |
| - | - | - | - | - | - |
| day\_agg | Date from which all metrics are aggregated. In the Trade Aggregations table, the day\_agg represents the day in which the daily aggregations were built. | DATE | | Yes | |
| asset\_a\_type | The identifier for type of asset code used for the sold asset within the trade. Notes: XLM is the native asset to the network. XLM has no asset code or issuer representation and will instead be displayed with an asset type of 'native'. | STRING | | Yes | |
| asset\_a\_code | The 4 or 12 character code of the sold asset within a trade. Notes: Asset codes have no guarantees of uniqueness. The combination of asset code, issuer and type represents a distinct asset. | STRING | | No | |
| asset\_a\_issuer | The account address of the original asset issuer for the sold asset within a trade. | STRING | | No | |
| asset\_a | Hashed id for the selling\_asset. | INTEGER | | Yes | |
| asset\_b\_type | The identifier for type of asset code used for the bought asset within the trade. Notes: XLM is the native asset to the network. XLM has no asset code or issuer representation and will instead be displayed with an asset type of 'native'. | STRING | | Yes | |
| asset\_b\_code | The 4 or 12 character code of the bought asset within a trade. Notes: Asset codes have no guarantees of uniqueness. The combination of asset code, issuer and type represents a distinct asset. | STRING | | No | |
| asset\_b\_issuer | The account address of the original asset issuer for the bought asset within a trade. | STRING | | No | |
| asset\_b | Hashed id for the buying\_asset. | INTEGER | | Yes | |
| trade\_count\_daily | The count of trades executed against the network in a day. | INTEGER | | Yes | |
| asset\_a\_volume\_daily | The total raw amount of the asset being sold in all trades within that day. | FLOAT | | Yes | |
| asset\_b\_volume\_daily | The total raw amount of the asset being bought in all trades within that day. | FLOAT | | Yes | |
| avg\_price\_daily | The total amount of the asset being bought in all trades divided by the total amount of the asset being sold in all trades, within that day. | FLOAT | | Yes | |
| high\_price\_daily | The highest price obtained from the ratio between denominator and numerator for that day, for the selling:buying asset price. | FLOAT | | Yes | |
| low\_price\_daily | The lowest price obtained from the ratio between denominator and numerator for that day, for the selling:buying asset price. | FLOAT | | Yes | |
| open\_n\_daily | The opening price of the numerator within that day, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| open\_d\_daily | The opening price of the denominator within that day, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| close\_n\_daily | The closing price of the numerator within that day, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| close\_d\_daily | The closing price of the denominator within that day, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| trade\_count\_weekly | The count of trades executed against the network during the past 7 days. | INTEGER | | Yes | |
| asset\_a\_volume\_weekly | The total amount of the asset being sold in all trades during the past 7 days. | FLOAT | | Yes | |
| asset\_b\_volume\_weekly | The total amount of the asset being bought in all trades during the past 7 days. | FLOAT | | Yes | |
| avg\_price\_weekly | The total amount of the asset being bought in all trades divided by the total amount of the asset being sold in all trades, during the past 7 days. | FLOAT | | Yes | |
| high\_price\_weekly | The highest price obtained from the ratio between denominator and numerator during the past 7 days, for the selling:buying asset price. | FLOAT | | Yes | |
| low\_price\_weekly | The lowest price obtained from the ratio between denominator and numerator during the past 7 days, for the selling:buying asset price. | FLOAT | | Yes | |
| open\_n\_weekly | The opening price of the numerator during the past 7 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| open\_d\_weekly | The opening price of the denominator during the past 7 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| close\_n\_weekly | The closing price of the numerator during the past 7 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| close\_d\_weekly | The closing price of the denominator during the past 7 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| trade\_count\_monthly | The count of trades executed against the network during the past 30 days. | INTEGER | | Yes | |
| asset\_a\_volume\_monthly | The total amount of the asset being sold in all trades during the past 30 days. | FLOAT | | Yes | |
| asset\_b\_volume\_monthly | The total amount of the asset being bought in all trades during the past 30 days. | FLOAT | | Yes | |
| avg\_price\_monthly | The total amount of the asset being bought in all trades divided by the total amount of the asset being sold in all trades, during the past 30 days. | FLOAT | | Yes | |
| high\_price\_monthly | The highest price obtained from the ratio between denominator and numerator during the past 30 days, for the selling:buying asset price. | FLOAT | | Yes | |
| low\_price\_monthly | The lowest price obtained from the ratio between denominator and numerator during the past 30 days, for the selling:buying asset price. | FLOAT | | Yes | |
| open\_n\_monthly | The opening price of the numerator during the past 30 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| open\_d\_monthly | The opening price of the denominator during the past 30 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| close\_n\_monthly | The closing price of the numerator during the past 30 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| close\_d\_monthly | The closing price of the denominator during the past 30 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| trade\_count\_yearly | The count of trades executed against the network during the past 365 days. | INTEGER | | Yes | |
| asset\_a\_volume\_yearly | The total amount of the asset being sold in all trades during the past 365 days. | FLOAT | | Yes | |
| asset\_b\_volume\_yearly | The total amount of the asset being bought in all trades during the past 365 days. | FLOAT | | Yes | |
| avg\_price\_yearly | The total amount of the asset being bought in all trades divided by the total amount of the asset being sold in all trades, during the past 365 days. | FLOAT | | Yes | |
| high\_price\_yearly | The highest price obtained from the ratio between denominator and numerator during the past 365 days, for the selling:buying asset price. | FLOAT | | Yes | |
| low\_price\_yearly | The lowest price obtained from the ratio between denominator and numerator during the past 365 days, for the selling:buying asset price. | FLOAT | | Yes | |
| open\_n\_yearly | The opening price of the numerator during the past 365 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| open\_d\_yearly | The opening price of the denominator during the past 365 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| close\_n\_yearly | The closing price of the numerator during the past 365 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| close\_d\_yearly | The closing price of the denominator during the past 365 days, for the selling:buying asset prices ratio. | INTEGER | | Yes | |
| airflow\_start\_ts | The timestamp when the Airflow job starts. | STRING | | No | The Airflow job writes data to the BigQuery tables. Can be used to tell whether data was added as a backfill; e.g. when `day_agg` is old but `airflow_start_ts` is recent. |
