Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jedbrooke/golem-price-updater
automatically adjust the price for your golem node based on the current price of GLM
https://github.com/jedbrooke/golem-price-updater
cryptocurrency golem
Last synced: 4 months ago
JSON representation
automatically adjust the price for your golem node based on the current price of GLM
- Host: GitHub
- URL: https://github.com/jedbrooke/golem-price-updater
- Owner: jedbrooke
- License: gpl-3.0
- Created: 2021-11-28T21:06:38.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-06T06:08:46.000Z (11 months ago)
- Last Synced: 2024-03-06T07:24:31.102Z (11 months ago)
- Topics: cryptocurrency, golem
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golem - Golem Price Updater - Automatically adjust the price for your Golem node based on the current price of GLM. (Provider Resources / Blockchain Automations (aka Emeth.xyz))
README
# golem-price-updater
automatically adjust the price for your golem node based on the current price of GLM# Usage:
set this file to run as a cron job every hour (or as often as you see fit)
1. make the file executable
```chmod +x golem-price-update.py```1. run the program with your settings, and `-u` or `--update_cron` to add it to your crontab to run automatically. (requires the `python-crontab` module)
example: `python3 golem-price-update.py -w 100 -p 0.5 --update_cron`you can also manually add it to your crontab (with `crontab -e`)
```0 * * * * /path/to/golem-price-update.py > /dev/null```
you can provide parameters to tell the script how to estimate the cost
```0 * * * * /path/to/golem-price-update.py --currency EUR --watts 250 --price_kwh 0.17 > /dev/null```
for a full list of options see `golem-price-update.py --help`
```
usage: golem-price-update.py [-h] [--currency CURRENCY] [--price_kwh PRICE_KWH] [-w WATTS] [--idle IDLE] [-p PROFIT] [-t THREADS] [-u] [--dry_run]automatically adjust golem provider prices. GLM Price provided by CoinGecko
optional arguments:
-h, --help show this help message and exit
--currency CURRENCY desired fiat currency for prices, default: USD
--price_kwh PRICE_KWH
electricity price per kwH in your fiat currency, default: 0.1
-w WATTS, --watts WATTS
power usage of your provider in watts, default: 150
--idle IDLE power usage of your provider in watts at idle.used to calculate env/hr rate.If not provided, env/hr will be 0 and all earnings will be from cpu/hr
-p PROFIT, --profit PROFIT
desired additional profit beyond electricity costs, (1.0 is 100 percent), default: 0.1 (10 percent)
-t THREADS, --threads THREADS
number of threads on golem provider.
t = 0 is all threads.
t < 0 is t less that all threads.
t > 1 is t threads.
if t is higher than available threads, maximum of all
threads will be used. if all threads - t is less than 1, 1 thread will be used. default: all threads
-u, --update_cron run this script every hour with the same settings by adding it to the cron file
--dry_run display result but do not actually update, (applied to cron setting as well)
```Pricing Data provided by CoinGecko