├── .gitignore
├── .idea
├── .gitignore
├── vcs.xml
├── inspectionProfiles
│ └── profiles_settings.xml
├── misc.xml
├── modules.xml
└── binance-chart-plugin-telegram-bot.iml
├── graph.example.png
├── graph2.example.png
├── requirements.txt
├── custom_scripts.json
├── config_example
├── LICENSE
├── README.md
├── __main__.py
└── db_chart.py
/.gitignore:
--------------------------------------------------------------------------------
1 | graph.png
2 | config
3 | __pycache__
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /workspace.xml
--------------------------------------------------------------------------------
/graph.example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marcozetaa/binance-chart-plugin-telegram-bot/HEAD/graph.example.png
--------------------------------------------------------------------------------
/graph2.example.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marcozetaa/binance-chart-plugin-telegram-bot/HEAD/graph2.example.png
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | python-binance==1.0.10
2 | matplotlib==3.1.2
3 | matplotlib-inline==0.1.2
4 | PyYAML==5.3.1
5 | requests==2.22.0
6 | requests-unixsocket==0.2.0
7 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/custom_scripts.json:
--------------------------------------------------------------------------------
1 | {
2 | "Crypto chart from Binance": "bash -c 'cd .. && python3 binance-chart-plugin-telegram-bot -bn'",
3 | "Crypto chart from databae": "bash -c 'cd .. && python3 binance-chart-plugin-telegram-bot -db'",
4 | "Update crypto chart": "bash -c 'cd ../binance-chart-plugin-telegram-bot && git pull'"
5 | }
--------------------------------------------------------------------------------
/config_example:
--------------------------------------------------------------------------------
1 | [config]
2 | bot_path=/home/ubuntu/Binance2/binance-trade-bot
3 | # Datetime format: YYYY-MM-DD
4 | min_datetime = 0
5 | # display coin value for each coin
6 | enable_coin_value = 1
7 | # display Fiat evolution graph
8 | enable_fiat_evolution = 1
9 | # only display active coins
10 | show_active_coin_only = 1
11 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/binance-chart-plugin-telegram-bot.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Marco Zanghieri
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Coin Progress Chart and Database Backup plugin for Binance Trade Bot
2 |
3 | This is a program tool based on [Binance Trade Bot].
4 |
5 | The intent of this bot is to retrieve the local database trade infomation, e.g. the orders since last database reset, and store it for several types of plottings and text outputs. If you have also a Telegram Bot account, it will automaticaly connect to it send the results.
6 | To operate the bot creates a backup of the database to not interfere with the main bot
7 |
8 | ## Install
9 |
10 | Create the file `config` based on `config.example`.
11 |
12 | ```
13 | [config]
14 | bot_path=your/path/to/binance-trade-bot
15 | # Datetime format: YYYY-MM-DD
16 | min_datetime = 2021-01-01
17 | # display coin value for each coin
18 | enable_coin_value = 1
19 | # display Fiat evolution graph
20 | enable_fiat_evolution = 1
21 | # only display active coins
22 | show_active_coin_only = 1
23 | ```
24 |
25 | Then run
26 | ```
27 | pip3 install -r requirements.txt
28 | ```
29 |
30 | ## Usage
31 |
32 | Tt is possible to use data retrieved from bot database, it generates three plots: all the coin amount progress, all the coin valure progress, the overall value of current coin.
33 | The last two graphs are printed only if `enable_coin_value` and `enable_fiat_evolution` are set to 1, 0 otherwise:
34 |
35 | ```bash
36 | python3 -m binance-chart-plugin-telegram-bot -db
37 | ```
38 |
39 | As alternative tt is possible to generate chart with data retrieved from Binance [WIP - shows only all coin progress of coin list]:
40 |
41 | ```bash
42 | python3 -m binance-chart-plugin-telegram-bot -bn
43 | ```
44 |
45 | ## Telegram
46 |
47 | The output can be sent to an external service. It detectes the APPRISE file in the bot folder and connect automatically to it.
48 |
49 | ## Output example
50 |
51 |
52 |