The entities are the core for application, in this are the declarations, methods and core business. The logic about all of these are as following:
The investor
is the primary entity of exchange. This entity describes a client that want to make a trade. In this entity we find your name and asset position, as well as business logic to add and update asset positions
The asset
represents the good to be transacted, this have a name and volume in the market.
The transaction
represents a market transaction between two interest parties that have movements shares by a determined price and total amount. This entity has a date time as timestamp to identify when occurred.
In addition, in this entity we could find some important business logics to determine orders pending shares (when a order were partially filled), calculate amount of a transaction and interact with a transaction status.
The order
is the object that represents the flow of a market share. In this we could found the investor that interacts with it, the asset to be transacted, the shares quantity, pending shares, price of order, the type of order, status and transactions involved to close it.
The order_queue
is a auxiliary entity to balance the orders incoming. This entity assign important methods to initiate a heap data structure that will be implemented to organise the book
of transactions.
The book
is the core of transactions made by investors
. In this entity we define the orders, transactions and channels to balance the orders published by clients.
To provide inputs and outputs for broker and provide an interface with services that will accomplish with, we use the Data mapper pattern. The mappers are disposed in the app/market/transformer
and are used to map all inputs and outputs to be processed before sent or recovered by broker.
The Golang was chosen for this project to provide a build-in consistent and easy way to work with concurrency, multithreading and channels.
This project uses the Golang build-in and Testify packages to provide a solution to write and execute testing to cover application necessities.
Under development
Under development
This project uses the Apache Kafka as broker to consume and publish transactions.