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

# Perpetual Markets Daily

> Daily open interest, volume and price for perpetual futures markets that reference real world assets.

The `rwa.metrics.perpetual_markets_daily` table has one row per RWA perpetual futures market per day. Market details come from [`rwa.registry.perpetual_markets`](https://docs.allium.so/historical-data/rwa/perpetual-markets).

### Table Details

| Property | Value |
| - | - |
| Table Name | `rwa.metrics.perpetual_markets_daily` |
| Unique Key | `chain`, `market_identifier`, `activity_date` |

### Table Columns

| Column Name | Data Type | Description |
| - | - | - |
| chain | VARCHAR(16777216) | Blockchain of the market. |
| venue | VARCHAR(16777216) | Venue the market is listed on. |
| asset\_class | VARCHAR(16777216) | Asset class of the referenced asset. See [Classification](https://docs.allium.so/historical-data/rwa/classification.md). |
| asset\_type | VARCHAR(16777216) | Asset type within `asset_class`. |
| issuer\_id | VARCHAR(16777216) | Identifier of the market's issuer. |
| issuer\_name | VARCHAR(16777216) | Name of the market's issuer. |
| product\_id | VARCHAR(16777216) | Identifier of the market's product. |
| underlying\_asset | VARCHAR(16777216) | Ticker of the real world asset the market tracks. |
| market\_identifier | VARCHAR(16777216) | Venue-specific identifier of the market. |
| ticker | VARCHAR(16777216) | Symbol of the market. |
| activity\_date | TIMESTAMP\_NTZ(9) | UTC date. |
| open\_interest\_usd | FLOAT | Open interest in USD. |
| median\_open\_interest\_usd | FLOAT | Median open interest during the day, in USD. |
| max\_open\_interest\_usd | FLOAT | Maximum open interest during the day, in USD. |
| day\_natural\_volume | FLOAT | Trading volume in USD. |
| oracle\_price\_usd | FLOAT | Price of the market in USD. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp this row was first created. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp this row was last updated. |

### Sample Query

```sql theme={null}
-- Open interest and volume by venue, last 7 days
SELECT
    activity_date,
    venue,
    SUM(open_interest_usd) AS open_interest_usd,
    SUM(day_natural_volume) AS volume_usd
FROM rwa.metrics.perpetual_markets_daily
WHERE activity_date >= CURRENT_DATE - 7
GROUP BY 1, 2
ORDER BY 1 DESC, 3 DESC
```
