Skip to content

Repository files navigation

Special thanks to Aarav for driving the development

Fix Trading Simulator

Overview

A trading simulator between a Broker and a Stock Exchange using the Financial Information eXchange (FIX) Protocol. It's a study project using QuickFIX/J, Quarkus, Angular, Docker, Docker Compose and PostgreSQL.

If you want to participate on this project, just open an issue and we can talk about!

Both Broker and Exchange systems were built with Quarkus on the back-end and Angular on the front-end.

The back-ends communicate each other with QuickFIX/J and each has a schema into the PostgreSQL.

Each Angular front-end communicates with the Quarkus back-end using REST and Websockets.

System Architecture

The architecture consists of:

  • Exchange Back-End: Quarkus REST API with QuickFIX Acceptor
  • Exchange Front-End: Angular UI for exchange management
  • Broker Back-End: Quarkus REST API with QuickFIX Initiator
  • Broker Front-End: Angular UI for broker trading platform
  • PostgreSQL: Shared database for logging and persistence

Project Structure

fix-trading-simulator/
├── scripts/
│   ├── build/
│   ├── debug/
│   ├── ops/
│   ├── tests/
│   └── validation/
├── exchange-back-end/
├── exchange-front-end/
├── broker-back-end/
├── broker-front-end/
├── docker-compose.yml
└── README.md

Broker back-end

Broker front-end

Exchange back-end

Exchange front-end

Features

Orders

You can submit, negotiate, cancel and list your orders.

It's possible to set the Exchange to automatically negotiate the orders.

Every change in the orders are broadcasted using websockets and are immediately updated on the front-end.

Session

Make logon and logout.

View the session status and storage.

View the session configuration.

List the messages sent from the session.

Logs

List the FIX events.

List the messages received and sent.

Running the project

With docker-compose

After start, access project at:

Using the Docker Hub Images

Inside the root folder of the project, execute:

$ chmod +x ./scripts/build/run-from-docker-hub.sh
$ ./scripts/build/run-from-docker-hub.sh

Docker Hub images:

Building the Docker images locally

Inside the root folder of the project, execute:

$ chmod +x ./run-with-local-build.sh
$ ./run-with-local-build.sh

After the first build, you can use the run-after-local-build script.

Without docker-compose

Enter inside the exchange-back-end folder and type:

$ ./mvnw compile quarkus:dev -Ddebug=5006

Access http://localhost:8090/q/swagger-ui/

Enter inside the broker-back-end folder and type:

$ ./mvnw compile quarkus:dev

Access http://localhost:8080/q/swagger-ui/

Enter inside the exchange-front-end folder and type:

$ npm install
$ ng serve

Access http://localhost:4300

Enter inside the broker-front-end folder and type:

$ npm install
$ ng serve

Access http://localhost:4200

Images

Exchange Back End Swagger: image

Broker Back End Swagger: image

Broker Front End - Orders: image

Exchange Front End - Orders: image

Help Queries

What is FIX Protocol?

What is QuickFIX/J?

What is Quarkus?

What is Angular?

What is PostgreSQL?

What is Docker?

What is Docker Compose?

About

A Microservice based Trade order management system built using FIX 4.4 and utilizing decoupled communications from market data aggregation to trade execution and validation.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages