Skip to content

Trading system with go + postgres + kafka + redis + websocket + next.js

Notifications You must be signed in to change notification settings

Imesh7/trading-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trading system using go + next.js

Trading system with go + postgres + kafka + redis + websocket + next.js

Create.Next.App.-.Google.Chrome.2024-02-26.15-06-20.-.Trim.-.Trim.mp4

Simulate Order process in a trading system.

  • Create a order
  • Maintain orderbook
  • Match the order with orderbook

Tech stack used

  • Backend server - Go
  • Kafka
  • Redis (orderbook)
  • Postgres (db)

Running the Application

To run the application, use the following command.
Make sure you already installed Docker.

docker-compose up

Create Order Api Enpoint

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

About

Trading system with go + postgres + kafka + redis + websocket + next.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published