A sophisticated market phase detection and analysis bot that operates through Telegram, providing real-time market insights and automated trading signals.
- Real-time market phase detection
- Interactive Telegram bot interface
- Multiple timeframe analysis
- Support for various market indices
- Customizable symbol tracking
- Automated notifications for phase changes
- Clone the repository:
git clone https://github.com/henryjrobinson/blackprint.git
cd blackprint- Install dependencies:
pip install -r requirements.txt- Configure environment variables:
cp env.example .envEdit .env with your:
- Telegram Bot Token
- Alpaca API Key and Secret
- Other configuration parameters
blackprint/
├── bot/ # Bot implementation
│ ├── __init__.py
│ ├── telegram_bot.py # Main bot logic
│ ├── market_phases.py # Market phase detection
│ └── main.py # Entry point
├── tests/ # Test suite
│ ├── conftest.py # Test configuration
│ ├── test_telegram_bot.py
│ └── test_market_phases.py
├── requirements.txt # Project dependencies
├── .env.example # Environment template
└── README.md
The project uses pytest for testing with async support. Run tests with:
pytest -v- Unit tests for all bot components
- Integration tests for market phase detection
- Comprehensive button and command testing
- Mock implementations for external APIs
-
Environment Setup
- Python 3.10+
- Virtual environment recommended
- Required packages in requirements.txt
-
Running Tests
pytest tests/ -v
-
Running the Bot
python -m bot.main
/start- Initialize bot and show main keyboard/analyze [symbol]- Analyze market phase for a symbol/historical [symbol]- View historical phase changes/setcandle [timeframe]- Change analysis timeframe/setindex [index]- Change reference market index
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License - see LICENSE file for details