Skip to content

Services

TradeX consists of multiple microservices, each responsible for a specific domain.

Language: Go
Purpose: Market data ingestion and distribution

  • Consumes trade & order-book data from Kafka
  • Maintains per-symbol order books (L2)
  • Publishes WebSocket feeds (trades, book, ticker, kline)
  • Provides REST API for snapshots and history
  • Exposes gRPC for internal services

Documentation: Market Data API

Language: NestJS (TypeScript)
Purpose: Order management and execution

  • Handles order intake and validation
  • Manages wallet and risk bookkeeping
  • Integrates with Kafka and Drizzle pipelines
  • Processes order lifecycle events

Documentation: Order API

Language: FastAPI (Python)
Purpose: Authentication and authorization

  • Manages user authentication
  • Handles token lifecycle (JWT)
  • PostgreSQL persistence
  • API key management

Documentation: Auth API

Language: FastAPI (Python)
Purpose: User profile management

  • User profile and preferences
  • KYC (Know Your Customer) management
  • Kafka consumers for user events
  • MongoDB and PostgreSQL storage

Documentation: User API

Language: FastAPI (Python)
Purpose: Wallet operations

  • Balance management
  • Deposit and withdrawal processing
  • Transaction history
  • Hold and release operations

Documentation: Wallet API

Language: Go
Purpose: Trading symbols and configuration

  • Symbol and instrument management
  • Index price configuration
  • Market configuration
  • Trading rules and parameters

Documentation: Metadata API

Language: Rust Purpose: Order matching and execution

  • High-performance order matching
  • Order book management
  • Trade execution
  • Redis, MongoDB, and Prometheus integration

Language: Go Purpose: Automated market making and liquidity provision

  • Actor model architecture (one worker per symbol)
  • Inventory-adjusted spread pricing algorithm
  • Real-time order placement and management via Order Service
  • Risk management with automatic kill switch
  • Position and P&L tracking
  • Shadow mode for testing strategies

Key Features:

  • Quoting Engine: Computes bid/ask prices with inventory adjustment
  • Risk Guards: Pre-trade checks for position and loss limits
  • Kill Switch: Automatic shutdown on risk violations (exposure, loss, lag, reject storm)
  • Multi-level Quoting: Configurable depth with progressive spreads
  • Shadow Mode: Test strategies without placing real orders

Integration Points:

  • Kafka: Consumes market data and engine events
  • Order Service: Places/cancels orders via HTTP API
  • Metadata Service: Fetches instrument definitions via gRPC
  • PostgreSQL: Stores configurations, positions, and orders

Documentation: Market Maker Service | Market Maker API