Skip to content

Latest commit

History

History
36 lines (22 loc) 路 1.53 KB

README.md

File metadata and controls

36 lines (22 loc) 路 1.53 KB

Real time Stock Trading Chat App

A full stack app that allows traders to look at stocks and chat in real time

Idea:

In bloomberg terminal, you can get live data feeds of stocks as well as be able to chat with other traders. In this app, it provides users with an interface in which they can select the stock that they want to look at, as well as gives the user the ability to join a chat room associated with that stock where users can chat in real time about it.

Screenshot 2023-11-07 at 10 04 19 PM

Implementation:

When user opens up a tab on a given stock, a websocket connection is established with the stock data provider to retrieve values in real time. Then, when the user wants to open chat, another connection is opened with broadcaster running on localhost port, which lets users have group communication. Chat history is stored in a list while there is active users connected in order for new users to see the current chat history.

Tech Stack:

Svelte frontend, Go backend

Setup:

// current implementation runs locally
// localhost:8000 - port for stock data websocket
// localhost:8080 - web UI
// localhost:9000 - port for trader chat websocket
// set POLYGON_API_KEY to the api key that you get from polygon.io. You must have a starter package or higher for 
// stock data in order to get websocket feed

cd backend
go run main.go // start the backend server

cd svelte-app
npm run dev // start frontend