A simple code for stock trade demo
- Start a http server without TLS by command
make run
, server will listen to 8080 port. - Send request to server, and monitor state changed on terminal. See API from swagger.yaml.
- By default, AAPL, GOOG, MSFT are available to trade.
3 layer architecture is used as design,
- Application layer map to presentation/, http restful API is support now, registered by RestRouter() func
- Service layer map to services/, stock service is support now, matching the buy/sell order
- Model layer map to model/, define a rich model to control model, like stock order.