Nasdaq Stock Price Checker

User Stories:

  1. I can GET /api/stock-prices with form data containing a Nasdaq stock ticker and recieve back an object.
  2. In the recieved object, I can see the stock (string, the ticker), price (number), and likes (number).
  3. I can also pass along field like as true (boolean) to have my like added to the stock(s). Only 1 like per IP address should be accepted.
  4. If I pass along 2 stocks, the returned object will be an array with both stock's info and in addition to likes, it will also contain rel_likes (the difference between the likes on both) on both.
  5. A good way to receive the current price is the following external API (replace 'stock' with the stock ticker and 'API_KEY' with the API key):
    https://www.alphavantage.co/query?function=global_quote&symbol=stock&apikey=API_KEY
    (Get your free API key here)
  6. All 5 tests are complete and passing.

Example usage:

Example return:

[{"stock":"GOOG","price":0,"likes":0}]
[{"stock":"GOOG","price":0,"likes":0,"rel_likes":0},{"stock":"MSFT","price":0,"likes":0,"rel_likes":0}]


Front-End:

Get single price and total likes

Compare and get relative likes