Code Monkey home page Code Monkey logo

java-matching-engine-core's Introduction

Java-Matching-Engine-Core

Java CI with Maven

A matching engine written in Java.

What is a matching engine?

A matching engine matches buy and sell orders in a market.

Matching Algorithm

The matching engine uses a price-time-priority algorithm. The matching priority is firstly price, then time. Market participants are rewarded for offering the best price and coming early.

Usage

The Java-Matching-Engine is broken up into multiple projects. This is the 'core' project. This project only contains the engine (no REST API, persistence, etc).

To use this project, you will need to include the 'core' package as part of your Spring configuration scanning (as seen below).

@SpringBootApplication(scanBasePackages = "net.laffyco.javamatchingengine.core")
public class ExampleApp {

    @Autowired
    private IOrderInterface orderInterface

    public static void main(final String[] args) {
        SpringApplication.run(ExampleApp.class, args);
        System.out.println(this.orderInterface.getOrders());
    }

}

In the example above, we are interacting with the order book through the OrderInterface. The example starts and prints the orders to the console (it will be empty as no orders have been added). In most cases you will want to use some of the other Java-Matching-Engine projects as these add additional functionality (such as a REST API) that may suit your needs.

It is recommended that every user of this service audits and verifies all underlying code for its validity and suitability. Mistakes and bugs happen.

java-matching-engine-core's People

Contributors

laffini avatar

Forkers

the-quantum-boy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.