Skip to main content

Monitors crypto/stock prices or volatility and plays an alert sound when a target is reached

Project description

Goldteeth

Flake8 Lint PyPI version

Monitors crypto/stock prices & volatility and plays an alert sound when a target is reached.

  • It will also send a desktop notification on Linux or MAC OSX.
  • Run via python in a terminal or use the optional GUI.

Table of Contents

Usage

[!NOTE] Stock prices utilize Finnhub free API (email sign-up required)

Crypto prices utilize the CoinGecko open API but may be rate limited occasionally.

(optional) If you want to use free/demo CoinGecko API key use

export COINGECKO_API_KEY="your_API_key"

[!IMPORTANT] If you are using a pro/paid CoinGecko API key use

export COINGECKO_PRO_API_KEY="your_PRO_API_key"

free/demo and paid API keys use different urls, so goldteeth will choose whichever is better from what you have defined.

python src/goldteeth_cli.py <symbol> <mode> <target> <wav>

Price Targets

python src/goldteeth_cli.py btc above 100000 src/goldteeth/alert.wav
python src/goldteeth_cli.py eth below 3000 src/goldteeth/alert.wav

Volatility

python src/goldteeth_cli.py sol vol 10-5 src/goldteeth/alert.wav  # 10% move in 5 mins
python src/goldteeth_cli.py doge vol 5-15 src/goldteeth/alert.wav  # 5% move in 15 mins
python src/goldteeth_cli.py tsla vol 5-10 src/goldteeth/alert.wav  # 5% move in 10 mins

Stocks

  • Requires a Finnhub API key (free, email sign-up)
export FINNHUB_API_KEY="your_key_here"
python src/goldteeth_cli.py tsla above 400 src/goldteeth/alert.wav

Limitations

  • With the free API key Finnhub still limits you to one websocket connection.
  • Goldteeth tries to work around this with recovery loops and HTTP fallback and will keep trying if using multiple instances.
  • If you see this error it's due to free API limits, if you have a paid API key then you shouldn't see limits.
WebSocket error: Connection to remote host was lost.
WebSocket closed

Configuration

  • Modify CRYPTO_INTERVAL to adjust crypto polling frequency (default: 60s)
  • Modify STOCK_INTERVAL to adjust stock ticker polling frequency (default: 120s)
  • Modify SHOW_WS_ERRORS to show/hide websocket errors for stocks (default: False)

Requirements

  • Python 3 with these libraries:
    • requests or python3-requests
    • pytz or python3-pytz (stocks only)
    • websockets or python3-websockets (stocks only)
  • mpv or mplayer (audio alerts)

GUI

  • Right now the GUI is not available via pip install
python src/goldteeth_gui.py

Installation

  • There are two ways to Goldteeth:
    • Clone repositry and run (ensure Python libraries are present)
    • pip install

Installation via Pip

python -m venv goldteeth
. !$/bin/activate
pip install goldteeth

Usage with Pip

  • alert.wav is included but you can pass your own audio file.
goldteeth btc below 88000

Installation via Repository

git clone https://github.com/sadsfae/goldteeth.git
cd goldteeth

Run from Repository

python src/goldteeth_cli.py tsla below 400 src/goldteeth/alert.wav
python src/goldteeth_cli.py btc vol 5-60 src/goldteeth/alert.wav

GUI Installation via Repository

  • First make sure you have the repository cloned.
  • Be inside the repository directory.

Generate GUI Desktop Shortcut

cat > goldteeth.desktop <<EOF
[Desktop Entry]
Version=1.0
Name=Goldteeth
Comment=Monitor crypto and stock prices
Exec=$(which python3) $(pwd)/src/goldteeth_gui.py
Path=$(pwd)/
Icon=utilities-system-monitor
Terminal=false
Type=Application
Categories=Utility;Finance;
EOF

Copy GUI Desktop Shortcut

mkdir -p ~/.local/share/applications/
mv goldteeth.desktop ~/.local/share/applications/
chmod +x ~/.local/share/applications/goldteeth.desktop
update-desktop-database ~/.local/share/applications/
  • Goldteeth should now appear in your Applications menu in your favorite Desktop Environment.

Screenshots

CLI

goldteeth Mon

goldteeth Vol

GUI

goldteeth GUI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goldteeth-1.4.0.tar.gz (54.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goldteeth-1.4.0-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file goldteeth-1.4.0.tar.gz.

File metadata

  • Download URL: goldteeth-1.4.0.tar.gz
  • Upload date:
  • Size: 54.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for goldteeth-1.4.0.tar.gz
Algorithm Hash digest
SHA256 478b54337c7c192203d87789141f811123a555f8d651abf6f4b500dfd302ab85
MD5 c406b487ff1c63fe0db7f0345dad7af0
BLAKE2b-256 fb0cc5a4955abac15f6dc13677e100703ac28227934112ddea4d62e32a2ffbfc

See more details on using hashes here.

File details

Details for the file goldteeth-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: goldteeth-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for goldteeth-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 541eee16f48d4730ea65d094f9963c836a49b7eb4697115eeadc494bb5e8b61d
MD5 efd0b87d1fbf1fc62d04ca3bd8202cfe
BLAKE2b-256 0b804c5d831ab41424e10cf73cdf01f278435e71c24d9c657097cb7af71e82fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page