Full Transparency

Under the hood

No black boxes. Tradewink runs 75+ concurrent AI loops that monitor markets, generate strategies, execute trades, and improve themselves — all in real time. Here is exactly how it works.

System Architecture

How every piece connects

From a Discord slash command to a filled order at your broker — here is the complete data flow through six architectural layers.

Input Layer

Discord

Slash commands & mentions

Web Dashboard

Settings & monitoring

REST API

Programmatic access

Core Orchestrator

App

Composition root

WatchlistService

Ticker management

StrategyService

Strategy orchestration

Autonomous Agent

75+ Concurrent Loops

Market-hours aware

Strategy Loops

Scan / Update / Exit

Event Bus

Priority async queue

Data Layer

Polygon

Primary market data

Finnhub + EDGAR

News & filings

WebSocket Streams

Real-time bars & trades

AI Layer

Claude Sonnet/Haiku

Analysis engine

Multi-Agent Teams

Debate & consensus

Self-Improver

ML retrainer + RL

Trading Layer

Risk Manager

PDT, limits, circuit breaker

8 Brokers

Alpaca, IBKR, Schwab...

Per-User Keys

Fernet-encrypted

Concurrent Loops

75+ autonomous loops, running right now

Every loop adapts its speed to market conditions. Full speed during market hours, reduced cadence after hours, minimal overnight.

AutonomousAgent initialized — 75+ concurrent loops active
Market Intelligence: Earnings / Insider / SEC / News / Congress
Real-Time Monitoring: Momentum / Macro / Options / Dark Pool
Strategy Engine: Scan / Update / Exit / Sell Confidence
Trade Execution: Screen / Evaluate / Size / AI Score / Execute
Self-Improvement: ML Retrainer / Calibration / Prompt Evolution
Portfolio Health: Risk / Trim / Anomaly / Daily Planning
Options Loops: Flow / GEX / Dark Pool / Max Pain / Wheel
Crypto Loops: Momentum / BTC Dominance / Fear+Greed (24/7)
+ 30 more concurrent loops running right now...
All loops market-hours aware / adaptive cadence / self-improving

Market Intelligence

Scans earnings calendars, insider buys, SEC filings, dark pool prints, and news events — across every ticker.

Earnings ProximityInsider ActivitySEC FilingsNews EventsCongressional Trades

Real-Time Monitoring

Tracks price movements, volatility regimes, options gamma exposure, and institutional dark pool activity in real time.

Intraday MomentumMacro RegimeOptions FlowGEX AnalysisDark Pool Scanner

Strategy Engine

Generates buy/sell strategies via AI, monitors active positions, manages trailing stops, and rotates between factor exposures.

Strategy ScanStrategy UpdateExit StrategySell ConfidenceFactor Rotation

Trade Execution

The execution pipeline: screens candidates, evaluates with AI, sizes positions via Kelly Criterion, and executes through your broker.

Day Trade ScanDay Trade MonitorPre-Market ScanPosition SizingRisk Management

Self-Improvement

Reviews every trade outcome, retrains ML models, adjusts confidence scores, and A/B tests prompt variations to get smarter over time.

Outcome TrackingML RetrainerCalibrationPrompt EvolutionBehavior Analysis

Portfolio Health

Monitors portfolio balance, flags overweight positions, detects statistical anomalies, and generates daily trading plans.

Concentration RiskTrim AlertsAccount TierAnomaly DetectionDaily Planning

Execution Pipeline

From scan to filled order

The autonomous day trading system runs this 6-step pipeline every scan cycle. Each step has safety gates, AI scoring, and risk checks.

STEP 01

Pre-Scan Gates

  • Consistency checker verifies cross-module state
  • HMM regime detection on SPY proxy
  • Intraday regime overlay (5-min efficiency ratio)
  • Monk mode: skip quiet hours, regime transitions, pre-earnings
  • Micro account auto-detection per user
STEP 02

Screen

  • 50+ default tickers + micro universe + Finviz dynamic sourcing
  • Volume, ATR%, gap, RSI, relative volume scoring
  • S&P 500 heatmap movers merged automatically
  • Watchlist tickers prioritized with +15 point boost
STEP 03

Evaluate

  • StrategyEngine + IntradayStrategyEngine analysis
  • Momentum, mean-reversion, breakout, VWAP, ORB strategies
  • Support/resistance integration (pivot, volume, SMA)
  • Signal discretization (5-tier: Strong Buy to Strong Sell)
STEP 04

AI Score

  • Single Claude call per candidate (default, fast)
  • Conviction 0-100 adjusts composite score
  • Opt-in: full 3-agent team evaluation (deeper analysis)
  • Historical trade lessons fed into scoring context
STEP 05

Size & Execute

  • Risk-based, ATR-based, half-Kelly (most conservative wins)
  • Regime-adjusted sizing + cost-aware modeling
  • Smart executor: VWAP/TWAP slicing for large orders
  • Risk check, confirmation, broker submit, audit log
STEP 06

Monitor & Exit

  • MFE/MAE tracking updated every tick
  • Trailing stop with broker sync (cancel old, submit new)
  • Regime-shift exit: AI debate on trending-to-choppy flip
  • Max hold time exit (90 min configurable)
  • Post-trade reflection via AI (lessons stored in DB)

Pipeline runs in both global broker mode (single scan for all) and per-user broker mode (individual scan/evaluate/execute per user).

Data Flow

Every data source. One AI brain. Trades itself.

Six institutional data feeds flow into the AI engine, get cross-validated, and execute inside your brokerage account — automatically.

Data Sources

Polygon

Real-time price & options

Finnhub

News & earnings

Unusual Whales

Dark pool & congress

SEC EDGAR

Filings & form 4s

ORATS

IV rank & vol data

Alpaca

Broker execution

AI Engine

Claude + Multi-model

FilterScoreExplain

Delivery

Discord DM

Private alerts

Webhook

Your own systems

Email

Digest & alerts

REST API

Elite plan access

Tech Stack

Built on battle-tested foundations

Python 3.12+

Async-first with asyncio

Claude AI

Sonnet & Haiku multi-model

PostgreSQL

Production DB via asyncpg

Discord.py

Slash commands + Cogs

TA-Lib

Technical indicators (tiered fallback)

Prometheus

Metrics + health checks

Redis

Caching (in-memory fallback)

Sentry

Error tracking + tracing