Overview
Staxiq’s Portfolio Tracking provides real-time visibility into your Stacks wallet holdings, featuring live balance tracking, USD valuations, and transaction history. Connect your wallet to automatically monitor your STX and sBTC assets with 30-second refresh intervals.Key Features
Live Balance Tracking
Real-time STX and sBTC balances with animated count-up displays
USD Valuation
Automatic price conversion to USD for total portfolio value
Transaction History
Complete record of wallet activity with timestamps
Performance Charts
30-day portfolio performance visualization
How It Works
The portfolio tracker fetches wallet data from the Stacks blockchain API every 30 seconds using theusePortfolio hook:
Getting Started
Connect Your Wallet
Click Connect Wallet in the navigation bar and approve the connection with your Leather, Xverse, or Hiro wallet.
View Your Dashboard
Your portfolio metrics appear automatically on the Dashboard with four key cards:
- STX Balance - Total STX held with orange accent
- sBTC Balance - Bitcoin on Stacks holdings
- Total Value - Combined USD value with green accent
- Transactions - Total transaction count
Portfolio Metrics
Balance Cards
Each metric card includes:- Colored accent bar - Visual category indicator (orange for STX, green for USD value)
- Animated counters - Smooth count-up animation on load
- Unit labels - Clear denomination (STX, sBTC, USD)
- Hover effects - Enhanced shadow on interaction
Chart Features
The portfolio chart generates a stable 30-day history based on:- Current wallet value
- Address-seeded randomization for consistent historical data
- Smooth area gradient (Bitcoin orange)
- Responsive design for mobile and desktop
Transaction History
Recent transactions display:- Transaction type (transfer, contract call, etc.)
- STX amount moved
- Timestamp and date
- Transaction hash with explorer link
- Success/pending status indicators
Demo Mode
Test the portfolio tracker without connecting a wallet:Demo mode shows a sample portfolio with realistic data:
- STX Balance: 12,456.78 STX
- sBTC Balance: 0.0234 sBTC
- Total Value: $4,832.45 USD
- Transaction Count: 47 transactions
Data Updates
Portfolio data refreshes automatically every 30 seconds while the dashboard is open. Manual refresh is not required.
Code Reference
Key implementation files:- Hook:
src/hooks/usePortfolio.js- Data fetching logic - Component:
src/pages/Dashboard.jsx:78-133- Portfolio metric cards - Chart:
src/components/PortfolioChart.jsx- Performance visualization - Service:
src/services/stacksApi.js- Blockchain API integration
Advanced Usage
Custom Refresh Intervals
The default 30-second refresh can be adjusted inusePortfolio.js:34:
Troubleshooting
Portfolio shows ”—” or loading state:- Ensure wallet is properly connected
- Check network connection
- Verify wallet has transaction history on Stacks mainnet
- Wait 30 seconds for next automatic refresh
- Recent transactions may take 1-2 minutes to appear on-chain
- Demo mode data is for demonstration only
Next Steps
Protocol Comparison
Compare yields across all Stacks DeFi protocols
AI Copilot
Get personalized strategies based on your portfolio