Skip to main content

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

Metadata

Release files for gasprice 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gasprice 1.2.0
File Size Uploaded
gasprice-1.2.0.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gasprice 1.2.0
File Interpreter ABI Platform
gasprice-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 kB

Release files / gasprice-1.2.0.tar.gz

Download URL gasprice-1.2.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
abf5c294aac2acbaf7b0a706db53eb633e87b986c566ac400c83259f91ef181e
BLAKE2b-256 checksum
How to use checksums
80dc6aa465c8094fc92f703bf35553060cc58371f3b4c7f1372e4855981a367d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.12 CPython/3.7.3 Darwin/18.6.0

Release files / gasprice-1.2.0-py3-none-any.whl

Download URL gasprice-1.2.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53078c97c24638c07f8a1faae97c96fb9ed9debe1c3c03e6d2df209548d09159
BLAKE2b-256 checksum
How to use checksums
16a6b20a02d81e52cd7db9c06438e37cc08b33100823ff63611fda2335e7d475
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.12 CPython/3.7.3 Darwin/18.6.0

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page