Recommend this page to a friend! |
![]() |
Info | Example | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2025-05-10 (3 days ago) ![]() | Not yet rated by the users | Total: Not yet counted | Not yet ranked |
Version | License | PHP version | Categories | |||
tronzap-sdk-php 1.0.0 | Custom (specified... | 7 | Web services, PHP 7, Business |
Description | Author | |||||||||||||
This package can manage energy accounts using the TronZap API. |
|
To begin using this package, please register at https://tronzap.com/ to obtain your API key.
Read this tutorial article to learn how to execute energy management operations with TronSDK.
<?php |
English | Español | Português | ???????
Official PHP SDK for the TronZap API. This SDK allows you to easily integrate with TronZap services for TRON energy rental.
TronZap.com allows you to buy TRON energy, making USDT (TRC20) transfers cheaper by significantly reducing transaction fees.
? Register for an API key to start using TronZap API and integrate it via the SDK.
You can install the package via composer:
composer require tron-energy-market/tronzap-sdk-php
Check out at Packagist: https://packagist.org/packages/tron-energy-market/tronzap-sdk-php
use TronZap\Client as TronZapClient;
use TronZap\Exception\TronZapException;
// Initialize the client
$apiToken = 'your_api_token';
$apiSecret = 'your_api_secret';
$client = new TronZapClient($apiToken, $apiSecret);
try {
// Get account balance
$balance = $client->getBalance();
print_r($balance);
// Get available services
$services = $client->getServices();
print_r($services);
// Estimate energy amount for USDT transfer
$estimate = $client->estimateEnergy('FROM_TRX_ADDRESS', 'TO_TRX_ADDRESS', 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t');
print_r($estimate);
// Create an energy transaction
$transaction = $client->createEnergyTransaction(
'TRX_ADDRESS', // TRON wallet address
$estimate['energy'], // Energy amount
1, // Duration (hours), can be 1 or 24
'my-tx-id', // External ID (optional)
true // Activate address (optional)
);
print_r($transaction);
// Check transaction status
$status = $client->checkTransaction($transaction['id']);
print_r($status);
} catch (TronZapException $e) {
echo "Error: " . $e->getMessage() . " (Code: " . $e->getCode() . ")\n";
}
The SDK will throw a TronZapException
if an API error occurs. Common error codes include:
composer test
The MIT License (MIT). Please see License File for more information.
For support, please contact [email protected].
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | |||||||
100% |
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.