Skip to content

A distributed market data and arbitrage engine composed of an exchange simulator and an event-driven trading engine.

Notifications You must be signed in to change notification settings

dev-opus/market-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Market Engine

Sandboxed cross-exchange trading stack: simulated exchanges plus a NestJS engine that listens for market data, detects arbitrage, and (currently) simulates execution.

Architecture

  • Exchange Simulator: Fake exchange exposing REST depth snapshots and WS depth updates.
  • Trading Engine: NestJS service with three pieces:
    • Feed: Maintains WS connections, snapshots, and emits orderbook updates.
    • Arbitrage: Finds best bid/ask across exchanges, de-dupes via Redis, emits opportunities.
    • Execution: Logs/handles opportunities (placeholder for real orders).

Folder Structure

  • exchange-simulator/ — Simulated exchange; see readme.
  • trading-engine/ — Engine + arbitrage logic; see readme.

How to Run (quick start)

From the project root (market-engine), using the Makefile:

  1. Install dependencies:
make deps
  1. Build simulator images (first time or after simulator changes):
make simulators-build
  1. Start simulators, Redis, and trading engine:
make up
  1. Stop everything:
make down

See the package READMEs in each folder for deeper details and configuration.

About

A distributed market data and arbitrage engine composed of an exchange simulator and an event-driven trading engine.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published