somnia.price Table: ez_prices_hourly Type: Base Table
What
This curated table provides reliable hourly price data for tokens and native assets across EVM blockchains. It combines multiple data sources with quality checks to ensure accurate, consistent pricing for DeFi analytics, portfolio valuations, and historical analysis.Key Use Cases
- Calculate USD values for token transfers and transaction amounts
- Track price volatility and market movements over time
- Monitor stablecoin depegging events and price stability
- Analyze native asset price trends across different blockchains
- Perform portfolio valuations and historical price lookups
- Create price charts and technical analysis dashboards
- Assess price data quality and imputation rates
Important Relationships
- Join with ez_token_transfers: Calculate transfer USD values using hourly price snapshots
- Join with ez_asset_metadata: Get token details and verification status
- Join with dim_contracts: Match addresses with contract metadata
Commonly-used Fields
hour: UTC timestamp truncated to hour for price recordingtoken_address: Contract address of the token (NULL for native assets)symbol: Token ticker symbol (ETH, USDC, etc.)price: USD price of one whole token unitis_imputed: Flag indicating forward-filled prices due to missing datais_native: Boolean for blockchain native currenciesblockchain: Network where the asset exists
Sample Queries
Token Price Lookup with USD CalculationsColumns
| Column Name | Data Type | Description |
|---|---|---|
| HOUR | TIMESTAMP_NTZ | UTC timestamp truncated to the hour for price recording. Used for joining with hourly transaction data. Example: ‘2024-01-15 14:00:00.000’ |
| TOKEN_ADDRESS | TEXT | Contract address of the token on the blockchain. NULL for native assets (ETH, AVAX, etc.). Example: ‘0xa0b86a33e6776a1e7f9f0b8b8b8b8b8b8b8b8b8b’ |
| SYMBOL | TEXT | Token ticker symbol as commonly recognized. Usually 3-5 uppercase characters. Example: ‘WETH’ |
| NAME | TEXT | NAME column |
| DECIMALS | NUMBER | Number of decimal places for the token. Most ERC-20 tokens use 18 decimals, USDC/USDT use 6, WBTC uses 8. Example: 18 |
| PRICE | FLOAT | USD price of one whole token unit at the recorded hour. Example: 3000.50 |
| BLOCKCHAIN | TEXT | The blockchain network where the asset exists. Lowercase by convention. Example: ‘ethereum’ |
| IS_NATIVE | BOOLEAN | Boolean indicating if the asset is the blockchain’s native currency. TRUE for ETH on Ethereum, AVAX on Avalanche, etc. Example: true |
| IS_IMPUTED | BOOLEAN | Boolean flag indicating if the price was forward-filled due to missing data. TRUE means price carried forward from last known value. Example: false |
| IS_DEPRECATED | BOOLEAN | Flag indicating if the asset is no longer actively supported. TRUE for deprecated assets that may have stale prices. Example: false |
| IS_VERIFIED | BOOLEAN | Boolean indicating Flipside team verification of the asset. TRUE for manually verified assets with validated metadata. Example: true |
| EZ_PRICES_HOURLY_ID | TEXT | Primary key - unique identifier for each row ensuring data integrity. Format: Usually VARCHAR containing composite key generated using MD5 hash of the relevant columns. Example: MD5(blocknumber, txhash, trace_index) Usage: Deduplication in incremental loads Join operations for data quality checks Troubleshooting specific records Important: Implementation varies by table - check table-specific documentation. |
| INSERTED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp when the record was first added to the Flipside database. Format: TIMESTAMP_NTZ Use Cases: Data freshness monitoring Incremental processing markers Debugging data pipeline issues SLA tracking Query Example: |
| MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | UTC timestamp of the most recent update to this record. Format: TIMESTAMP_NTZ Triggers for Updates: Data corrections Enrichment additions Reprocessing for accuracy Schema migrations Monitoring Usage: |