Coder Social home page Coder Social logo

atiyahaider / stock-price-checker Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 32 KB

Nasdaq Stock Price Checker (API & front end)

Home Page: https://holy-basketball.glitch.me/

JavaScript 80.84% CSS 4.01% HTML 15.15%
stock-price-checker nodejs express mongoose helmet

stock-price-checker's Introduction

FreeCodeCamp- Information Security and Quality Assurance

Stock Price Checker

User Stories

  1. Set the content security policies to only allow loading of scripts and css from the server.
  2. GET /api/stock-prices with form data containing a Nasdaq stock ticker and recieve back an object stockData.
  3. stockData contains the stock(string, the ticker), price(decimal in string format), and likes(int).
  4. My like can be added to the stock(s), by passing along field like as true(boolean). Only 1 like per IP would be accepted.
  5. If 2 stocks are passed along, the return object will be an array with both stock's info, but instead of likes, it will display rel_likes(the difference between the likes on both) on both.
  6. A good way to receive current price is the following external API(replacing 'GOOG' with your stock): https://api.iextrading.com/1.0/stock/goog/price
  7. All 5 functional tests are complete and passing.

Example usage:

/api/stock-prices?stock=goog /api/stock-prices?stock=goog&like=true /api/stock-prices?stock=goog&stock=msft /api/stock-prices?stock=goog&stock=msft&like=true

Example return:

{"stockData":{"stock":"GOOG","price":"786.90","likes":1}}

{"stockData":{"stock":"MSFT","price":"62.30","rel_likes":-1},"stock":"GOOG","price":"786.90","rel_likes":1}]}

Front End

stock-price-checker's People

Contributors

atiyahaider avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.