Mukachi / InertiaTrader

Simulate stock/future trading system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

InertiaTrader

Build Status

The project is mainly produce to simulate a stock/future trading system

Features

  • Simulate the financial product trading
  • One by one matching method
  • Immediate settlement contract
  • Immediate account detail provide
  • Databases replication
  • Add market maker to enhance the probablility of match up success
     

Structure

Alt text

 

Tech

Inertia Trader uses several manner to make sure the trading stability:

  • C++11
  • MariaDB 10.5.9
  • node.js - evented I/O for the backend
  • Express - fast node.js network app framework
     

Installation

Install the dependencies and devDependencies and start the server.

cd InertiaTrader
make main
./trader.out devel

 

Plugins

Instructions on how to use them in your own application are linked below.

Plugin README
GitHub [InertiaTrader/README.md][PlGh]

 

Docker

InertiaTrader is very easy to install and deploy in a Docker container.

Dockerised InertiaTrader(port 1203)

docker build -t inertiatrader .
docker run -it inertiatrader ./trader.out devel -- --coverage

Dockerised Database(port 3306)

docker build -f dockerfile.db -t mydb .
docker run -d -p 3306:3306 --name mydb-container mydb

Dockerised trading environment deploy

docker-compose up -d

Shut down whole docker stack

docker-compose down

RESTFUL API

GET Login

/connTrader?username={username}&password={password}

GET Create account

/addTrader?username={username}&password={password}

GET Send Order

/clicked?sideselect={side}&orderprice={orderprice}

Contributors

Contributors

License

MIT

About

Simulate stock/future trading system

License:MIT License


Languages

Language:C++ 96.2%Language:Makefile 2.7%Language:Objective-C 0.7%Language:Shell 0.4%