welcomeprojectsconnect

adi

adi. home
projectsconnect
homeconnect
blogcoming soon!projects
githubmaillinkedin
← back to projects

case study

crypto market maker simulator

A full-stack crypto market-making simulator for BTC/USDT and ETH/USDT, with configurable two-sided quotes, inventory-aware strategy, simulated fills, portfolio accounting, and real-time market monitoring.

crypto market maker simulator project preview

overview

An educational market-making desk simulation built end to end. A configurable quote engine places simulated bids and asks around the market price, accounts for inventory skew and hard risk limits, and tracks fees, positions, and realised and unrealised P&L. The deterministic default feed makes sessions reproducible, while an opt-in Kraken public ticker provides live prices without placing real orders.

architecture

React / Vite / TypeScript / Tailwind dashboard → Nginx → FastAPI REST and bounded WebSocket updates → async SQLAlchemy / Alembic → PostgreSQL. Market data is provided by a deterministic simulator by default or Kraken's public v2 ticker when enabled.

engineering focus

  • Applying Decimal arithmetic to financial quantities and keeping accounting values precise across API boundaries.
  • Designing inventory-aware quoting and explicit risk controls that suppress quotes when market data is stale or limits are breached.
  • Separating market-data providers behind an interface so simulated and public live feeds share the same engine.
  • Coordinating async REST APIs, bounded WebSocket events, persistence, migrations, and a real-time React dashboard.
  • Making the system reproducible and testable through deterministic simulation and CI.

highlights

  • Decimal-based quote generation with configurable spread, quote size, inventory skew, and inventory/exposure limits.
  • Simulated quote-crossing fills, fees, long/short positions, average entry price, and realised/unrealised P&L.
  • Live dashboard for market prices, bid/ask quotes, strategy versions, portfolio, fills, and risk headroom, updated over WebSockets.
  • Deterministic simulated market feed plus optional Kraken v2 public ticker with reconnect backoff and stale-data detection.
  • PostgreSQL persistence for sampled market observations, immutable strategy versions, simulated trading state, and trade history.
  • Docker Compose deployment and CI checks for backend and frontend linting, types, tests, and builds.

project context

Simulation and education only: no real orders or funds are used, and the public market-data provider needs no private exchange API credentials.

project media

Existing portfolio media

crypto market maker simulator visual

technology & focus

view on GitHub →
PythonFastAPIReactTypeScriptPostgreSQLWebSocketsDockerTrading Systems
← junia tourism
DISCUSS A PROJECT