DEV Community

Cover image for I created a Search Engine for Stock's ROI Analysis using Vue and Node JS
Rajaruban
Rajaruban

Posted on

I created a Search Engine for Stock's ROI Analysis using Vue and Node JS

Brief Overview

I created this search engine called SavaJava which helps to screen any stocks in USA(NYSE & NASDAQ), Malaysia(KLSE) and Singapore(SGX) exchanges. The app does three 3 things:

  1. General Use - Provides Web Search Functionality for general users
  2. Developer Use - Provides RESTful Web Service for developers
  3. Provides independent Analytics using in-house algorithms on screened stocks (more on this later here!)

Architecture

This application is built on Vue JS for the client and Node JS for the server. Although I got to admit I enjoyed working on the server more as it houses many in-house algorithms there such as:

  1. Dividend Frequency Detector Algorithm (Responsible for checking whether a stock pays dividend Annually, Bi-Annually, Quarterly or Monthly)
  2. Dividend Suspension Detector Algorithm (Responsible for checking whether how many times a stock had suspended or missed its dividend payment dues)
  3. Real-Time Forward Yield Algorithm (Responsible for displaying accurate yield based on latest dividend data and other analytics)
  4. Dynamic Search Query Algorithm (Responsible for checking and transforming user input search query into payload that is acceptable by the API endpoint for processing)
  5. Dynamic API Key Generator Algorithm (Responsible for generating dynamic API Key on daily basis to protect the server from brute forced or overloaded)

General Use Case

The Web Search returns 3 things, which are Dividend Analysis, Fundamentals, and Dividend History. There is no restriction on the app on who can use the web search functionality. Doesn't matter if the user is an investor, accountant, financial analyst, trader, banker or even developer, still they will find it useful before they commit their hard-earned money to any investment decisions.

Figure 1.0 - Shows Web Search mode, where user is searching for Apple stock(NASDAQ)

Figure 1.1 - Search result for Apple stock (NASDAQ), notice that Apple has suspended its dividend once

Figure 1.2 - Search result for Netflix stock (NASDAQ), the system alerts that Netflix never paid dividend, only shows the Fundamentals section.

Video 1.3 - Step by step example for using search query for Web Search

Developer Use Case - How to Consume this API

I have created and published an API Playground for this project in Rapid API for developers for seamless integration and also this endpoint doesn't require API Key for making API calls.

To get API for Nasdaq (US) stocks:

  • Simply type the target Stock’s ticker symbols into the Param’s field in the endpoint [eg: MSFT for Microsoft or AAPL for Apple]
  • You can also refer this official NASDAQ website to reconfirm the NASDAQ stock’s ticker symbols should you need assistance

To get API for SGX (Singaporean) stocks:

  • Simply type the target Stock’s ticker symbols and append this string ‘.SG’ into the Param’s field in the endpoint [eg: Z74.SG for Singapore Telecommunications Limited or D05.SG for DBS Group Holdings Ltd]
  • You can also refer this official SGX website to reconfirm the SGX stock’s ticker symbols should you need assistance

To get API for KLSE (Malaysian) stocks:

  • Simply type the target Stock’s ticker symbols and append this string ‘.MY’ into the Param’s field in the endpoint [eg: 1155.MY for Malayan Banking Berhad or 3182.MY for Genting Berhad]
  • You can also refer this official KLSE website to reconfirm the KLSE stock’s ticker symbols should you need assistance

Figure 2.0 - Developer searching for Apple Stock(NASDAQ) using its ticker symbol 'AAPL', notice there is a field for API Key to be input too

Figure 2.1 - Server approves the request and validates the valid API Key and returns the result for 'AAPL' in JSON format

Figure 2.2 - Server denies the request and invalidates the wrong API Key and returns the appropriate response

Documentation

You can read more about SavaJava's Official Documentation in its official GitHub account


Sponsor

You can donate to support this project here and feel free to drop us a comment on what you want to see as improvement or additions into the project


Collaberate

If you think you can bring in some improvements and addition for this app, you can DM me via LinkedIn, I can add you into the project to work on.

Thanks and have great day fellow Devs!

Top comments (0)