Skip to content

A simple backend service for placing and matching buy and sell orders.

Notifications You must be signed in to change notification settings

JoyBoy779/Order-Execution-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Order Execution Engine

This is a simple backend service for placing buy and sell orders and doing basic order matching.

The goal of this project was to understand how an order execution system works at a basic level and to build a working API.

What this does

  • Accepts buy and sell orders using a REST API
  • Stores orders in a database
  • Matches buy and sell orders based on price
  • Returns order id and status

Tech Used

  • Node.js
  • TypeScript
  • Express
  • SQLite

What is simplified

  • Partial order fills are not handled
  • No Redis or Kafka
  • No WebSockets or real-time updates
  • Single file implementation

These parts can be improved later.

API

POST /orders

Example request:

{
"side": "BUY",
"price": 100,
"quantity": 2
}

Example response:

{
"orderId": "some-uuid",
"status": "OPEN"
}

How to run

  1. Install dependencies
    npm install

  2. Start server
    npm start

  3. Server runs on
    http://localhost:3000

Notes

This project focuses on implementing the basic order matching logic in a clear and simple way. More advanced features like performance optimizations and real-time updates were not the focus of this version.

About

A simple backend service for placing and matching buy and sell orders.

Topics

Resources

Stars

Watchers

Forks