PHPackages                             fptron/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. fptron/tron-api

ActiveLibrary[API Development](/categories/api)

fptron/tron-api
===============

A PHP API for interacting with Tron (Trx)

0.0.1(9mo ago)01001MITPHPPHP ^7.4

Since Jul 30Pushed 9mo agoCompare

[ Source](https://github.com/fptron/tron-api)[ Packagist](https://packagist.org/packages/fptron/tron-api)[ Docs](https://github.com/fptron/tron-api)[ RSS](/packages/fptron-tron-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (1)

TRON API
========

[](#tron-api)

A PHP API for interacting with the Tron Protocol

Install
-------

[](#install)

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

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

[](#requirements)

The following versions of PHP are supported by this version.

- PHP 7.4

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

[](#example-usage)

```
use FpTron\TronAPI\Tron;

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

try {
    $tron = new \FpTron\TronAPI\Tron($fullNode, $solidityNode, $eventServer);
} catch (\FpTron\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)**: TGTqnzCQSSp9UDqvRidPq5pfdiyVfF8eWR

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance56

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

293d ago

### Community

Maintainers

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

---

Top Contributors

[![luojie972971435](https://avatars.githubusercontent.com/u/68107156?v=4)](https://github.com/luojie972971435 "luojie972971435 (3 commits)")

---

Tags

tron-libtron-phptron-apitron-rest-apifptron

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[iexbase/tron-api

A PHP API for interacting with Tron (Trx)

437136.9k8](/packages/iexbase-tron-api)[fenguoz/tron-api

A PHP API for interacting with Tron (Trx)

1146.8k3](/packages/fenguoz-tron-api)

PHPackages © 2026

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