Go to file
banteg 8ed97bdca7 log stats as str 2017-12-31 08:12:29 +07:00
gas_price.py log stats as str 2017-12-31 08:12:29 +07:00
gasprice.service Update gasprice.service (#2) 2017-12-30 02:41:42 +07:00
readme.md update readme with systemd info and hosted version 2017-12-29 23:38:47 +07:00
setup.py log stats as str 2017-12-31 08:12:29 +07:00

readme.md

gasprice

estimates ethereum gas price based on recent blocks and provides a simple api

hosted

installation

requires python 3.6 and an ethereum full node. infura.io won't work as it doesn't allow setting up filter.

pip install gasprice

there is an example of systemd service if you want to run it as a service.

usage

gasprice

Options:
  -h, --host 127.0.0.1
  -p, --port 8000
  -s, --skip-warmup

ethereum rpc url can be set with ETH_RPC_URL environment variable (default http://localhost:8545).

api

{
  "block_number": 4813900,
  "block_time": 14.9,
  "health": true,
  "slow": 1,
  "standard": 4,
  "fast": 20,
  "instant": 40
}

slow, standard, fast and instant values represent minimal gas price of the latest 200 blocks. by default slow represents 30% probability, standard is 60%, fast is 90% and instant is 100%.