Skip to content

dthinkr/trading_platform

Repository files navigation

Trading Platform Logo

Trading Platform

A platform for conducting financial market experiments with multiple traders and role-based interactions.

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors License Badge

Key Features (v2.2.0) 🚀

🏗️ Session-Based Architecture

  • Lightweight session pools with lazy market creation
  • Zero resource waste from zombie markets

🎭 Role-Based Trading

  • Informed traders (buy/sell specialists)
  • Speculators (flexible strategies)
  • Automatic goal-based trader matching

👥 Multi-Trader Markets

  • Coordinated market starts when all traders ready
  • Real-time status updates and waiting room
  • Seamless session-to-market conversion

📊 Real-Time Data

  • Live order book and price charts
  • Instant execution feedback
  • Market summary with P&L and VWAP

🔒 Infrastructure

  • Google authentication
  • WebSocket communication
  • Comprehensive error handling
  • Modular event-driven architecture

🏗️ How Multi-Trader Markets Work

Session pool mechanism handles multiple human traders elegantly:

Session Pool Phase

  1. Users join lightweight session pools (not heavy markets)
  2. Goal assignment based on predefined slots (e.g., [100, -200, 150])
  3. Real-time trader count updates ("2 out of 3 traders joined")

Market Creation Phase

  1. All traders ready → automatic market creation
  2. Heavy infrastructure created only when needed
  3. Human + AI traders added, trading begins

Benefits

  • Fast user onboarding
  • Zero resource waste
  • Automatic role assignment
  • Seamless scaling

Quick Start

One-Line Installation

bash <(curl -sSL https://raw.githubusercontent.com/dthinkr/trading_platform/main/trading_platform_run.sh)

Development Setup

# Frontend
cd front
npm install
npm run dev

# Backend
cd back
pip install -r requirements.txt
uvicorn api.endpoints:app --reload

Documentation

For detailed documentation, feature explanations, and API references, please visit our Wiki.

Recent Updates

See our Changelog for detailed version history and updates.

License

MIT License - see LICENSE for details.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •