Legacy Price Tables
These tables continue to work and update regularly, so you can keep using them if they meet your needs. However, for broader token coverage and improved functionality, consider the modern price tables.
prices.usd
is based on coinpaprika data and covers ~2,800 tokens. For comprehensive coverage including newer tokens, use prices.minute
, prices.hour
, or prices.day
which include both coinpaprika and DEX-derived pricing.
Why Consider Modern Tables?
- More tokens: 900,000+ vs ~2,800 in legacy tables
- Hybrid approach: Combines coinpaprika and DEX-derived pricing for maximum coverage
- Same reliability: Coinpaprika data quality maintained in modern tables
- Additional features: Source transparency, quality filtering, and standardized native token addresses
Available Legacy Tables
Table | Coverage | Description |
---|
prices.usd | ~2,800 tokens | Historical prices with timestamps (coinpaprika data) |
prices.usd_daily | ~2,800 tokens | Daily historical prices |
prices.usd_latest | ~2,800 tokens | Latest available price per token |
Modern Alternatives (Recommended)
For broader coverage and additional features:
Modern Table | Coverage | Best For |
---|
prices.day | 900,000+ tokens | Daily analysis with hybrid pricing |
prices.hour | 900,000+ tokens | Intraday analysis |
prices.minute | 900,000+ tokens | High-frequency analysis |
prices.latest | 900,000+ tokens | latest prices |
Migration examples:
Simple price lookup
-- Legacy:
SELECT price, minute FROM prices.usd
WHERE contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 AND blockchain = 'ethereum'
-- Modern equivalent:
SELECT price, timestamp FROM prices.minute
WHERE contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 AND blockchain = 'ethereum'
Daily aggregation (much faster with modern tables)
-- Legacy - manually aggregate minute data:
SELECT
DATE(timestamp) as date,
AVG(price) as avg_daily_price
FROM prices.usd
WHERE contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
AND blockchain = 'ethereum'
AND timestamp >= NOW() - INTERVAL '30' DAY
GROUP BY DATE(timestamp)
-- Modern - use pre-aggregated daily table:
SELECT
timestamp as date,
price as avg_daily_price
FROM prices.day
WHERE contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
AND blockchain = 'ethereum'
AND timestamp >= NOW() - INTERVAL '30' DAY
Token coverage comparison
-- See the difference in token coverage:
SELECT COUNT(*) FROM prices.usd_latest; -- ~2,800 tokens
SELECT COUNT(*) FROM prices.latest; -- 900,000+ tokens
Legacy Table Schema
All legacy tables share a similar schema:
Column | Type | Description |
---|
contract_address | varbinary | Token contract address |
symbol | varchar | Token symbol |
price | double | USD price |
minute | timestamp | Price timestamp (prices.usd_latest excludes this) |
blockchain | varchar | Blockchain identifier |
Key Differences from Modern Tables
- Token coverage: Limited to ~2,800 tokens vs 900,000+ in modern tables
- Data sources: Coinpaprika only vs hybrid approach in modern tables
- Schema: Legacy format vs standardized modern schema with
source
column
- Native tokens: May use different address conventions vs standardized addresses
Still Need Legacy Tables?
No problem! These tables continue to update and work reliably. You can:
- Keep using them if they cover your token needs
- Mix legacy and modern tables in your queries
- Gradually migrate to modern tables when convenient
For comprehensive documentation on the modern pricing system, see Prices Overview.