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

# Markets Daily

The `lending.markets_daily` table contains daily snapshots of individual lending markets, providing granular data at the market and token level.

This table captures detailed information about each lending market including outstanding loans, available liquidity, supplied amounts, and the latest activity metadata.

### Sample Query

Finding the daily market data for Aave markets on Ethereum:

```sql theme={null}
select 
    date,
    project,
    protocol,
    token_symbol,
    token_name,
    outstanding_loans_usd,
    available_liquidity_usd,
    supplied_amount_usd
from ethereum.lending.markets_daily
where project = 'aave'
order by date desc, supplied_amount_usd desc
```

Finding the top 10 markets by supplied amount on a specific date:

```sql theme={null}
select 
    date,
    project,
    protocol,
    token_symbol,
    contract_address,
    supplied_amount_usd
from ethereum.lending.markets_daily
where date = '2026-01-23'
order by supplied_amount_usd desc
limit 10
```

### Table Columns

Unique Key: `id`

| Column                           | Data Type         | Description                                                           |
| -------------------------------- | ----------------- | --------------------------------------------------------------------- |
| date                             | DATE              | Date of the market snapshot                                           |
| project                          | VARCHAR           | Name of the lending project (e.g., aave, compound, morpho\_blue)      |
| protocol                         | VARCHAR           | Underlying protocol version (e.g., aave\_v2, compound\_v2, euler\_v2) |
| id                               | VARCHAR           | Unique identifier for the market                                      |
| contract\_address                | VARCHAR           | Address of the lending market contract                                |
| token\_address                   | VARCHAR           | Address of the token in the market                                    |
| token\_name                      | VARCHAR           | Name of the token                                                     |
| token\_symbol                    | VARCHAR           | Symbol of the token                                                   |
| token\_decimals                  | INTEGER           | Number of decimals for the token                                      |
| usd\_exchange\_rate              | FLOAT             | USD exchange rate of the token at the time of the snapshot            |
| outstanding\_loans               | FLOAT             | Total outstanding loans in token units                                |
| outstanding\_loans\_usd          | FLOAT             | Total outstanding loans in USD                                        |
| available\_liquidity             | FLOAT             | Available liquidity in token units                                    |
| available\_liquidity\_usd        | FLOAT             | Available liquidity in USD                                            |
| supplied\_amount                 | FLOAT             | Total supplied amount in token units                                  |
| supplied\_amount\_usd            | FLOAT             | Total supplied amount in USD                                          |
| transaction\_hash                | VARCHAR           | Hash of the last transaction affecting this market                    |
| transaction\_index               | INTEGER           | Index of the last transaction in the block                            |
| last\_activity\_block\_timestamp | TIMESTAMP\_NTZ(9) | Timestamp of the last activity block                                  |
| last\_activity\_block\_number    | INTEGER           | Block number of the last activity                                     |
| last\_activity\_block\_hash      | VARCHAR           | Hash of the last activity block                                       |
| \_created\_at                    | TIMESTAMP\_NTZ(9) | Timestamp of when the record was created                              |
| \_updated\_at                    | TIMESTAMP\_NTZ(9) | Timestamp of when the record was last updated                         |
