Skip to content

artyomsv/crypto-radar

Repository files navigation

CryptoRadar

Real-time cryptocurrency monitoring and trading signal platform with microservice architecture.

Dashboard

Features

  • Live Market Dashboard -- real-time prices, sparklines, and market overview for 13 cryptocurrencies
  • Trading Signals -- automated 6-dimension scoring engine (Technical, Whale, Derivatives, Sentiment, Order Book, Macro) with alignment-weighted signal generation (formerly "confidence" — renamed because outcome analysis showed an inverse correlation with win rate)
  • Market Regime Detection -- BTC 50d SMA + 7d slope classifier produces BULL / BEAR / CHOP / UNKNOWN; feeds the signal engine to raise counter-trend thresholds (e.g., suppresses SELLs while regime is BULL)
  • Trade Setup Detectors -- pluggable rule-based detectors (TrendContinuationDetector, LiquiditySweepDetector) that emit discrete trade setups alongside dimension scoring; new detectors auto-register as CDI beans, each measured independently by the outcome tracker. Each detector can carry its own TrailConfig (activation R, step R, offset R) for per-strategy trailing-stop calibration
  • Trailing-Stop Ladder -- every tracked outcome ratchets a dynamic stop upward as MFE climbs: default config activates at +1R, steps 0.5R, offsets 0.5R behind peak (configurable per strategy). Closed trades record final_exit_reason (TARGET / TRAIL_STOP / INITIAL_STOP / EXPIRED) so the trail's contribution is attributable in metrics
  • Signal Outcome Tracking -- every actionable signal and detector setup is persisted as a TimescaleDB hypertable row and evaluated against live 1m candles. Each row captures entry/stop/target, MFE/MAE, time-to-MFE/MAE, realized R (net of round-trip fees), trail ladder state, and exit reason. GET /api/signals/metrics?periodDays=30 returns aggregate win rate + avg R-multiple + profit factor, plus breakdowns byStrategy / bySignalType / bySymbol / byExitReason / byAlignmentBucket and the currentRegime
  • Deployment Markers -- engine-change cutover timestamps stored in deployment_markers and exposed via GET /api/signals/deployments, so outcome metrics can be sliced cleanly "before/after" a rollout
  • Closed-Loop Feedback UI -- visual feedback loop card on the Signals page showing fired→pending→closed→win-rate flow. Trade ledger surfaces per-trade exit reason as distinct badges (TARGET / TRAIL / STOP / LOCK +NR for open-with-armed-trail / EXPIRED)
  • Live trade execution — optional per-exchange trading service (trade-execution-service) that mirrors signal-service STRONG_BUY/STRONG_SELL signals to real Bybit V5 perpetual orders with native TP/SL and a trailing-stop ladder matching the outcome-tracker's math. Encrypted credentials, withdraw-permission rejection, kill switch, daily-loss halt, and per-symbol flip-close policy.
  • AI Analysis -- integrated Google Gemini AI for on-demand trade evaluation with minimum 3:1 R:R constraint
  • Whale Tracking -- real-time large trade detection across 6 exchanges (Binance, Coinbase, Kraken, OKX, Bybit, Bitfinex) + Whale Alert on-chain monitoring
  • Derivatives & Leverage -- funding rates, open interest, long/short ratios, live liquidation streams, estimated liquidation level maps
  • Technical Analysis -- RSI, MACD, Bollinger Bands, EMA/SMA, ATR, support/resistance, correlation matrix, volatility metrics
  • Screener -- sortable/filterable table combining all data sources
  • Portfolio Tracker -- manual position tracking with P&L
  • News Aggregation -- CoinDesk API + RSS feeds with sentiment scoring
  • Data Export -- CSV export for candles, whale trades, and liquidations

Trading Signals

Signals

Whale Activity

Whales

Leverage & Liquidations

Leverage

Architecture

Frontend (React + Vite)
    |
API Gateway (Quarkus) :8080
    |
    +-- market-data-service :8081  -- Binance REST/WebSocket, candle storage, backfill
    +-- news-service :8082        -- CoinDesk API, RSS feeds, sentiment analysis
    +-- analytics-service :8083   -- Technical indicators, macro data, correlation
    +-- whale-service :8084       -- 6-exchange WebSocket streams, Whale Alert API
    +-- derivatives-service :8085 -- Funding rates, OI, liquidations (Binance/OKX/Bybit)
    +-- signal-service :8086      -- Multi-dimension scoring, Gemini AI integration
    |
    +-- TimescaleDB :5433  -- Time-series data (candles, trades, liquidations)
    +-- PostgreSQL :5434   -- News articles, metadata
    +-- Redis :6379        -- Pub/sub event bus between services

Tech Stack

Backend: Java 21, Quarkus 3.17, RESTEasy Reactive, WebSocket, Scheduled tasks

Frontend: React 19, TypeScript, Vite 6, Tailwind CSS, TradingView Lightweight Charts

Data: TimescaleDB (hypertables with per-table compression at 7d), PostgreSQL, Redis pub/sub

Infrastructure: Docker Compose + Nginx for local dev. Kustomize + CloudNativePG + Barman Cloud for k3s deployment (see devops/README.md)

Quick Start

Prerequisites

Setup

# Clone the repository
git clone https://github.com/artyomsv/crypto-radar.git
cd crypto-radar

# Create .env from template
cp .env.example .env

# (Optional) Add your API keys to .env
# WHALE_ALERT_API_KEY=your_key_here
# GEMINI_API_KEY=your_key_here

# Start all services
docker compose up -d

The dashboard will be available at http://localhost:31000

Services

All host-exposed ports use the 31xxx namespace (per ~/.claude/rules/local-port-ranges.md) to avoid conflicts with gcloud, Tomcat, Spring Boot, Prometheus, and other dev tools that grab the conventional 80xx/8xxx/9xxx ports. Internal container ports stay on the conventional values, so service-to-service traffic in the docker network is unchanged.

Service Host Port Internal Port Description
Frontend 31000 80 React dashboard (Nginx)
API Gateway 31080 8080 REST aggregation + WebSocket
Market Data 31081 8081 Binance price/candle data
News 31082 8082 News aggregation + sentiment
Analytics 31083 8083 Technical indicators + macro
Whale 31084 8084 Large trade tracking
Derivatives 31085 8085 Funding, OI, liquidations
Signals 31086 8086 Trading signal engine + AI
Trade Execution 31087 8087 Bybit V5 mirroring
TimescaleDB 31432 5432 Time-series storage
PostgreSQL 31433 5432 News/metadata storage
Redis 31379 6379 Event pub/sub

Data Sources

Source Data Auth Required
Binance REST + WebSocket Prices, candles, order book, trades No
Binance Futures Funding rates, OI, long/short, liquidations No
OKX WebSocket Trades, liquidations No
Bybit WebSocket Trades, liquidations No
Coinbase WebSocket Trades No
Kraken WebSocket Trades No
Bitfinex WebSocket Trades No
CoinDesk Data API News articles No
CoinGecko Market cap, dominance No
DefiLlama DeFi TVL No
Alternative.me Fear & Greed Index No
Whale Alert On-chain transfers Yes (free tier)
Google Gemini AI trade analysis Yes (free tier)

Configuration

All configuration is managed via the .env file. See .env.example for available options.

Whale trade detection thresholds are tiered by market cap:

  • BTC/ETH/BNB: $5,000+
  • SOL/BCH/ZEC/XMR/LTC: $1,000+
  • Others (DOGE, ADA, XRP, etc.): $500+

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages