PHPackages                             trenergy-wallet/trenergy\_main\_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. trenergy-wallet/trenergy\_main\_api

ActiveLibrary[API Development](/categories/api)

trenergy-wallet/trenergy\_main\_api
===================================

Trenergy API client for Laravel

v1.0.6(10mo ago)01MITPHPPHP ^8.2

Since Aug 12Pushed 9mo agoCompare

[ Source](https://github.com/Trenergy-wallet/trenergy_main_api)[ Packagist](https://packagist.org/packages/trenergy-wallet/trenergy_main_api)[ RSS](/packages/trenergy-wallet-trenergy-main-api/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (2)Versions (8)Used By (0)

Trenergy API
============

[](#trenergy-api)

Table of Contents
-----------------

[](#table-of-contents)

 Contents1. [📦 Requirements](#-requirements)
2. [🚀 Installation](#-installation)
3. [⚙️ Configuration](#-configuration)
4. [💻 Basic Usage example](#-basic-usage-example)
5. [🔧 Available Methods](#-available-methods)
6. [🚨 Error Handling](#-error-handling)

[![Latest Stable Version](https://camo.githubusercontent.com/42e6c396f2eed57c964f2ce89caedaf1f410c843a3fd30d4b0ed1de46968d056/68747470733a2f2f706f7365722e707567782e6f72672f7472656e657267792d77616c6c65742f7472656e657267795f6d61696e5f6170692f76)](https://packagist.org/packages/trenergy-wallet/trenergy_main_api)[![Total Downloads](https://camo.githubusercontent.com/e57fa65a79b14b5dd148c6dcc696b2d6b5b8fb0ecc24e9632c911d9e2a04b6c8/68747470733a2f2f706f7365722e707567782e6f72672f7472656e657267792d77616c6c65742f7472656e657267795f6d61696e5f6170692f646f776e6c6f616473)](https://packagist.org/packages/trenergy-wallet/trenergy_main_api)[![License](https://camo.githubusercontent.com/121869aa9b8a9ecf40cd97f042a9f80020f4e7da3d2725ce2ed529fb67e0eb72/68747470733a2f2f706f7365722e707567782e6f72672f7472656e657267792d77616c6c65742f7472656e657267795f6d61696e5f6170692f6c6963656e7365)](https://packagist.org/packages/trenergy-wallet/trenergy_main_api)[![PHP Version](https://camo.githubusercontent.com/cbcde15dda674acb06a616797aa24f26b59e25e928f731ab27bf8fe9a5dd8221/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7472656e657267792d77616c6c65742f7472656e657267795f6d61696e5f617069)](https://packagist.org/packages/trenergy-wallet/trenergy_main_api)

Official PHP client for [TR.ENERGY](https://TR.ENERGY/en/) API with full Laravel integration.

📦 Requirements
--------------

[](#-requirements)

- PHP 8.2+
- Laravel 12
- GuzzleHTTP 7.0+

🚀 Installation
--------------

[](#-installation)

```
composer config repositories.trenergy-main-api vcs https://github.com/Trenergy-wallet/trenergy_main_api
composer require trenergy-wallet/api:^1.0.1
```

⚙️ Configuration
----------------

[](#️-configuration)

Add to your .env:

```
TRENERGY_API_URL=https://api.trenergy.com
TRENERGY_API_KEY=your_api_key_here
TRENERGY_API_LANG=en  # Supported: en, ru
```

💻 Basic Usage example
---------------------

[](#-basic-usage-example)

```
use Apd\Trenergy\Facades\Trenergy;

// Get account info
$account = Trenergy::getAccount();

// Create consumer
$consumer = Trenergy::createConsumer(
    paymentPeriod: '15',
    address: 'TXYZ...',
    resourceAmount: 100.0,
    name: 'My Consumer'
);

// Get wallets
$wallets = Trenergy::getWallets();
```

🔧 Available Methods
-------------------

[](#-available-methods)

MethodParametersReturnsDescription`getAccount()`-`AccountDTO|array`Get account information`getTopUp()`-`AccountTopUpDTO|array`Get top-up information`subscribe()``bool $isBalanceUsed`, `?bool $isCredit = null``SubscribeDTO|array`Subscribe to service`getConsumers()`-`Collection|array`List all consumers`downLoadConsumerList()``?string $name`, `?bool $isActive`, `?bool $autoRenewal`, `?array $paymentPeriods`, `?array $wallet`, `?string $format``string`Download consumer list`createConsumer()``string $paymentPeriod`, `string $address`, `float $resourceAmount`, `string $name`, `int $autoRenewal = 0``OrderCreatedDTO|array`Create new consumer`getConsumer()``int $consumerId``ConsumerDTO|array`Get consumer details`activateConsumer()``int $consumerId``ArrayDTO|array`Activate consumer`deActivateConsumer()``int $consumerId``ArrayDTO|array`Deactivate consumer`updateConsumer()``int $consumerId`, `float $resourceAmount`, `int $paymentPeriod`, `bool $autoRenewal`, `?string $name = null``ConsumerDTO|array`Update consumer`destroyConsumer()``int $consumerId``ArrayDTO|array`Delete consumer`buyEnergy()``string $paymentPeriod`, `string $address`, `float $resourceAmount`, `string $name`, `int $autoRenewal = 0``ArrayDTO|array`Create and activate consumer`toggleAutoRenewal()``bool $autoRenewal`, `array $consumersIds``ArrayDTO|array`Toggle auto-renewal`consumerBlockchainEnergy()``int $consumerId``BlockchainEnergyDTO|array`Get blockchain energy`consumerMassTrx()``float $amount`, `array $consumersIds``ArrayDTO|array`Mass TRX transfer`activateTronAddress()``string $address``ArrayDTO|array`Activate TRON address`consumerResetValidity()``int $consumerId``ArrayDTO|array`Reset validity period`consumerSummary()`-`ConsumerSummaryDTO|array`Get consumer summary`consumerAddressReport()``string $address`, `?string $fromDate`, `?string $toDate``ArrayDTO|array`Get address report`consumersConsumptionStats()``string $fromDate`, `string $toDate`, `?int $perPage``ConsumptionStatTotalDTO|array`Get consumption stats`consumerMassPaymentPeriod()``array $consumersIds`, `int $paymentPeriod`, `bool $autoRenewal``ArrayDTO|array`Mass update payment period`amlList()``?string $fromDate`, `?string $toDate`, `?int $perPage``AmlListDTO|array`Get AML list`amlCheck()``string $blockchain`, `?string $address`, `?string $txid``ArrayDTO|array`Check AML status`amlWalletType()``string $address``AmlWalletTypeDTO|array`Check AML status`amlShow()``int $amlId``AmlCheckResultDTO|array`Show AML`amlRepeatDeclined()``int $amlId``ArrayDTO|array`Repeat AML when Declined`amlDeleteById()``int $amlId``ArrayDTO|array`Delete AML Report`getWithdrawals()``?int $perPage = 5``GetWithdrawalsDTO|array`Get withdrawals list`withdrawals()``float $trxAmount`, `string $address`, `string $oneTimePassword``ArrayDTO|array`Create withdrawal`stakes()``int $perPage = 5``GetStakeDTO|array`Get stakes list`stake()``float $trxAmount``ArrayDTO|array`Create stake`unstake()``float $trxAmount`, `$oneTimePassword``ArrayDTO|array`Unstake funds`stakeSync()`-`ArrayDTO|array`Sync stakes`stakeProfitability()``?int $period = null``StakeProfitabilityDTO|array`Get profitability stats`partners()``?int $leaderId = null``StructureDTO|array`Get partners structure`getWallets()`-`Collection|array`Get wallets list`addWallet()``string $address``ArrayDTO|array`Add wallet`dropWallet()``int $walletId`, `string $oneTimePassword``ArrayDTO|array`Remove wallet🚨 Error Handling
----------------

[](#-error-handling)

All methods may throw:

- `TrenergyServerErrorException`
- `TrenergyWrongPaymentPeriod`
- `RequireEnvParameters`

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance56

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% 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 ~3 days

Total

7

Last Release

302d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ccd5e7aaff5dc3417063f0cee26fd32a4a0bf3cfaf7e7273ad1a8a18e0e8db7?d=identicon)[support-tr.energy](/maintainers/support-tr.energy)

---

Top Contributors

[![cheredn-apd](https://avatars.githubusercontent.com/u/169445823?v=4)](https://github.com/cheredn-apd "cheredn-apd (16 commits)")[![Trenergy-wallet](https://avatars.githubusercontent.com/u/175290840?v=4)](https://github.com/Trenergy-wallet "Trenergy-wallet (1 commits)")

### Embed Badge

![Health badge](/badges/trenergy-wallet-trenergy-main-api/health.svg)

```
[![Health](https://phpackages.com/badges/trenergy-wallet-trenergy-main-api/health.svg)](https://phpackages.com/packages/trenergy-wallet-trenergy-main-api)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M985](/packages/statamic-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M222](/packages/backpack-crud)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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