A financial exchange written in Go including complete order book, fix protocol, and market data distribution.
Uses quickfixgo or gRPC for client/server communication.
Uses UDP multicast for market distribution.
It uses the high-performance fixed point library fixed.
There is a sample client with a command line GUI, a sample "market maker", and a sample "playback".
The exchange itself has a bare bones web interface, that uses web sockets to provide real-time book updates.
The exchange is designed to allow for easy back-testing of trading strategies. It supports limit and market orders.
There is a very simple sample "algo". The program structure is applicable to many strategies that use an entry and exit price. This can be run in conjunction with the 'marketmaker' sample to test the "algo". Hint: it has a 50/50 chance of being successful EXCEPT the market maker bid/ask spread must be accounted for - which makes it far less than a 50/50 chance of being profitable...
It was primarily developed to further my knowledge of Go and test its suitability for high-performance financial applications.
go get github.com/robaho/go-trader
go install github.com/robaho/go-trader/cmd/exchange
go install github.com/robaho/go-trader/cmd/client
go install github.com/robaho/go-trader/cmd/marketmaker
go install github.com/robaho/go-trader/cmd/playback
marketmaker -symbol IBM
Using the quickfixgo connector:
1 market maker can perform 6k round-trip quotes/sec
4 market makers can perform 16k round-trip quotes/sec
Using the gRPC connector:
1 market maker can perform 12k round-trip quotes/sec
4 market makers can perform 30k round-trip quotes/sec
access full book (use guest/password to login)