Giter Site home page Giter Site logo

insight_project's Introduction

Piper Trade - An Automatic Trading Platform

Table of Contents

  1. Introduction
  2. Details of Implementation
  3. Repo directory structure

Introduction

An application to process real time stream of stock prices and perform trades for each User based on User settings

The project url is at http://vishesh.trade

Details of Implementation

The project is implemented using Kafka, Flink, Postgres and Flask.

Pipeline

A Kafka python producer is used to generate the stock data which is ingested into a kafka topic.

This kafka topic is consumed by the flink cluster.

A 5 second moving average is computed, and the current price is compared with the 5 second moving average to determine if the price has increased or decreased.

Based on the price difference the user information is queried and trades are executed.

The transactions and user settings are stored in a Postgres DB.

The information for each user is then displayed in the front end using flask

Repo Directory Structure

The directory structure for my repo looks like this:

|____Flask app
| |____app
| | |____static
| | | |____css
| | | | |____stylesheet
| | | |____js
| | | | |____jquery.min
| | |____templates
| | |____views.py
| | |______init__.py
| |____tmp
| |____run.py
| |____tornadoapp.py
|____Flink
| |____src
| | |____main
| | | |____java
| | | | |____org
| | | | | |____myorg
| | | | | | |____quickstart
| | | | | | | |____main_job
| | | |____resources
| | | | |____log4j.properties
| |____target
| |____pom
| |____quickstart.iml
|____Kafka producer
| |____kafka-thread.py
| |____companylist
  • Flask app: Contains all necessary files (including style and HTML template files) to fun Flask.
  • Flink: This is my consumer. It receives the data stream from Kafka, encrypts the stream and inserts the encrypted data into a MySQL database.
  • Kafka producer: Reads the data (WiFi logs) from a csv file, formats it and streams to Kafka. Takes a Kafka topic in as an argument.

insight_project's People

Contributors

vikaka avatar

Watchers

 avatar  avatar

Forkers

jzcruiser

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.