Git Product home page Git Product logo

bitcoinnodeinfo's Introduction

BitcoinNodeInfo

This is a simple Python script that monitors the status of a Bitcoin node and provides information about its blockchain synchronization. The script can be integrated with a Telegram bot to allow users to quickly check the status of their node using a mobile device.

Features

Check the status of a Bitcoin node (online/offline). Display the number of headers and blocks in the Bitcoin blockchain. Display the synchronization status of the Bitcoin blockchain. Display the disk usage of the node. Display the system uptime of the node.

Prerequisites

  • Python 3.6 or later.
  • A running Bitcoin node.
  • The bitcoin-cli tool installed and available in the system's PATH.
  • Python modules in requirements.txt
pip install -r requirements.txt

Configuration

To use the script, you need to create a Telegram bot in BotFather and obtain an access token.

TOKEN = 'your_bot_token_here'
USERID = YOURUSERID

Usage

To start the script, simply run the following command:

python bot.py

Commands

The bot recognizes the following commands:

/start Displays the status of the Bitcoin node and blockchain synchronization.

/sync Displays the synchronization status of the Bitcoin blockchain.

/uptime Displays the system uptime of the node.

/disk Displays the disk usage of the node.

/ping Pings the script and receives a response.

Optional: Add commands list in BotFather

IMG_EE7FDAF6F4E5-1

If you want a list of command like this ๐Ÿ‘†, use /setcommands in Bot Father and send the following list:

start - โ–ถ๏ธ Start the bot
status - ๐Ÿ”„ Sync status
uptime - โฐ Node uptime
disk - ๐Ÿ’พ Disk usage

License

This script is licensed under the MIT License. See the LICENSE file for details.

bitcoinnodeinfo's People

Contributors

nicolocarcagni avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

22388o

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.