Giter VIP home page Giter VIP logo

stock_trading_app_gdsc's Introduction

Stock_Trading_App_GDSC

This is an app mainly using the concepts of WEBSOCKETS to get realtime data of stocks and then concurrently display the data graphically.

App Demo Video

Features

  • Users can view realtime data (Candle Stick Graph) for their selected cryptos.
  • Users can also change the interval of the Candle Stick of the graph.
  • Users can search for cryptos.
  • Users can also add some cryptos as their favourites so that they can access it directly.
  • Users can get to know realTime PRICE , HIGH PRICE , LOW PRICE of the crypto.

Pages

  • This page is the first page that you get after launching the app.
  • This page has options to search Stocks and also navigate to Favourite Stock Page.
  • It also has predefined stocks that are common which are always shown on the app for fast access.
  • This page shows the the details of the selected stock.
  • User can view Candle Stick graph of the stock and also observe realtime price, high price , low price for the stock.
  • User can also choose the time interval for the candle Stick grap [1m 5m 15m 30m 1w 1D 1M].
  • This page also gives you the option to add the stock to your Favourites List.
  • This page shows all the list of stocks that you have set as favourite so that you can access them directly from here reducing the process to search stocks.


Implementation of WEBSOCKET

Connecting to the WEBSOCKET

channel = WebSocketChannel.connect( Uri.parse('wss://ws.finnhub.io?token=c6av1iaad3ieq36s0q9g'), );

Sending Request to WEBSOCKET

channel.sink.add('{"type": "subscribe", "symbol": "${widget.symbol}"}');

Updating the Graph

  • Used StreamBuilder to continuosly listen and update changes in the app.


Flow of the Stock Detail Page

  • After opening the page the app connects to the WEBSOCKET.
  • Then an HTTP request is made to get previous data.
  • A message is sent to WEBSOCKET which inturns send data
  • Used a stream builder to update the widget synchronously with WEBSOCKET
  • Based on the Time Interval either a new candle is added or the latest candle is updated.

Dependencies

  • CandleStick widget - to display graph
  • Hive - to store favourite cryptocurrencies

stock_trading_app_gdsc's People

Contributors

shash0501 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.