The Order Matching System is a software project designed to continuously track orders created on different markets hosted on a Substrate node. Its primary purpose is to identify and match orders that overlap with each other, thereby creating market positions. This documentation provides an overview of the project's objectives, functionality, and usage instructions.
The primary purpose of the Order Matching System is to:
-
Continuously monitor and track orders placed on various markets hosted on a substrate node.
-
Identify orders belonging to the same market, have different owners and overlap in terms of price - short position is lower than long position.
-
Match overlapping orders to create market positions, reducing overlap.
The Order Matching System consists of several key components:
-
Market Tracking: Monitors and manages markets present on the node, collecting order data.
-
Order Matching: Utilizes a subscription-based mechanism to track newly created orders posted on the Indexer and triggers order matching.
-
Position Creation: Converts matched orders into market positions posted on the substrate node.
- Order Matching System (this)
- Indexer (https://github.com/bigshortbets/indexer)
To use the Order Matching System, follow these steps:
- Node.js (latest stable version recommended)
- Running substrate node
- Running indexer with graphQL server exposed
-
Clone the repository: git clone https://github.com/bigshortbets/order-matcher
-
Navigate to the project directory: cd order-matcher
-
Install the required dependencies: npm install
After setting up, you can run the project : npm start
blockydevs
ISC