For Misc - Git action

This commit is contained in:
2026-02-04 19:59:15 +08:00
parent a42ea8dddf
commit dfb7b9e619

View File

@@ -9,7 +9,9 @@ See `component_diagram.md` and `architecture_diagram.txt` in the parent director
## UI/UX Module ## UI/UX Module
### Dashboard ### Dashboard
Simple dashboard displaying key trading metrics: Simple dashboard displaying key trading metrics:
- PnL (Profit and Loss) - PnL (Profit and Loss)
- Drawdown - Drawdown
- Win Rate - Win Rate
@@ -17,9 +19,11 @@ Simple dashboard displaying key trading metrics:
## Data Layer Module ## Data Layer Module
### Moomoo API Connector ### Moomoo API Connector
A robust Python client for moomoo API with comprehensive error handling, rate limiting, and data normalization. A robust Python client for moomoo API with comprehensive error handling, rate limiting, and data normalization.
**Features:** **Features:**
- Historical OHLCV data retrieval - Historical OHLCV data retrieval
- Real-time WebSocket subscription (mock) - Real-time WebSocket subscription (mock)
- Instrument metadata - Instrument metadata
@@ -29,6 +33,7 @@ A robust Python client for moomoo API with comprehensive error handling, rate li
- Mock mode for development - Mock mode for development
**Usage:** **Usage:**
```python ```python
from data.connectors import create_moomoo_client, Interval from data.connectors import create_moomoo_client, Interval
from datetime import datetime, timedelta from datetime import datetime, timedelta
@@ -47,31 +52,38 @@ See `examples/demo_moomoo.py` for complete demonstration.
## Development ## Development
### Prerequisites ### Prerequisites
- Python 3.8+ - Python 3.8+
- Node.js (for frontend, optional) - Node.js (for frontend, optional)
- Docker (optional) - Docker (optional)
- Redis (optional, for caching) - Redis (optional, for caching)
### Setup ### Setup
1. Clone the repository 1. Clone the repository
2. Install dependencies: `pip install -r requirements.txt` 2. Install dependencies: `pip install -r requirements.txt`
3. Run the dashboard: `python app.py` 3. Run the dashboard: `python app.py`
4. Test data connector: `python examples/demo_moomoo.py` 4. Test data connector: `python examples/demo_moomoo.py`
### Data Layer Development ### Data Layer Development
The data connector uses a modular design with base classes for easy extension: The data connector uses a modular design with base classes for easy extension:
- `DataConnector` abstract base class - `DataConnector` abstract base class
- `MoomooClient` implementation with mock mode - `MoomooClient` implementation with mock mode
- Rate limiting and circuit breaker patterns - Rate limiting and circuit breaker patterns
- Caching support (in-memory or Redis) - Caching support (in-memory or Redis)
To extend with real API credentials: To extend with real API credentials:
1. Set environment variables: `MOOMOO_API_KEY`, `MOOMOO_SESSION_TOKEN` 1. Set environment variables: `MOOMOO_API_KEY`, `MOOMOO_SESSION_TOKEN`
2. Set `mock_mode=False` when creating client 2. Set `mock_mode=False` when creating client
3. Implement actual API calls in `_make_request()` method 3. Implement actual API calls in `_make_request()` method
### UI/UX Development ### UI/UX Development
The dashboard is built with Flask (backend) and Bootstrap/Chart.js (frontend). The dashboard is built with Flask (backend) and Bootstrap/Chart.js (frontend).
- Backend: `app.py` provides REST API endpoints - Backend: `app.py` provides REST API endpoints
- Frontend: `templates/dashboard.html` with interactive charts - Frontend: `templates/dashboard.html` with interactive charts
@@ -80,6 +92,7 @@ The dashboard is built with Flask (backend) and Bootstrap/Chart.js (frontend).
A complete clickable mockup of the full platform is available in the `prototype/` directory. This showcases the complete user interface with all major sections: A complete clickable mockup of the full platform is available in the `prototype/` directory. This showcases the complete user interface with all major sections:
**Features demonstrated:** **Features demonstrated:**
- Dashboard with real-time metrics - Dashboard with real-time metrics
- Data management interface - Data management interface
- Strategy engine configuration - Strategy engine configuration
@@ -87,6 +100,7 @@ A complete clickable mockup of the full platform is available in the `prototype/
- Navigation between all platform sections - Navigation between all platform sections
**To use the prototype:** **To use the prototype:**
1. Open `prototype/index.html` in a web browser 1. Open `prototype/index.html` in a web browser
2. Click sidebar navigation to explore different sections 2. Click sidebar navigation to explore different sections
3. Interact with charts, forms, and controls 3. Interact with charts, forms, and controls
@@ -95,4 +109,4 @@ The prototype uses HTML/CSS/JavaScript with Bootstrap and Chart.js, and can be r
## License ## License
Proprietary Proprietary