PHPackages                             numairawan/eth-gas-tracker-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. numairawan/eth-gas-tracker-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

numairawan/eth-gas-tracker-php
==============================

Powerful PHP library to retrieve live Ethereum gas prices.

v2.0.0(2y ago)44683MITPHP

Since Jul 16Pushed 2y ago3 watchersCompare

[ Source](https://github.com/NumairAwan/eth-gas-tracker-php)[ Packagist](https://packagist.org/packages/numairawan/eth-gas-tracker-php)[ RSS](/packages/numairawan-eth-gas-tracker-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

 [![Eth Gas Tracker PHP](https://raw.githubusercontent.com/NumairAwan/eth-gas-tracker-php/main/art/screenshot.png)](https://raw.githubusercontent.com/NumairAwan/eth-gas-tracker-php/main/art/screenshot.png)

 [![Total Downloads](https://camo.githubusercontent.com/cd7b85a40e0da07fb5a914b7969de46fc940175f80f9741c474a0306e7bfccd2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e756d6169726177616e2f6574682d6761732d747261636b65722d706870)](https://packagist.org/packages/numairawan/eth-gas-tracker-php) [![Latest Version](https://camo.githubusercontent.com/a40edf10eea05da5bf5357a8833960f3957af45fb686882b1ab7becb5d61a98a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e756d6169726177616e2f6574682d6761732d747261636b65722d706870)](https://packagist.org/packages/numairawan/eth-gas-tracker-php) [![License](https://camo.githubusercontent.com/eaff897876de2fedf05e9dee5ddba3c20e47f468b0d0c750b3780a059f853d98/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e756d6169726177616e2f6574682d6761732d747261636b65722d706870)](https://packagist.org/packages/numairawan/eth-gas-tracker-php)

---

**eth-gas-tracker-php** is a powerful PHP library that provides developers with an effortless way to retrieve live Ethereum gas prices, empowering them to optimize transactions and smart contracts on the Ethereum network.

Features
--------

[](#features)

- 🚀 Retrieve live Ethereum gas prices with ease.
- ⛽️ Obtain up-to-date and accurate gas price data.
- 💪 Fine-tune transaction optimization based on real-time gas prices.
- 🤝 Seamless integration into existing PHP projects.
- 📚 Comprehensive documentation and code examples for easy implementation.

Installation
------------

[](#installation)

To install the library, you can use [Composer](https://getcomposer.org/) and run the following command:

```
composer require numairawan/eth-gas-tracker-php
```

### Usage

[](#usage)

To retrieve live Ethereum gas prices, follow these simple steps:

```
use NumairAwan\EthGasTracker\EthereumGasPrice;

// Instantiate the EthereumGasPrice
$ethereumGasPrice = new EthereumGasPrice();

// Get gas prices
$gasPrice = $ethereumGasPrice->getGasPrices();

// safe gas price
echo "Gas Prices:\n";
echo "Slow Gas Price: " . $gasPrice->proposeGas . " Gwei\n";
echo "Safe Gas Price: " . $gasPrice->safeGas . " Gwei\n";
echo "Fast Gas Price: " . $gasPrice->fastGas . " Gwei\n";
```

#### `Utilities`

[](#utilities)

```
// Convert gas prices to Wei
$fastGasPriceWei = $ethereumGasPrice->toWei($gasPrice->fastGas);
echo "Fast Gas Price (Wei): " . $fastGasPriceWei . PHP_EOL;

// Convert gas prices (WEI) to Hexadecimal with '0x' prefix (don't pass second parameter to just get hex)
$fastGasPriceHex = $ethereumGasPrice->toHex($fastGasPriceWei, true);
echo "Fast Gas Price (Hex): " . $fastGasPriceHex . PHP_EOL;
```

### Contributing

[](#contributing)

Contributions are welcome! Feel free to fork the repository and submit pull requests as well.

### License

[](#license)

This project is licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.

Connect with Me
---------------

[](#connect-with-me)

Feel free to reach out to me for any project-related queries or collaborations. I'm always happy to connect and discuss ideas!

[![Telegram](https://camo.githubusercontent.com/22e5147026261caf9f7434d59ea23839c08e76e803c4cea17c6eb49f946c6599/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f382f38322f54656c656772616d5f6c6f676f2e737667)](https://t.me/NumairAwan)[![WhatsApp](https://camo.githubusercontent.com/09e99a848f754222efd3ae83bae221de81fafd6bf6b74816f1437eddd0b609f5/68747470733a2f2f75706c6f61642e77696b696d656469612e6f72672f77696b6970656469612f636f6d6d6f6e732f7468756d622f362f36622f57686174734170702e7376672f35313270782d57686174734170702e7376672e706e673f3230323230323238323233393034)](https://wa.me/+923164700904)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~72 days

Total

2

Last Release

965d ago

Major Versions

v1.0.0 → v2.0.02023-09-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae1e8f3c0f08d5d37a53b25b508394263941c6e6924be1de2338d36f8d5ae959?d=identicon)[NumairAwan](/maintainers/NumairAwan)

---

Top Contributors

[![numairawan](https://avatars.githubusercontent.com/u/62851858?v=4)](https://github.com/numairawan "numairawan (14 commits)")

---

Tags

eth-gas-apieth-gas-reportereth-gas-stationeth-gas-trackereth-phpetheethereum-gas-apiethereum-gas-pricesethereum-gas-trackerethereum-gaspriceethereum-phpethereum-php-libraryphpethereumeth-gas-stationethereum-gas-pricesethereum-gaspriceeth-gas-apiethereum-gas-trackerethereum-gas-api

### Embed Badge

![Health badge](/badges/numairawan-eth-gas-tracker-php/health.svg)

```
[![Health](https://phpackages.com/badges/numairawan-eth-gas-tracker-php/health.svg)](https://phpackages.com/packages/numairawan-eth-gas-tracker-php)
```

###  Alternatives

[kornrunner/ethereum-offline-raw-tx

Pure PHP Ethereum Offline Raw Transaction Signer

63192.1k22](/packages/kornrunner-ethereum-offline-raw-tx)[kornrunner/solidity

Pure PHP implementation of Solidity

1940.5k11](/packages/kornrunner-solidity)[kornrunner/ethereum-token

PHP Ethereum Token Utils

1412.9k1](/packages/kornrunner-ethereum-token)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
