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

TableCoverageDescription
prices.usd~2,800 tokensHistorical prices with timestamps (coinpaprika data)
prices.usd_daily~2,800 tokensDaily historical prices
prices.usd_latest~2,800 tokensLatest available price per token
For broader coverage and additional features:
Modern TableCoverageBest For
prices.day900,000+ tokensDaily analysis with hybrid pricing
prices.hour900,000+ tokensIntraday analysis
prices.minute900,000+ tokensHigh-frequency analysis
prices.latest900,000+ tokenslatest 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:
ColumnTypeDescription
contract_addressvarbinaryToken contract address
symbolvarcharToken symbol
pricedoubleUSD price
minutetimestampPrice timestamp (prices.usd_latest excludes this)
blockchainvarcharBlockchain 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.