Client is leading stock broking company providing services like stock broking, financial products distribution, wealth management and investment banking. They are serving customers ranging from the retail & institutional investors, corporates and High Net-worth Individuals (HNIs)
Stock trading can become more flexible and faster if traders are notified of significant events of their choice, through custom alerts and notification capability. The automated trading alerts and customized notifications are sent to customer whenever the required specifications are triggered.
We built a solution that allows traders to set alerts for all stocks, bonds, commodities, F&O contracts and currencies across exchanges based on user defined conditions using simple, easy-to-use operators.
Traders are then notified via email/sms and/or push notification of mobile app whenever the trigger condition meets the alert criteria. The Client has around 2,00,000 to 2,50,000 daily active users out of around 7,00,000+ total user base on top of it atleast 5,000-10,000 new accounts created per month.
If we consider on an average each user creating 5 custom alerts, it leads to ~30,00,000 user defined trigger (alert) conditions residing in database. We have to scan all the trigger conditions each time we receive a real-time stock market feed. So, for each feed across 25,000 stock symbols (let’s call it 'n') we need to traverse all 30,00,000 i.e 3 million triggers (let’s call it 'm'), we need to process n*m data per unit time.
For PoC stage, we have divided solution as 3 separate modules:
We tried multiple approaches for processing engine
Currently, we could achieve under 15 secdons turnaround time for triggers at scale of 3 million stored triggers and 25,000 without using Apache Flink or horizontal scaling. We aim to improve system performance further capable of catering 100 million stored triggers data.
With this platform, you as a trader will never miss out on market movements or financial events. With the success of basic events, client is planning to extend this capability to include economic events, technical charting, research alerts and move into subscriptions-based model