🚀 Personal Day Trading Dashboard Suite
A comprehensive, real-time cryptocurrency trading and analytics platform built with the Coinbase Advanced API Python SDK.
✨ Features
📈 Day Trading Dashboard
- Real-time Price Monitoring: Live WebSocket price feeds for your favorite crypto pairs
- Order Execution: Place buy/sell orders directly from the interface
- Portfolio Management: View your ETH wallet and other crypto holdings
- Interactive Charts: Candlestick charts with multiple timeframes
- WebSocket Integration: Real-time price updates with minimal latency
📊 Analytics Dashboard
- P&L Analysis: Comprehensive profit and loss tracking with FIFO accounting
- Risk Metrics: Sharpe ratio, maximum drawdown, volatility analysis
- Performance Tracking: Win rate, trade volume, and detailed statistics
- Portfolio Analytics: Asset allocation and performance breakdown
- Historical Analysis: Time-series performance charts and trends
🔧 Configuration Management
- Secure Credential Storage: Local encrypted API key management
- Trading Preferences: Customizable trading pairs and chart settings
- Risk Management: Configurable stop-loss, take-profit, and position sizing
- Multi-Dashboard Architecture: Seamlessly switch between trading and analytics
🚀 Quick Start
Prerequisites
- Python 3.8+
- Coinbase Advanced Trade account
- API credentials with trading permissions
Installation
-
Clone the repository:
git clone https://github.com/coinbase/coinbase-advanced-py.git
cd "Coinbase analytics"
-
Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Get your API credentials:
- Visit Coinbase Advanced Trade
- Create API keys with view and trade permissions
- Note down your API key and private key
-
Launch the dashboard suite:
streamlit run main.py
🔑 API Setup
Getting Coinbase Advanced Trade API Keys
-
Sign up for Coinbase Advanced Trade
-
Navigate to API settings in your account
-
Create new API keys with the following permissions:
wallet:accounts:read - View account balances
wallet:buys:create - Place buy orders
wallet:sells:create - Place sell orders
wallet:orders:read - View order history
wallet:trades:read - View trade history
-
Copy your API key and private key
-
Enter them in the dashboard's API Setup page
API Key Format
- API Key:
organizations/{org_id}/apiKeys/{key_id}
- Private Key: EC private key in PEM format
📊 Dashboard Components
Main Dashboard (main.py)
The central hub for navigation and configuration:
- API credential management
- Dashboard launcher
- Configuration settings
- Connection status monitoring
Trading Dashboard (day_trading_dashboard.py)
Real-time trading interface:
- Live price feeds via WebSocket
- Order placement and management
- Portfolio overview
- Interactive price charts
Analytics Dashboard (analytics_dashboard.py)
Advanced performance analytics:
- P&L calculations and tracking
- Risk-adjusted performance metrics
- Trade history analysis
- Portfolio performance breakdown
Configuration System (config.py)
Persistent settings management:
- Secure credential storage
- Trading preferences
- Risk management settings
- Application configuration
🛡️ Risk Management
The platform includes built-in risk management features:
Position Sizing
- Conservative: Max 5% of portfolio per position
- Medium: Max 10% of portfolio per position
- Aggressive: Max 20% of portfolio per position
Stop-Loss & Take-Profit
- Configurable percentage-based exits
- Automatic risk calculation
- Position size recommendations
Daily Loss Limits
- Conservative: 2% daily loss limit
- Medium: 5% daily loss limit
- Aggressive: 10% daily loss limit
📈 Supported Trading Pairs
The platform supports 20+ major cryptocurrency pairs:
- Major Pairs: BTC-USD, ETH-USD, SOL-USD, MATIC-USD
- DeFi Tokens: UNI-USD, AAVE-USD, SUSHI-USD, 1INCH-USD
- Layer 1s: ADA-USD, DOT-USD
- And more: LINK-USD, COMP-USD, MKR-USD, YFI-USD, etc.
🔧 Configuration Options
Trading Preferences
- Preferred trading pairs selection
- Default chart timeframes (1M, 5M, 15M, 1H, 6H, 1D)
- Auto-refresh intervals
- Theme selection (dark/light)
Risk Settings
- Maximum order size limits
- Stop-loss percentages
- Take-profit percentages
- Risk tolerance levels
App Settings
- Notification preferences
- Data refresh intervals
- UI theme customization
🚨 Important Notes
Security
- Never share your API keys with anyone
- API credentials are stored locally on your machine
- Use restrictive API permissions (view + trade only)
- Consider using API keys with limited funds for testing
Rate Limits
- Coinbase Advanced API has rate limits
- The dashboard respects these limits automatically
- Real-time data may have slight delays during high usage
Paper Trading
- Consider starting with small amounts
- Test the platform thoroughly before large trades
- Monitor performance metrics closely
🛠️ Development
Project Structure
Coinbase analytics/
├── main.py # Main dashboard launcher
├── day_trading_dashboard.py # Trading interface
├── analytics_dashboard.py # Performance analytics
├── config.py # Configuration management
├── requirements.txt # Dependencies
├── README.md # Documentation
└── coinbase-advanced-py/ # Official SDK (cloned)
Key Dependencies
streamlit - Web application framework
coinbase-advanced-py - Official Coinbase Advanced API SDK
plotly - Interactive charts and visualizations
pandas - Data manipulation and analysis
numpy - Numerical computing
Running Multiple Dashboards
The suite can run multiple dashboards simultaneously:
- Main Dashboard:
http://localhost:8500 (default)
- Trading Dashboard:
http://localhost:8501
- Analytics Dashboard:
http://localhost:8502
📝 Usage Examples
Basic Trading Workflow
- Launch the main dashboard
- Configure API credentials
- Select preferred trading pairs
- Launch trading dashboard
- Monitor real-time prices
- Place buy/sell orders
- Track performance in analytics dashboard
Analytics Workflow
- Connect to API and trade for some time
- Launch analytics dashboard
- Review P&L metrics and performance
- Analyze risk-adjusted returns
- Optimize trading strategy based on insights
🤝 Contributing
This is a personal trading dashboard, but contributions are welcome:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
⚠️ Disclaimer
This trading dashboard is for educational and personal use only.
- Trading cryptocurrencies involves significant risk
- Past performance does not guarantee future results
- Only trade with funds you can afford to lose
- The authors are not responsible for any trading losses
- Always do your own research (DYOR)
📞 Support
For issues related to:
- Coinbase Advanced API: Check official documentation
- Dashboard bugs: Create an issue in this repository
- Trading questions: Consult with financial advisors
📄 License
This project is licensed under the MIT License - see the official Coinbase Advanced Python SDK for details.
Happy Trading! 🚀📈 # Coinbase-advanced-trading-platform