Skip to content

Latest commit

 

History

89 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TradeOS — Trading Operating System

A multi-asset, multi-exchange trading platform with paper and live modes. Trade crypto, stocks, forex, and commodities from a single interface.

Quick Start

cd TradeOS_root
./start.sh core    # Start all services

Then open: http://localhost:8000/trade

Features

Trading

  • Multi-asset: Crypto (619 Binance pairs), Stocks (AAPL, TSLA, NVDA...), Forex (EUR/USD, GBP/USD), Commodities (Gold, Oil)
  • Paper mode: Practice with virtual $10K balance, real market prices
  • Live mode: Connect Binance or Gate.io API keys for real trading
  • Any instrument: Search 638+ instruments, trade any of them
  • Candlestick charts: Real-time charts with 5 timeframes (1m, 5m, 15m, 1h, 1d)

Risk Management

  • Stop-Loss / Take-Profit: Set price-based auto-exit conditions
  • Trailing Stop: Follows price up, closes on X% drop
  • Time Exit: Auto-close after N hours
  • Governor: Emergency halt all trading with one click
  • Reconciliation: Continuous ledger-vs-exchange verification

Portfolio

  • Live PnL: Real-time unrealized profit/loss with live prices
  • Portfolio summary: NAV, cash %, allocation by asset
  • Position management: Close 50% or 100% of any position
  • Trade notes: Record why you entered each trade
  • Trade history: Full history with filtering

Automation

  • Bot management: Deploy, start, stop trading bots
  • 3 strategies: MA Trend, Mean Reversion, Momentum
  • Decision trace: Full audit trail of every trade decision
  • Telegram alerts: Trade notifications and commands (when configured)

Pages

URL Description
http://localhost:8000/trade Trading (chart, form, positions)
http://localhost:8000/bots Bot management
http://localhost:8000/history Trade history
http://localhost:8000/setup Configuration (mode, exchange, wallet)
http://localhost:8000/ui System dashboard

Architecture

19 microservices on Docker Compose:

Gateway (8000) ─── Trade UI, API proxy, price cache
Market Data Hub (8011) ─── Binance WebSocket, 6 symbols streaming
Indicator Engine (8008) ─── Technical indicators from live data
Bot Runner (8001) ─── Automated strategy execution
Governor (8003) ─── Risk state machine (Normal/Caution/Halted)
Portfolio (8005) ─── Capital allocation, exposure tracking
Execution Gateway (8007) ─── Order routing (Paper/Binance/Gate.io/IBKR)
Ledger (8004) ─── Positions, PnL, trade history (SQLite)
Reconciliation (8006) ─── Ledger vs exchange verification
Decision Trace (8013) ─── Full audit trail per trade
Telegram Bot (8027) ─── Alerts and commands
+ Redis, Observability, Reporting, Backtest, Optimizer, etc.

Configuration

Paper Mode (default)

No configuration needed. Start trading immediately with $10K virtual balance.

Live Mode

  1. Open http://localhost:8000/setup
  2. Select "Live Trading"
  3. Choose exchange (Binance or Gate.io)
  4. Enter API key and secret
  5. Save → restart services

Telegram Alerts

Set environment variables in docker-compose.core.yml:

- TELEGRAM_TOKEN=your_bot_token
- TELEGRAM_CHAT_ID=your_chat_id

Commands: /status, /positions, /pnl, /halt, /resume

Data Persistence

All data survives Docker restarts:

  • Positions & PnL: tradeos-ledger-service/tradeos_ledger.db
  • Conditional orders (SL/TP): TradeOS_root/tradeos_orders.db
  • Configuration: TradeOS_root/tradeos_config.db
  • Decision traces: tradeos-decision-trace/decision_traces.db

Commands

./start.sh core      # Start 19 services
./start.sh stop      # Stop all
./start.sh status    # Container health
./start.sh logs      # Tail all logs
./start.sh logs gateway  # Tail specific service

Tech Stack

  • Language: Python 3.11
  • Framework: FastAPI + Uvicorn
  • Event Bus: Redis 7 (pub/sub)
  • Storage: SQLite (ledger, config, traces)
  • Market Data: Binance WebSocket + REST, Yahoo Finance
  • Charts: Lightweight Charts (TradingView)
  • Orchestration: Docker Compose
  • Encryption: Fernet (API key storage)

Repository Structure

42 repos under /Users/luaysakr/Documents/GitHub/tradeos/:

Category Repos
Core tradeos-contracts, tradeos-shared, tradeos-connectors
Data tradeos-marketdata-hub, tradeos-indicator-engine, tradeos-feature-store
Execution tradeos-execution-gateway, tradeos-ledger-service, tradeos-portfolio-coordinator
Risk tradeos-trading-governor, tradeos-reconciliation-service
Decision tradeos-decision-trace, tradeos-certainty-engine, tradeos-bot-runner
Research tradeos-backtest-sim, tradeos-optimizer, tradeos-reporting
UX tradeos-telegram-bot, tradeos-charts-service, tradeos-ui
AI tradeos-ai-platform, tradeos-ai-services
Deploy tradeos-deploy, tradeos-deployments, TradeOS_root

About

Open-source multi-asset trading platform demonstrating product discovery, portfolio management, execution, reconciliation, risk governance and decision explainability.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages