Sign inSign up

tyzbit/bitcoin-balance-notifier

By tyzbit

Updated over 3 years ago

Checks bitcoin addresses and calls a Discord webhook if the balance changes

Image
0

9.8K

tyzbit/bitcoin-balance-notifier repository overview

bitcoin-balance-notifier

Notifies if the balance of a bitcoin address changes. Supports addresses and Extended Pubkeys.

Usage

docker compose up --build

Then navigate to http://127.0.0.1:8000. If you run the image by itself, it listens on 80 by default.

Prebuilt images are also available: docker.io/tyzbit/bitcoin-balance-notifier:latest. You can also replace latest with a release version.

Configuration

Set some environment variables before launching, or add a .env file.

VariableValue(s)Required
BTC_RPC_API(optional) The URL to an instance of BTC-RPC-Explorer. Default: https://bitcoinexplorer.orgNo, but encouraged
CHECK_ALL_PUBKEY_TYPESWhether or not to check the other types of a given pubkey (xpub, ypub, zpub). Defaults to falseNo
CURRENCYCurrency to display balance in (USD,GBP,EUR,XAU). Defaults to USDNo
DISCORD_WEBHOOKThe URL to a Discord Webhook to call when the balance changesYes
LOG_LEVELtrace, debug, info, warn, errorNo
LOOKAHEADHow many addresses with no activity before we consider a pubkey to be completely scanned. Default: 20No
PAGE_SIZEHow many addresses to request at once for PubKey-type addresses. Default: 100No
PORTWhat port to listen on. Default: 80No
SLEEP_INTERVAL(optional) The amount of time, in seconds, between checking the balance. Default: 300 (5 minutes)No

Database

Data is stored in either /db/addresses.sqlite or ./addresses.sqlite in the same directory as the executable. If running in Docker or Kubernetes, set up a volume at /db to persist data.

Tag summary

Content type

Image

Digest

sha256:f0c12285e

Size

8.2 MB

Last updated

over 3 years ago

docker pull tyzbit/bitcoin-balance-notifier