Coder Social home page Coder Social logo

eth-gasprices's Introduction

gasprice

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

installation

requires python 3.6 or higher and an ethereum full node. If you dont have a full node you can use Quiknode or Infura.

pip3 install -r requirements.txt

Make sure you export ETH_RPC_URL ex: export ETH_RPC_URL=http://localhost:8545

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

api

{
   "health":true,
   "block_number":11799460,
   "slow":137.0,
   "standard":214.459,
   "fast":283.064,
   "instant":311.0,
   "block_time":14.176
}

Install

cd /opt
git clone https://github.com/maurodelazeri/eth-gasprices.git
cd eth-gasprices
cp gasprice.service /etc/systemd/system/gasprice.service
systemctl daemon-reload
systemctl start gasprice.service
systemctl status gasprice.service

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

This project was forked from https://github.com/banteg/gasprice

eth-gasprices's People

Contributors

maurodelazeri avatar

Stargazers

ronin.quicknode avatar

Watchers

James Cloos avatar  avatar

Forkers

bcskill

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.