Simulate Order process in a trading system.
- Create a order
- Maintain orderbook
- Match the order with orderbook
- Backend server - Go
- Kafka
- Redis (orderbook)
- Postgres (db)
To run the application, use the following command.
Make sure you already installed Docker.
docker-compose up
http://localhost:8000/create-order
Request Body
//create a Ask(sell) order
{
"user_id":1000000,
"order_type":4,
"type":"ask",
"price":100,
"volume":150,
"buying_pair":"usd",
"selling_pair":"btc"
}
//create a Bid(buy) order
{
"user_id":1000000,
"order_type":4,
"type":"bid",
"price":100,
"volume":150,
"buying_pair":"usd",
"selling_pair":"btc"
}
Get orders API
http://localhost:8000/get-orders