Coder Social home page Coder Social logo

paper-trading-system's People

Contributors

enjoymrsun avatar

paper-trading-system's Issues

Pagination on all lists

Needs pagination in places like:

  • watchlist
  • alert list
  • order history list
  • holdings list

packages to consider:

  • rummage_phoenix
  • scrivener_ecto

Order Channel

Next Step
add appropriate variant of line to user_socket.ex:
image

on page Push Notifications

top positioned push notifications about:

  • alerts
    • successfully created/deleted alert
    • alerts triggered
  • orders
    • order placed
    • order executed
    • order canceled

Holding Channel

Next Step
add appropriate variant of line to user_socket.ex:
image

improve alert_manager to use map as server state

Map, compared to list, saves look up time.
Therefore, let's improve AlertManager module to use map as server state.
state format:
%{ "symbol1" => [list of alerts], "symbol2" => [list of alerts], ... }

Currently, it is just barely a list of alerts.

Request for documentation

Documentation should include:

  • App URL
  • Introduction (ref: LinkedIn project intro)
  • Deployment Instructions
  • Programming Language: Elixir
  • Technologies Involved: ReactJS, Phoenix Framework, WebScoket, Channels, GenServer

implementation of stock updates

The following guidelines must be followed:

  1. In your sever module, which, I suppose, pulls quotes from Alpha Vantage:
    broadcast to all channels that care about that symbol,
  • event: "update_asset_price"
  • message format: %{symbol: string, price: number}
  1. In react components care about those data, implement callback:
  • channel.on("update_asset_price", ({symbol, price}) => {....})

paper trading

UI Design:

papertrading-data-design

OrderManagerServer Working Logic Flowchart:

cache last price

image
cache last updated price in database, so users don't have to wait for a second or two for the price to show up.

But this approach may not be the best, since it creates heavy load on the database, constantly updating every entry.

A better approach came across my mind for now, is to hold these records in memory via a GenServer instead of database.

Appropriately handle adding alerts

Currently, we handle adding alerts by totally reload all the alerts from the database, as shown below:
image

Must create a function to add alert without a total reload.

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.