GithubHelp home page GithubHelp logo

binance-report-bot's Introduction

Binance Report Bot

⚠️ 0.5.0 -> 0.6.0 INTRODUCES BREAKING CHANGES IN THE API ⚠️ Replace python3 main.py calls by python3 -m brb

The intent of this bot is to take a snapshot of your binance wallet, e.g. the current balances and store it for further plotting.

Install

Create the file conf.py based on conf.template.py.

Then run

pip3 install -r requirements.txt

Basic Usage

To save a snapshot of the binance account run:

python3 -m brb snapshot

To show the previously saved snapshots

python3 -m brb output # --help for options

Deployment

One can use crontab to use this code:

0 * * * * cd [FOLDER] ; python3 -m brb snapshot
2 19 * * * cd [FOLDER] ; python3 -m brb output --quiet

To have a snaphsot made every hour and a report made every day at 19:02.

The output can be sent to an external service, that can be configured with the APPRISE_URL parameter. See here to choose your external service and to create your APPRISE_URL. Please use a service that supports attachment, in order to send images. Recommended services : Discord, Telegram or Email.

Output example

Plot EOS equivalent holdings:

python3 -m brb output --symbol EOS

Plot ICX relative equivalent holdings:

python3 -m brb output --symbol ICX --relative

Plot ICX and EOS equivalent holdings since three days ago:

python3 -m brb output --symbol ICX,EOS --days 3

Plot the equivalent holdings of all soins registered in the conf file:

python3 -m brb output --symbol * # or '*' if using zsh

Note : The equivalent holding is your portfolio's value in a certain currency. It represents what you would be holding if all your portfolio was under this single currency.

CLI specification

$ python3 -m brb --help
Usage: python -m brb [OPTIONS] COMMAND [ARGS]...

  Binance Report Bot

  Take a snapshot of your binance wallet, e.g. the current balances and store
  it for further plotting.

Options:
  --debug / --no-debug  Prints debug data
  --help                Show this message and exit.

Commands:
  output    Output the previously stored data
  snapshot  Take a snapshot of your wallet
$ python3 -m brb snapshot --help
Usage: main.py snapshot [OPTIONS]

  Take a snapshot of the binance wallet and save it for further plotting

Options:
  --help                Show this message and exit.
$ python3 -m brb output --help
Usage: main.py output [OPTIONS]

  Output the previously stored data with 'snapshot'

Options:
  --quiet / --no-quiet            Set to true if you don't want to print in
                                  the console or display an image
  -r, --relative / --no-relative  If the graph should be plotted relative to
                                  its initial value
  -s, --symbol TEXT               The currency the graph will be plotted on.
                                  To plot several symbols on the same graph,
                                  separate them by a coma. If plotting several
                                  symbols, the --relative option is enabled.
                                  To plot all symbols, use '*'. Default : FIAT
  -d, --days INTEGER              The number of days over which the graph will
                                  be plotted. If set to 0, the graph will plot
                                  all the records. Default : 7 days
  --help                          Show this message and exit.

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.