id: README
Mercury Technical Analysis Service
Overview
Mercury TA is a technical analysis service providing market indicators and trading signals for cryptocurrency markets. It offers a REST API with various endpoints for different types of analysis.
Status
- Version: 1.1.0
- Stage: Production
- Last Updated: 2024-12-25
Components
API Endpoints
/health- Health check endpoint/analysis- Multi-timeframe analysis (up to 3 timeframes)/rsi- RSI indicator analysis/bollinger- Bollinger Bands analysis/macd- MACD indicator analysis/ichimoku- Ichimoku Cloud analysis/trend- Trend strength analysis using ADX/volatility- Volatility analysis using ATR
Features
- Basic authentication for all endpoints
- 1-minute response caching using Redis
- Authenticated Bybit API integration
- Support for multiple timeframes in analysis
- Rate limiting and error handling
- CORS support
- Error rate tracking and monitoring
NEXT_TASK: Implement error rate tracking for analysis endpoints to monitor service reliability and improve error handling
Technical Implementation
Authentication
- Basic auth using username/password
- Credentials stored in environment variables
- All endpoints require authentication
Caching
- Redis-based caching system
- 1-minute TTL for all responses
- Namespace-based key organization
- Cache bypass for health check endpoints
Data Fetching
- Authenticated Bybit API integration
- Rate limit avoidance using API keys
- Error handling for API failures
- Data validation and cleaning
Analysis
- Support for multiple timeframes (1-3)
- Consolidated signals across timeframes
- Confidence scoring based on multiple indicators
- Trend strength assessment
Configuration
Required environment variables:
BYBIT_API_KEY=your_api_key
BYBIT_API_SECRET=your_api_secret
REDIS_URL=redis://host:port/db/namespace
Development Guidelines
-
Authentication:
- All new endpoints must implement basic auth
- Use the
verify_credentialsmiddleware
-
Caching:
- All GET endpoints are automatically cached
- Use cache middleware for new endpoints
- Health checks bypass cache
-
API Design:
- Follow REST principles
- Use proper HTTP status codes
- Include error details in responses
-
Testing:
- Write unit tests for new endpoints
- Include error case coverage
- Test cache behavior
Implementation Status
- Basic API structure
- Technical indicators
- Authentication system
- Redis caching
- Multi-timeframe analysis
- Bybit API integration
- Error handling
- Documentation
- Testing
NEXT_TASK: Implement advanced indicator combinations by combining RSI, MACD, and Bollinger Bands signals with weighted scoring system for more accurate trend predictions