Code Monkey home page Code Monkey logo

scalablesolutions's Introduction

Scalable Solutions test assignment

The purpose of this assignment was to implement a simplified order book.
Functional requirements:

  • GTC orders placement
  • Cancellation of orders by the identifier
  • Retrieving orders data by the identifier
  • Orders matching
  • Retrieving market data snapshot:
{
  "asks": [
    {
      "price": "<value>",
      "quantity": "<value>"
    },
    ...
  ],
  "bids": [...]
}
  • Code should be developed on C++11 or C++14, be documented and be built on gcc5+ or clang via CMake for Linux
  • Class should be covered with unit tests

How to build

This project is developed on C++14 (clang-1200.0.32.29) for macOS/Linux.
It requires CMake 3.5+ for building and uses GoogleTest for unit testing and Git for VCS.

To build & run the test assignment, execute the following commands from cmake-build-debug folder:

cmake -G "Unix Makefiles" .. && make    # 1. build
./OrderBookTests/tests/RunTests         # 2. run tests

Orders matching logic

The following rules are used for orders matching:

  • If a bid order comes in at a price greater or equal than the lowest ask price, then we execute order by ask price. The buyer buys at his proposed price or less. The seller sells at his proposed price.
  • Either if an ask order comes in at a price lower or equal to the highest bid price in the order book, then the order is executed by bid price. The seller sells at his proposed price or more. The buyer buys at his proposed price.

scalablesolutions's People

Contributors

kalkolay avatar

Watchers

 avatar

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.