PHPackages                             farmani/tron-api - 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. [API Development](/categories/api)
4. /
5. farmani/tron-api

ActiveLibrary[API Development](/categories/api)

farmani/tron-api
================

A PHP API for interacting with Tron (Trx)

6.0.0(1y ago)080MITPHPPHP &gt;=8.0

Since Nov 28Pushed 1y agoCompare

[ Source](https://github.com/farmani/tron-api)[ Packagist](https://packagist.org/packages/farmani/tron-api)[ Docs](https://github.com/iexbase/tron-api)[ RSS](/packages/farmani-tron-api/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

TRON API
========

[](#tron-api)

A PHP API for interacting with the Tron Protocol

[![Latest Stable Version](https://camo.githubusercontent.com/aaf5bd04fd339de18157aa56a5545b74ec036829acf71eab1e379cebfa805be1/68747470733a2f2f706f7365722e707567782e6f72672f6661726d616e692f74726f6e2d6170692f76657273696f6e)](https://packagist.org/packages/farmani/tron-api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/19932f15cab2278e8bc518fe006e12e1d4fe9c6f78cc614dd682ec812fab5542/68747470733a2f2f6170692e7472617669732d63692e636f6d2f6661726d616e692f74726f6e2d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/farmani/tron-api)[![Contributors](https://camo.githubusercontent.com/cc869d2e672a39e30085df7bc76b898d15510adfe899fbe00699f072b068cca5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f6661726d616e692f74726f6e2d6170692e737667)](https://github.com/farmani/tron-api/graphs/contributors)[![Total Downloads](https://camo.githubusercontent.com/0c02b62e9c103c91e6d0a46d1490632bba9935780a4ea559e5d1585a6724928d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6661726d616e692f74726f6e2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/farmani/tron-api)

Install
-------

[](#install)

```
> composer require farmani/tron-api
```

Requirements
------------

[](#requirements)

- PHP 8.3
- ext-bcmath
- ext-mbstring

Example Usage
-------------

[](#example-usage)

```
use IEXBase\TronAPI\Tron;

$fullNode = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
$solidityNode = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');
$eventServer = new \IEXBase\TronAPI\Provider\HttpProvider('https://api.trongrid.io');

try {
    $tron = new \IEXBase\TronAPI\Tron($fullNode, $solidityNode, $eventServer);
} catch (\IEXBase\TronAPI\Exception\TronException $e) {
    exit($e->getMessage());
}

$this->setAddress('..');
//Balance
$tron->getBalance(null, true);

// Transfer Trx
var_dump($tron->send('to', 1.5));

//Generate Address
var_dump($tron->createAccount());

//Get Last Blocks
var_dump($tron->getLatestBlocks(2));

//Change account name (only once)
var_dump($tron->changeAccountName('address', 'NewName'));

// Contract
$tron->contract('Contract Address');

```

Testing
-------

[](#testing)

```
$ vendor/bin/phpunit
```

Donations
---------

[](#donations)

**Tron(TRX)**: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.7% 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

Unknown

Total

1

Last Release

582d ago

### Community

Maintainers

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

---

Top Contributors

[![serderovsh](https://avatars.githubusercontent.com/u/24723913?v=4)](https://github.com/serderovsh "serderovsh (248 commits)")[![1099511627776](https://avatars.githubusercontent.com/u/2117414?v=4)](https://github.com/1099511627776 "1099511627776 (19 commits)")[![kaankozan](https://avatars.githubusercontent.com/u/38933295?v=4)](https://github.com/kaankozan "kaankozan (9 commits)")[![farmani](https://avatars.githubusercontent.com/u/1329580?v=4)](https://github.com/farmani "farmani (3 commits)")[![sharifzadesina](https://avatars.githubusercontent.com/u/205923701?v=4)](https://github.com/sharifzadesina "sharifzadesina (3 commits)")[![sashabeton](https://avatars.githubusercontent.com/u/23243361?v=4)](https://github.com/sashabeton "sashabeton (2 commits)")[![dogdev](https://avatars.githubusercontent.com/u/4762407?v=4)](https://github.com/dogdev "dogdev (1 commits)")[![alexgotardi](https://avatars.githubusercontent.com/u/48635577?v=4)](https://github.com/alexgotardi "alexgotardi (1 commits)")

---

Tags

iexbasetron-libtron-phptron-apitron-rest-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/farmani-tron-api/health.svg)

```
[![Health](https://phpackages.com/badges/farmani-tron-api/health.svg)](https://phpackages.com/packages/farmani-tron-api)
```

###  Alternatives

[iexbase/tron-api

A PHP API for interacting with Tron (Trx)

439148.3k8](/packages/iexbase-tron-api)

PHPackages © 2026

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