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

ActiveLibrary[API Development](/categories/api)

softinvest/tron-api
===================

A PHP API for interacting with Tron (Trx)

v1.0.0(2y ago)0973MITPHPPHP &gt;=8.1

Since Jun 26Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (5)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/ffd9cc55f62810d0cbbc9957ef3cb6dbafc2b2e4d3fe029f0b093ac9f6e01145/68747470733a2f2f706f7365722e707567782e6f72672f736f6674696e766573742f74726f6e2d6170692f76657273696f6e)](https://packagist.org/packages/softinvest/tron-api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/b70cb8712b39599d89ef556b3f717a7be35cf332a6adb2442778ef85e1a39f4b/68747470733a2f2f6170692e7472617669732d63692e636f6d2f736f6674696e766573742f74726f6e2d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/softinvest/tron-api)[![Contributors](https://camo.githubusercontent.com/b3ba230c92632e4a0f9fd923c855ca2bb6626b01816e44ea710d339b5a40e821/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f736f6674696e766573742f74726f6e2d6170692e737667)](https://github.com/softinvest/tron-api/graphs/contributors)[![Total Downloads](https://camo.githubusercontent.com/3cfe46289737fc63e9b07e945ad01bbc0a872242d2ab76dc7cd85e430675f82e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6674696e766573742f74726f6e2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softinvest/tron-api)

Install
-------

[](#install)

```
> composer require softinvest/tron-api --ignore-platform-reqs
```

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

[](#requirements)

The following versions of PHP are supported by this version.

- PHP 8.1

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

[](#example-usage)

```
use SoftInvest\TronAPI\Tron;

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

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

1057d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3435693ce772ee50f22731e0f2031eaa6804789e6583ee0467f5b669d2919770?d=identicon)[softinvest](/maintainers/softinvest)

---

Tags

tron-libtron-phptron-apitron-rest-apisoftinvest

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/softinvest-tron-api/health.svg)](https://phpackages.com/packages/softinvest-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)
