Set up your API key
Build faster with AI
TL;DR
Use /simple/price for live valuation, /coins/{id}/history for cost basis on purchase dates, /coins/markets for dashboard data, and /coins/{id}/market_chart for performance charts.
Use /simple/price for live valuation, /coins/{id}/history for cost basis on purchase dates, /coins/markets for dashboard data, and /coins/{id}/market_chart for performance charts.
Replace YOUR_API_KEY in the examples below with your actual key. Get one here β
Portfolio Workflow
Set up currency preference β /simple/supported_vs_currencies
Fetch all supported fiat and crypto currencies to populate a currency selector in your UI.Pass the userβs choice as
- Pro API
- Demo API
vs_currencies to pricing endpoints.Live valuation β /simple/price
Poll spot prices for all holdings. Batch multiple coins in one call β minimal overhead for frequent polling.Multiply each price by your holding quantity, then sum for total portfolio value.
- Pro API
- Demo API
Token prices by contract β /simple/token_price/{id}
For ERC-20 and other contract-based tokens β look up prices by contract address instead of coin ID.
- Pro API
- Demo API
| Key param | Use |
|---|---|
id (path) | Asset platform β ethereum, polygon-pos, solana, etc. |
contract_addresses | Comma-separated token addresses |
Dashboard data β /coins/markets
Rich market data for up to 250 coins per page β rankings, sparklines, highs/lows, and multi-timeframe changes.
- Pro API
- Demo API
| Key param | Use |
|---|---|
ids | Filter to your portfolio coins only |
sparkline | 7-day sparkline data for inline mini-charts |
price_change_percentage | 1h,24h,7d,30d for multi-timeframe performance |
Cost basis β /coins/{id}/history
Price snapshot on a specific date β calculate cost basis for each purchase.
- Pro API
- Demo API
The
date parameter uses dd-mm-yyyy format (not ISO). Data returned is a snapshot at 00:00:00 UTC.Performance charts β /coins/{id}/market_chart
Price, market cap, and volume over time β for charting portfolio value and calculating time-weighted returns.
- Pro API
- Demo API
| Key param | Use |
|---|---|
days | Lookback: 1, 7, 14, 30, 90, 180, 365, or max |
interval | daily for consistent data points, or omit for auto granularity |

