Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maximedgr/eth-gasprice-fluctuation

Bash project to scrap Etherscan API and visualize via a front-end app abnormal values of ETH Gas Price.
https://github.com/maximedgr/eth-gasprice-fluctuation

api bash-script bot

Last synced: 8 days ago
JSON representation

Bash project to scrap Etherscan API and visualize via a front-end app abnormal values of ETH Gas Price.

Awesome Lists containing this project

README

        

# Ethereum - Gas Price Abnormal Value
Application alerting a user via console and web visualization of abnormal variations in the ETH GasPrice datas.

In this project we define as "abnormal variations" a current value which is outside an confidence interval of 95%.

You can host it directly on your machine or on a remote server to host your front-end app.

# Bot Configuration
Clone this repo :
```
git clone
```

Enable script execution :
```
chmod u+x init.sh
chmod u+x ic.sh
chmod u+x bot.sh
chmod u+x insert.sh
chmod u+x read.sh
```

Install sqlite3 :
```
sudo apt-get install sqlite3
```

Then run init.sh to setup the database :
```
./init.sh
```

Finally try bot.sh and verify console output :
```
./bot.sh
```

# Linux / Cron Job configuration

On your linux instance, after cloning this repo you can setup a cron job to get Telegram notification every 30min for example.
Go into the project folder and run :
```
$ crontab –e
```
In the crontab terminal edit and write :
```
* * * * *
```
Close the terminal and you should get a sucess message.

```
> crontab: installing new crontab
```

Check that cron is running :
```
ps -ef | grep cron
```

# Front-end App
Once installed you can setup an NGINX web server to access your front-end app.
HTML file is generated by ic.sh script and saved here by default : "/var/www/eth-gas-price-web/index.html".
Feel free to change this path to match your NGINX server configuration.

![Front image](https://i.ibb.co/s54jsp1/html.png)

# Etherscan API :
[Gas Price API](https://api.etherscan.io/api?module=gastracker&action=gasoracle)