Sentiment in, risk-checked orders out — an event-driven crypto trading pipeline with volatility-adaptive sizing, momentum-based exits, and full audit logging.
Fully Automated Sentiment-to-Execution Trading Pipeline
7 NestJS Microservices in a Turborepo Monorepo
Dedicated Risk Engine Approving Every Trade
6 External API Integrations — Kraken, Deribit, Binance & 3 Sentiment Sources
Volatility-Adaptive Sizing & Gamma Scalping
Event-Driven TCP Transport with Redis + BullMQ
An event-driven automated trading system for BTC, ETH, and SOL perpetual futures on Kraken Futures. Instead of trading purely on price charts, it continuously measures market sentiment from three independent sources — AI analyst headlines (MarketsAI), social sentiment (LunarCrush), and news articles (NewsData.io) — normalizes each to a −1…+1 scale, and blends them into a weighted composite score every minute during US market hours. Positive sentiment opens longs, negative opens shorts, and neutral regimes trigger small gamma-scalping trades sized by a volatility-regime service backed by the Deribit DVOL index. A dedicated risk-management service approves or rejects every trade against position caps, equity limits, and leverage rules, runs a prioritized exit engine on every sentiment tick, and hands approved orders to an execution service that sets leverage, extracts real VWAP fill prices, and places exchange-side stop-loss and take-profit orders. The whole system is a Turborepo monorepo of 7 NestJS microservices communicating over TCP, with Redis + BullMQ for scheduling and shared state, centralized audit logging, and Docker Compose / PM2 deployment.
Responsibilities
Microservice & monorepo architecture
Risk engine & prioritized exit logic
Order execution & position management
Exchange & sentiment API integrations
Redis/BullMQ scheduling & shared state
Docker Compose & PM2 deployment
Designed and built the entire system end-to-end — a 7-service NestJS monorepo covering the sentiment pipeline, risk engine, volatility-regime detection, exchange execution, and centralized logging.
Sentiment Sources (every 1 min)
Decision Layer
Each sentiment provider speaks a different language — categorical POSITIVE/NEUTRAL/NEGATIVE labels, 1–5 social scores, and confidence-weighted news labels — and any of them can fail or degrade at any time.
Normalized every source to a common −1…+1 scale, combined them with configurable weights into a single composite score with long/short/hold thresholds, and isolated each source's errors so one failing API never kills the trading cycle.
A sentiment score refreshing every 60 seconds can whipsaw, and naively acting on every tick would churn positions and bleed fees.
Layered anti-churn controls into the risk engine: a minimum hold period before momentum exits, a minimum price-move threshold, per-symbol trade cooldowns, and a one-time scale-out flag so partial exits fire only once per position.
Role
System Architect & Backend Developer
Team Size
2 developers
Platform
Headless trading bot (server-side)
Architecture
Event-Driven Microservices (NestJS TCP + Redis/BullMQ)
Database
Redis + MongoDB
Status
Completed
Deployment
Docker Compose / PM2
Let's talk about how I can help build and ship your next production application.