Giter Club home page Giter Club logo

binance_monitoring's Introduction

Introduction

This project is written using Python3 and tested on macOS environment. There are 2 files in this project user_stream.py and user_action.py.

user_stream.py is a web socket listener that will log executionReport event and checks if the delay between Event Time and current time is greater than the user-preset threshold.

user_action.py has 2 functionality: ordering and deleting orders. By selecting ordering, a dummy order will be sent by default as follows: {'symbol':'LTCBTC', 'side':'BUY', 'type':'LIMIT', 'timeInForce' : 'GTC', 'price' : 0.01, 'quantity': 1, 'timestamp': serverTime}. Deleting an order requires an orderId field which can be obtained after completing an order.

Setting Up

There may be some python dependencies package that requires installation. The missing packages will be prompt to you when executing the python file which can be installed using the python package manager pip3 install <missing package> The programs retrieve the api key and secret key through environment variables. Export the keys to binance_api and binance_secret respectively.

export binance_api=<your api key>

export binance_secret=<your secret key>

Running

Launch a terminal and execute python3 user_stream.py. The program will request for a delay threshold and if the connection to socket is successful, the program will prompt the message: listening for events.... Open another terminal and execute python3 user_action.py to simulate user actions to test the alert function of the web socket listener.

Alt text

binance_monitoring's People

Contributors

chairz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

siraj

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.