Building a trading application involves a lot of things like the frontend platform, interaction with stock exchanges for placing orders, interaction with banks for fund requirements, user protection features so their trades don't give them wild losses etc...
Your task is to build the frontend of an MVP version of this trading app on Flutter which should include the following feature.
- This is one of the core components on any trading platform.
- We'll give you a json with 30 stocks with their tokens as keys and values containing a bunch of other fields which would be completely suffient for this assignment and you would not require any additional data.
- Display these stocks on the watchlist. It should contain the symbol and the LTP (Last traded price), the process of getting LTP is given below.
- Join the given websocket to display the LTP of the stock on the watchlist. The websocket would be active most of the times, in case there's a downtime, it would be back up in 2 hours. The websocket has a rate limit of 1 message per second, just to be safe take it to be 1.5 sec per message.
- Here's how you can subscribe and unsubscribe to an instrument's LTP:
{ "Task": "subscribe", "Mode": "ltp", "Tokens": [3, 7, 13, 17, 19, 22, 25] } { "Task": "unsubscribe" "Mode": "ltp", "Tokens": [3, 7] }- Display the data received from the websocket on the watchlist corresponding to every stock.
- Implement a delete from watchlist functionality upon left swipe of the specific stock.
- You're supposed to manage the unsubscriptions from websocket as well.
- Core functionality
- Efficiency
- Exhaustiveness of edge cases
- Scalability
- UI/UX Sense
- Code structure and readability
- Any additional features on the given base MVP, given that it doesn't require any additional data inputs or APIs.