Giter Site home page Giter Site logo

websocket-demo's Introduction

Websocket Demo License: MIT

img

This web app is developed to simplify the binance websocket stream testing process. By utilizing the interface, the user can check on multiple streams at a time without knowing the parameters. Since this app is designed for testing purpose instead of the real subscription tool, all the subscribed streams will be unsubscribed in 5 sec.

The left hand side of the screen has 2 parts. The upper is for user stream subscription. The user can select one of the user streams to subscribe given the valid listen key generated based on the api key. The lower is the market stream selection area. The user can only select the streams under the same data source. That is, once the user select a spot market stream, to select from other source, such as coin-m futures stream, is not allowed.

Note: Some of the symbols are only available in PRODUCTION.

Demo Site

Usage

Initialize Your Local Environment

  1. Download the repo

  2. Turn on the terminal and execute the following commands

    $ cd <your project directory>
    $ yarn install
    $ yarn start
    
  3. Open your browser and access localhost:3000

Subscribe the User Data Stream

img

  1. Use RESTful API to generate the listen key and paste the key to the "Listen key" input box. (If you don't know how to generate the key, please check the API document in "Reference" section below.)
  2. Select the data source from the drop-down list
  3. Click the corresponding subscribe button.

Subscribe Market Streams

img

  1. Select the data source from the market stream section
  2. Select the stream(s) to subscribe from the drop-down list. If there is any parameter has to be settled, a modal with drop-down list(s) will show up.
  3. Click the testnet or production subscribe button.

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test [TODO]

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

yarn pretty-quick

Runs the code formatter. This command is also hooked with the pre-commit.

yarn storybook

Runs the storybook for component overview.
Open http://localhost:6006 to view it in the browser.

yarn build-storybook

Builds Storybook as a static web application.

Reference

websocket-demo's People

Contributors

ishuen avatar tantialex avatar 2pd 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.