Professional cryptocurrency analysis API with real-time market data, technical indicators, and AI-powered insights.
Crypto Analyzer GPT is a professional-grade REST API designed for cryptocurrency analysis and AI integration. Built with FastAPI, it provides comprehensive market data, technical analysis, sentiment tracking, and news aggregation for informed trading decisions.
- 📊 Real-time Market Data - Live OHLCV data and orderbook information
- 📈 Technical Analysis - 15+ technical indicators (RSI, MACD, SMA, EMA, Bollinger Bands)
- 📰 News Aggregation - Multi-source crypto news with sentiment analysis
- 😱 Market Sentiment - Fear & Greed Index and social sentiment tracking
- 🔮 Futures Data - Funding rates and open interest from perpetual contracts
- 🤖 AI Integration - Optimized for CustomGPT and AI trading systems
- 🛡️ Security - API key authentication and rate limiting
- ⚡ Performance - Redis caching and optimized response times
- 💹 Futures Data - Funding rates and Open Interest
- 🚀 AI-optimized - Specifically developed for CustomGPT and other AI systems
- Backend: FastAPI, Python 3.11+
- Database: PostgreSQL, Redis (Caching)
- APIs: Bitget, NewsAPI, CryptoPanic, Fear & Greed Index
- Deployment: Docker, Render Cloud
- Monitoring: Structured Logging, Health Checks
- Python 3.11 or higher
- Redis Server
- PostgreSQL (for Production)
- Docker (for Development)
For local development with Docker (recommended approach):
# Clone and setup
git clone https://github.com/ghiemer/crypto-analyzer-gpt.git
cd crypto-analyzer-gpt
# Quick setup
./quick-setup.sh
# Configure .env with your settings
nano .env
# Start development environment
./dev.sh setup
./dev.sh startDevelopment Features:
- 🐳 Docker-based development environment
- 🔄 Hot reloading for rapid development
- 🗃️ Uses external Render database for realistic testing
- 🔒 Isolated
developbranch keepsmainstable - 🧪 Built-in testing and linting tools
See DEVELOPMENT.md for detailed development instructions.
git clone https://github.com/ghiemer/crypto-analyzer-gpt.git
cd crypto-analyzer-gpt# With pyenv (recommended)
pyenv virtualenv 3.11.3 crypto-analyzer-gpt
pyenv activate crypto-analyzer-gpt
# Or with venv
python -m venv venv
source venv/bin/activate # Linux/Mac
# venv\Scripts\activate # Windowspip install -r requirements.txt# Create .env file
cp config/.env.example .env
# Configure at least these values:
# API_KEY=your-secure-api-key-here
# REDIS_URL=redis://localhost:6379/0# Development Server
uvicorn app.main:app --reload --port 8000
# Production Server
gunicorn app.main:app -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000# Health Check
curl -H "X-API-Key: your-api-key" http://localhost:8000/health
# Bitcoin data with indicators
curl -H "X-API-Key: your-api-key" "http://localhost:8000/candles?symbol=BTCUSDT&indicators=rsi14,sma50"- CustomGPT Integration - Setup and configuration for CustomGPT
- Deployment Guide - Production deployment instructions
- API Documentation - OpenAPI 3.1 schema
- Changelog - Version history and updates
- Contributing - Development guidelines
All configuration files are located in the config/ directory:
config/.env.example- Environment variables templateconfig/pyproject.toml- Python project configurationconfig/pyrightconfig.json- Type checking configuration
# 1. Create Render account
# 2. Create PostgreSQL service
# 3. Create Redis service
# 4. Create Web service with this repository# Render Dashboard -> Environment Variables
API_KEY=your-production-api-key
REDIS_URL=redis://your-redis-instance
DATABASE_URL=postgresql://user:pass@host:port/db
ENVIRONMENT=production
LOG_LEVEL=INFO# Check after deployment
curl -H "X-API-Key: your-key" https://your-app.onrender.com/health- Logs: Render Dashboard -> Logs
- Metrics:
/metricsEndpoint - Alerts: Telegram Bot Integration
# All requests require API-Key header
curl -H "X-API-Key: your-secret-key" https://api.example.com/endpoint- Default: 100 requests per minute
- Configurable via Environment Variables
- IP-based with automatic recovery
- All parameters are validated
- SQL injection protection
- XSS protection through security headers
-
Generate API-Key:
openssl rand -hex 32
-
Configure CustomGPT:
- Base URL:
https://your-app.onrender.com - Authentication: Custom Header
- Header:
X-API-Key: your-key
- Base URL:
-
Example Prompts:
"Analyze Bitcoin with RSI and SMA" "Show me Ethereum news" "What's the market sentiment today?"
# Simplified queries for AI
GET /candles?symbol=BTCUSDT&indicators=all
GET /news?coin=bitcoin
GET /misc/feargreed# Local logs
tail -f logs/app.log
# Render logs
render logs --service your-service-name# Prometheus metrics
curl https://your-app.onrender.com/metrics
# Custom metrics
- Request Count
- Response Time
- Cache Hit Rate
- Error Rate# Run tests
python -m pytest tests/
# With coverage
python -m pytest --cov=app tests/# Postman Collection
./tests/postman/crypto-analyzer.postman_collection.json
# Manual testing
curl -H "X-API-Key: test-key" http://localhost:8000/health- Fork the repository
- Create branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Create Pull Request
- Code Style: Black, isort, flake8
- Documentation: Docstrings for all functions
- Tests: Minimum 80% coverage
- Type Hints: Complete typing
This project is licensed under the MIT License. See LICENSE for details.
- FastAPI - Modern Python web framework
- Bitget - Crypto exchange API
- Render - Cloud hosting platform
- Redis - In-memory caching
- PostgreSQL - Relational database
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
⭐ Like this project? Give us a star on GitHub! ⭐
Developed with ❤️ for the crypto community