• Stars
    star
    264
  • Rank 155,103 (Top 4 %)
  • Language
    TypeScript
  • Created over 3 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ“– An Order Book app built with React/Typescript and powered by WebSockets.

Order Book

An Order Book app built with React/Typescript and powered by WebSockets.

I have written a tutorial about how I did this. You can find it here or here.


Tests Build Status

Tech stack

  • React / Typescript
  • SASS / styled-components
  • WebSockets / react-use-websocket
  • react-testing-library

Screenshots

Default View

iPhone 6/7/8

Responsive

XBTUSD Grouping: 1

ETHUSD Market

Application features:

I. Order Book

  1. The Order Book consists of two sides: the buy side and the sell side.
  2. Both sides contain information about the amount of orders opened at each price level.
  3. Each level displays the:
    1. Price - this is what defines the level. As orders must be placed at a price that is a multiple of the selected markets tick size (0.5) each level will be an increment of 0.5 (as long as there is an order open at that level).
    2. Size - the total quantity of contracts derived from open orders that have been placed at this level.
    3. Total - the summed amount of contracts derived from open orders that reside in the book at this level and above. To calculate the total of a given level we take the size of the current level and sum the sizes leading to this price level in the order book. The total is also used to calculate the depth visualizer (colored bars behind the levels), the depth of each level is calculated by taking that level's total as a percentage of the highest total in the book.

II. Grouping Select Box

  1. By default the orders are grouped by the select markets ticket size (0.5).
  2. Possible toggling of the grouping: between 0.5, 1, 2.5 for XBTUSD market and 0.05, 0.1 and 0.25 for ETHUSD market.
  3. To group levels we combine the levels rounded down to the nearest group size e.g. if we change our grouping from 0.5 to 1 then we would combine the data from prices 1000 and 1000.5 and display it under a single level in the orderbook with the price 1000.

III. Toggle Feed Button

  1. Toggles the selected market between PI_XBTUSD and PI_ETHUSD.
  2. Supports dynamic grouping logic - handles groupings for XBT (0.5, 1, 2.5) and groupings for ETH (0.05, 0.1, 0.25).

IV. Kill Feed Button

  1. Clicking this button stops the feed.
  2. Clicking this button second time renews the feed.

Demo

⭐ orderbook-mihailgaberov.vercel.app ⭐

Running the app locally

To run the app, follow these steps.

  1. Ensure that NodeJS is installed.
  2. Install yarn.
  3. From the project folder, execute the following commands:

To install dependencies:

  yarn

To run the app:

  yarn start

To run the tests:

  yarn test

Star History

Star History Chart

More Repositories

1

chat

πŸ’¬ A React single page chat application (SPA), implementing Socket.io.
TypeScript
121
star
2

bingo

🎱 A Bingo game built with JavaScript. It comes with a back-office app built with React.js and uses MongoDB.
JavaScript
50
star
3

pizza-app

πŸ• SPA with Vue.js and C# using .NET Core
C#
46
star
4

shopping-cart-app

πŸ›’ A real-life shopping cart application
TypeScript
23
star
5

testing-reactjs-examples

πŸ§ͺ "What should we test in our React components" - presentation examples.
JavaScript
23
star
6

parking-lot

πŸš— The app used in my article -> https://www.mihailgaberov.com/how-to-solve-the-parking-lot-challenge-in-javascript
JavaScript
17
star
7

bingo-blower

🎱 POC for a Bingo blower component with nice animations created with Matter.js
JavaScript
13
star
8

learn-service-workers

πŸ‘· Demo app showing how to utilize the power of Service Workers for executing heavy and slow tasks without blocking the UI.
JavaScript
8
star
9

redis-pubsub-visualized

A demo app to show visually Redis Pub/Sub pattern in action.
JavaScript
6
star
10

mickey-gallery

A media gallery app build with React, Redux and Saga, using Flickr API.
JavaScript
5
star
11

mobile-sportsbook-app

AngularJS based mobile Sportsbook application (POC)
CSS
5
star
12

microservices

React/Node.js/GraphQL Microservices app
JavaScript
5
star
13

lottoland-react-demo

A demo app to backup an internal company presentation of FE technologies.
JavaScript
4
star
14

sportsbook-like-app

A React single page application (SPA) - Sportsbook PoC
TypeScript
4
star
15

calc-expenses

A small Node.js program that reads a txt file with numbers, each on new line and returns the sum of them.
JavaScript
4
star
16

twitter-bot

A twitter bot that serves as notifier for the recent #js #javascript #nodejs #reactjs news.
JavaScript
3
star
17

js-stack-from-scratch-code

The code exercises from https://github.com/mihailgaberov/js-stack-from-scratch/
JavaScript
3
star
18

scoreboard

Football World Cup Scoreboard that shows matches and scores.
JavaScript
3
star
19

mihailgaberov.com

My personal space in the web.
JavaScript
3
star
20

weather-app

Simple app for showing the weather and sending email warnings with the temperature degrees in a preliminary selected city. It consumes openweathermap.org Weather API and Sendgrid API.
JavaScript
2
star
21

address-book

Client Side Address Book
JavaScript
2
star
22

mihailgaberov

2
star
23

what-shall-we-watch

TypeScript
2
star
24

alien-invasion-python

Exercise project from the book "Python Crash Course", 2nd edition
Python
2
star
25

misc

This repo would contain any stuff that deserves to be preserved.
HTML
2
star
26

multi-threading-nodejs

How To Use Multithreading in Node.js
JavaScript
2
star
27

react-hooks

This repo contains working examples and presentation slides discussed in "React hooks: a new way of working with React state".
JavaScript
2
star
28

twitrender

Twitrender is a small app that leverages a big database, gathered from Twitter posts, related to certain search criteria, since 2017. It gives the users ability to search for certrain words and see how many times they have been twitted during a selected time period. Hence trender => twitrender.
Python
2
star
29

expo-react-native

Playing with Expo and React Native - https://docs.expo.dev/
JavaScript
1
star
30

react-typescript-sass-webpack-starter

Starter setup for a project using React, Typescript, SASS and Webpack.
TypeScript
1
star
31

dnd-chess-tut

Testing Drag and Drop for React
JavaScript
1
star
32

shopping-list

Real-time shopping list app
JavaScript
1
star
33

mihail-gaberov.eu

Personal blog by Mihail Gaberov.
JavaScript
1
star
34

rock-paper-scissors

A React/Redux implementation of the classic game Rock Paper Scissors.
JavaScript
1
star
35

truerng

Experimenting with TrueRNG https://ubld.it/truerng_v3
Python
1
star
36

full-stack-redux

Full stack Redux tutorial done via [this](http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html).
JavaScript
1
star
37

angular-fitness-tracker

Refreshing Angular knowledge by building a simple Fintess Tracker app.
TypeScript
1
star
38

test-react-components

Testing React components.
JavaScript
1
star
39

data-structures-and-algorithms

Data structures and algorithms
JavaScript
1
star
40

angular-chat

An Angular single page chat application (SPA), implementing SignalR.
TypeScript
1
star
41

batch-automation

Short batch scripts for running recurrent daily tasks.
Batchfile
1
star
42

es6-playground

JavaScript
1
star
43

Front-End-Quizes

Front End Quizes
JavaScript
1
star
44

playing-with-nextjs

Self-training.
JavaScript
1
star
45

mongodb-course

Repository to store course exercises.
JavaScript
1
star
46

svelte-library

Svelte
1
star
47

test-react-18

HTML
1
star
48

pusher-event-chat

https://pusher.com/tutorials/live-chat-with-node-js-mysql-and-pusher-channels-part-1/
JavaScript
1
star
49

winston

Nodejs app logging solution using Winston library (PoC)
JavaScript
1
star
50

freecodecamp-infosec-course

JavaScript
1
star
51

libreria

A small SPA built with Vue, Python and MongoDB, serving as a bookshelf.
Vue
1
star
52

caesars-game

Svelte
1
star
53

learn-rust

https://www.rust-lang.org/learn
Rust
1
star
54

arabic-roman-visualized

A demo SolidJS app that's visualizing the workings of an algorithm for converting arabic to roman numbers.
JavaScript
1
star
55

graphic-design

Storage for my graphic design endeavours
1
star
56

learning-ruby-on-rails

Learning Ruby on Rails - course project.
Ruby
1
star
57

mihailgaberov.github.io

Mihail's demos.
JavaScript
1
star
58

reactjs-winepad

A ReactJS based app done for self training via the Stoyan Stefanov's book.
JavaScript
1
star
59

multiplayer-games-with-meteor

JavaScript
1
star
60

OO-JS-Tree-Menu

A tree menu developed with pure JavaScript using object oriented approach.
JavaScript
1
star
61

node-cli-gitinit

JavaScript Command Line Interface (CLI) with Node.js for initializing Github repos
JavaScript
1
star
62

file-explorer-electron

Learning by doing: Cross-Platform Desktop Applications - Electronjs
JavaScript
1
star
63

svelte-countdown

Are you waiting eagerly for some event? Use this countdown to show the time left till it happens.
JavaScript
1
star
64

euro-jackpot

An Aurelia based application for showing current EuroJackpot draw information.
JavaScript
1
star
65

js-workshops

Repo for storing the materials from the JavaScript workshops I have done to help other people to learn JS.
JavaScript
1
star