TRX Advanced API Documentation

Base URL: https://trx-explorer.co/api

Welcome to the TRX Advanced API Documentation. This API provides developers with the tools to integrate and interact with the **Tron (TRX)** blockchain. Access endpoints for account management, token transfers, transactions, blockchain data, network information, and wallet services.

Key Features:

  1. Direct Tron Node Access:

    Our API allows seamless access to the Tron network, enabling querying of on-chain data and submitting transactions effortlessly.

  2. Robust Error Handling:

    The TRX Advanced API ensures reliability and stability, providing clear error messages in case of issues.

  3. Flexible Communication Methods:

    Support for both POST and GET methods for a variety of use cases, making it adaptable to any development environment.

  4. Enhanced Security:

    Endpoints involving private keys and mnemonic phrases are securely handled to ensure safe operations.

  5. Comprehensive Endpoint Collection:

    An extensive set of endpoints designed to give developers complete control over their interactions with the Tron blockchain.

The TRX API supports both RESTful and JSON-RPC communication modes for easy and efficient blockchain integration.


API Benefits

No Authentication Required: Our API does not require user authentication, making it quick and easy to get started with no overhead.

No Rate Limits: There are no rate limits on the number of requests you can make to the API, giving you complete freedom to use the service as much as you need.

This makes our API ideal for developers building decentralized applications (dApps), token tools, or anyone needing quick access to the Tron network without the need for complex setup.


Account Management

GET /api/create/keypair

Generate a new Tron wallet with a private key and public key in hex format.

Example Usage:


GET https://trx-explorer.co/api/create/keypair

Response:

{
  "private_key": "0xabc123def456...",
  "public_key": "0x789abc456def..."
}
            

POST /api/create/account/by_mnemonic

Create a new account using a mnemonic phrase.

Payload Requirements:

Example Usage:


POST https://trx-explorer.co/api/create/account/by_mnemonic

Payload:

{
  "mnemonic": "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
  "account_name": "MyTRXAccount"
}

Response:

{
  "account_address": "TXX2C2Y6Y9Y0B0Z3Q8KJ3ZQ0D5Q8F8K7J8V9Y",
  "public_key": "0x789abc456def...",
  "private_key": "0xabc123def456..."
}
            

GET /api/accounts/{account_address}

Retrieve detailed information about a Tron account, including balance and transaction history.

Example Usage:


GET https://trx-explorer.co/api/accounts/TXX2C2Y6Y9Y0B0Z3Q8KJ3ZQ0D5Q8F8K7J8V9Y

Response:

{
  "account_address": "TXX2C2Y6Y9Y0B0Z3Q8KJ3ZQ0D5Q8F8K7J8V9Y",
  "balance": "1000.25 TRX",
  "transaction_count": 125
}
            

Token Operations

POST /api/token/transfer

Transfer tokens between Tron accounts. This can handle TRC-10 and TRC-20 tokens.

Payload Requirements:

Example Usage:


POST https://trx-explorer.co/api/token/transfer

Payload:

{
  "from_address": "TXX2C2Y6Y9Y0B0Z3Q8KJ3ZQ0D5Q8F8K7J8V9Y",
  "to_address": "TXX4D8E1A2F0H1K9P0JY3Q0H9P0L1Q3L0V9V",
  "amount": 100,
  "token_id": "TRC20-XYZ123"
}

Response:

{
  "status": "success",
  "transaction_id": "TX123456789"
}
            

Transactions

GET /api/transactions/{transaction_id}

Retrieve detailed information about a specific transaction on the Tron network.

Example Usage:


GET https://trx-explorer.co/api/transactions/TX123456789

Response:

{
  "transaction_id": "TX123456789",
  "status": "confirmed",
  "block": 1234567,
  "from": "TXX2C2Y6Y9Y0B0Z3Q8KJ3ZQ0D5Q8F8K7J8V9Y",
  "to": "TXX4D8E1A2F0H1K9P0JY3Q0H9P0L1Q3L0V9V",
  "amount": 100,
  "token_id": "TRC20-XYZ123"
}
            

Blockchain Data

GET /api/block/{block_number}

Retrieve information about a specific block on the Tron blockchain.

Example Usage:


GET https://trx-explorer.co/api/block/1234567

Response:

{
  "block_number": 1234567,
  "transactions": 100,
  "miner": "TXX1E2F3A4B5C6D7E8F9G0H1J2K3L4M5N6O7P",
  "timestamp": "2024-11-27T15:30:00Z"
}
            

Network Information

GET /api/network/stats

Retrieve real-time network statistics for the Tron blockchain.

Example Usage:


GET https://trx-explorer.co/api/network/stats

Response:

{
  "current_block": 1234567,
  "transactions_per_second": 2500,
  "online_peers": 200
}
            

Wallet Interaction and Blockchain Tools

The TRX Advanced API provides developers with powerful tools to interact with the Tron blockchain directly, enabling seamless transaction management and access to blockchain data. While we do not create, store, or restore wallets or any user data, our API serves as a robust interface for utilizing the Tron network efficiently.

Key Features of Wallet Interaction Services:

Our focus is on empowering users and developers by offering a secure, flexible, and scalable API to access Tron’s blockchain infrastructure. All sensitive data, such as private keys and mnemonic phrases, remains entirely within the user's control, ensuring maximum privacy and security.

With the TRX Advanced API, users can leverage the Tron blockchain for secure transactions and real-time data without compromising their independence or asset safety.