saanjaypatil78/trading-platform

AI BASED Customized trading Platform

0 stars0 forksUpdated Jan 23, 2026
npx skills add saanjaypatil78/trading-platform

README

Trading Platform

A complete algorithmic trading platform combining Chartink (stock screeners) and OpenAlgo (order execution) features.

Open in GitHub Codespaces Open in Gitpod

๐Ÿš€ Quick Start

Option 1: One-Click Cloud Launch

  • GitHub Codespaces: Click the badge above or press . on GitHub
  • Gitpod: Click the Gitpod badge above
  • Google Colab: Upload colab_setup.py and run all cells

Option 2: Local Launch

python launcher.py

Option 3: Manual Start

# Start services individually
python backend/services/brain/main.py   # Port 8007
python backend/services/scanner/main.py # Port 8008
python backend/services/broker/main.py  # Port 8009

# Start frontend
cd frontend/static && python -m http.server 8000

๐Ÿ“Š Features

Scanner Engine (Chartink-style)

  • 16+ Technical Indicators: RSI, MACD, SMA, EMA, Bollinger, ATR, VWAP
  • Custom Conditions: rsi(14) > 70, sma(50) > sma(200)
  • Pre-built Templates: RSI Overbought, Golden Cross, Death Cross
  • Real-time Scanning: Scan entire stock universes

Order Execution (OpenAlgo-style)

  • Paper Trading: Simulated broker with slippage & commissions
  • Order Types: Market, Limit, Stop Loss, SL-Market
  • Position Tracking: Real-time P&L calculation
  • Webhook Support: TradingView, Amibroker integration

AI Brain (Chain-of-Thought)

  • Sequential Thinking: Explainable multi-step reasoning
  • 5 Trading Strategies: Entry, Risk, Regime, Portfolio, Earnings
  • Knowledge Graph Memory: Persistent context and learning

Workflow Tools

  • Action Center: Auto/Semi-Auto execution modes
  • Smart Router: Latency-based order routing
  • Monitoring: Latency P50/P95/P99, Traffic analytics, P&L tracking
  • Telegram Bot: Real-time notifications

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Frontend (Static HTML)                 โ”‚
โ”‚   No npm required - Uses Tailwind CDN + Vanilla JS  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ–ผ                โ–ผ                โ–ผ
   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚  Brain   โ”‚    โ”‚ Scanner  โ”‚    โ”‚  Orders  โ”‚
   โ”‚  :8007   โ”‚    โ”‚  :8008   โ”‚    โ”‚  :8009   โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                โ”‚                โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                          โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ–ผ                                 โ–ผ
   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚  Shared  โ”‚                     โ”‚  Broker  โ”‚
   โ”‚  Brain   โ”‚                     โ”‚  Adapter โ”‚
   โ”‚  Memory  โ”‚                     โ”‚  Paper   โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ Project Structure

trading-platform/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”œโ”€โ”€ brain/      # AI reasoning API
โ”‚   โ”‚   โ”œโ”€โ”€ scanner/    # Stock screener API
โ”‚   โ”‚   โ””โ”€โ”€ broker/     # Order execution API
โ”‚   โ””โ”€โ”€ shared/
โ”‚       โ”œโ”€โ”€ brain/      # SequentialThinker, KnowledgeGraph
โ”‚       โ””โ”€โ”€ workflow/   # ActionCenter, Monitoring
โ”œโ”€โ”€ frontend/
โ”‚   โ””โ”€โ”€ static/         # No-build HTML frontend
โ”œโ”€โ”€ launcher.py         # Universal launcher
โ”œโ”€โ”€ colab_setup.py      # Google Colab script
โ”œโ”€โ”€ codespaces_setup.sh # Bash setup script
โ”œโ”€โ”€ .devcontainer/      # GitHub Codespaces config
โ””โ”€โ”€ .gitpod.yml         # Gitpod config

๐Ÿ”Œ API Endpoints

Brain Service (Port 8007)

EndpointMethodDescription
/api/v1/brain/entry-analysisPOSTBuy/Sell decision
/api/v1/brain/risk-assessmentPOSTPosition sizing
/api/v1/brain/regime-detectionPOSTMarket regime
/api/v1/brain/earnings-playPOSTOptions strategy
/api/v1/brain/memoryGETKnowledge graph

Scanner Service (Port 8008)

EndpointMethodDescription
/api/v1/scanner/scanPOSTRun custom scan
/api/v1/scanner/templatesGETList templates
/api/v1/scanner/template/{name}POSTRun template
/api/v1/scanner/indicators/{symbol}GETGet indicators

Order Service (Port 8009)

EndpointMethodDescription
/api/v1/orders/placePOSTPlace order
/api/v1/ordersGETList orders
/api/v1/positionsGETCurrent positions
/api/v1/fundsGETAvailable capital
/api/v1/webhookPOSTTradingView signal

๐Ÿงช Testing

# Run all tests
python test_openalgo.py
python test_workflow.py
python verify_modules.py

# Debug agent
python debug_agent.py --fix

๐ŸŽฅ Demo Videos

The following videos demonstrating key features have

...

Read full README

Statistics

Stars0
Forks0
Open Issues3
CreatedJan 22, 2026