This project visualizes the relationship between MicroStrategy's (now Strategy) market capitalization and the value of its Bitcoin holdings. It shows:
- MSTR's market capitalization over time
- The value of MSTR's BTC holdings
- The premium/discount ratio between market cap and BTC holdings
- Interactive ECharts visualization with zoom and pan
- Auto-scaling Y-axis that adjusts to visible data
- Daily data updates via GitHub Actions
- Hover tooltips with detailed information
- Responsive design
- Bitcoin prices: CryptoCompare API (free, no key required)
- MSTR stock prices: Yahoo Finance API
- BTC purchase history: CoinGecko Public Treasury API
- Node.js 20+
- CoinGecko API key (free at coingecko.com/api/pricing)
# Install dependencies
npm install
# Create .env.local with your API key
echo "COINGECKO_API_KEY=your_key_here" > .env.local
# Fetch latest data
npm run fetch-data
# Start development server
npm run devVisit http://localhost:3000 to see the application.
The project is automatically deployed to GitHub Pages:
- On every push to the main branch
- Daily at 00:00 UTC to refresh price data
Add the following secret to your repository (Settings → Secrets → Actions):
COINGECKO_API_KEY: Your CoinGecko Demo API key
- Next.js 16
- ECharts
- TypeScript
- Tailwind CSS
- GitHub Actions
MIT
Contributions are welcome! Please feel free to submit a Pull Request.