Skip to main content

predict ethereum gas price

Project description

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%.

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

gasprice-1.2.0.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

gasprice-1.2.0-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

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