CatFee.IO
Buy Tron EnergyDashboard
English
English
  • Introduction
  • Getting started
    • Quick Start Guide
    • Buy Energy via Direct TRX Transfer
    • Buy Energy via DApp
    • Buy Energy via API
      • API Overview
      • Java Example for Calling API
      • Python Example for Calling API
      • PHP Example for Calling API
      • Node.js Example for Calling API
      • Go Example for Calling API
    • API Supports Idempotency
    • Energy Subleasing Service
    • πŸ’ŽTelegram Premium Reselling
    • Blockchain Monitoring Service
    • TRON Node Connection Guide
    • Frequently Asked Questions (FAQ)
    • Terms of Service
  • API Reference
    • Account Information
    • Buy Energy
    • Get Order Detail
    • Estimated Order Amount
    • Buy Telegram Premium
  • knowledge base
    • What is TRON Energy?
    • Why Rent Energy on the TRON Network?
    • How to fix β€œOUT OF ENERGY” error on TRON Transfers?
    • Why Can’t You Use a Centralized Exchange (CEX) Wallet to Buy TRON Energy?
    • What is a Centralized Exchange (CEX)?
    • How Much Energy and Bandwidth Does a USDT Transfer Consume?
    • Why Does the Transfer Fail Even After Renting Energy on TRON?
    • Why Are Some Energy Rentals So Cheap?
  • Telegram Bot
    • How to Create a Telegram Bot and Host It on CatFee?
Powered by GitBook
On this page
  • πŸ“ Node Information
  • 🌐 Communication Overview
  • πŸš€ Multi-language Connection Examples
  • πŸ“¦ Supported API Interfaces
  • ⚠️ Important Notes
  • πŸ› οΈ Technical Support

Was this helpful?

  1. Getting started

TRON Node Connection Guide

CatFee offers stable and high-performance TRON node rental services, supporting gRPC protocol for seamless interaction with the TRON network. This helps developers quickly integrate TRON features to build high-performance DApps or on-chain services.


πŸ“ Node Information

  • Node Host: tron-168.catfee.io

  • Port: 50051

  • Protocol: gRPC

  • Authentication:

    • Header Name: X-CATFEE-TOKEN

    • Header Value: YOUR_API_KEY (Please contact support to obtain)

πŸ’‘ Both wallet and walletSolidity gRPC services are available on port 50051.


🌐 Communication Overview

Using the gRPC protocol, you can access common services of the TRON node:

  • wallet: For unconfirmed transactions (not yet on-chain)

  • walletSolidity: For reading confirmed on-chain data


πŸš€ Multi-language Connection Examples

🐍 Python (Using grpcio and tronpy)

pip install grpcio tronpy
from tronpy.providers.grpc_provider import GrpcProvider
from tronpy import Tron

provider = GrpcProvider(
    endpoint="tron-168.catfee.io:50051",
    api_key="YOUR_API_KEY",
    secure=False  # Unsecured connection
)

client = Tron(provider=provider)
account = client.get_account("T...")
print(account)

🟦 Node.js (Using grpc and official proto files)

npm install grpc @grpc/grpc-js @grpc/proto-loader
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');

const packageDef = protoLoader.loadSync('wallet.proto', {});
const walletProto = grpc.loadPackageDefinition(packageDef).protocol;

const metadata = new grpc.Metadata();
metadata.set('X-CATFEE-TOKEN', 'YOUR_API_KEY');

const client = new walletProto.Wallet(
  'tron-168.catfee.io:50051',
  grpc.credentials.createInsecure()
);

client.GetNow({}, metadata, (err, res) => {
  console.log(res);
});

πŸ”§ Be sure to prepare .proto files in advance. See TRON’s official repository: https://github.com/tronprotocol/protocol


β˜• Java (Using grpc-java)

ManagedChannel channel = NettyChannelBuilder
    .forAddress("tron-168.catfee.io", 50051)
    .usePlaintext()
    .build();

WalletGrpc.WalletBlockingStub walletStub = WalletGrpc.newBlockingStub(channel)
    .withInterceptors(MetadataUtils.newAttachHeadersInterceptor(
        new Metadata() {{
            put(Metadata.Key.of("X-CATFEE-TOKEN", Metadata.ASCII_STRING_MARSHALLER), "YOUR_API_KEY");
        }}
    ));

Account request = Account.newBuilder().setAddress(ByteString.copyFromUtf8("T...")).build();
Account response = walletStub.getAccount(request);
System.out.println(response);

πŸ“¦ Supported API Interfaces

  • GetAccount

  • GetTransactionById

  • CreateTransaction

  • BroadcastTransaction

  • TriggerSmartContract ...and more

πŸ“š Refer to API documentation: https://developers.tron.network/reference/wallet-getaccount


⚠️ Important Notes

  • The test environment supports up to 20 requests per second

  • Always include the X-CATFEE-TOKEN header for authentication

  • gRPC clients must support HTTP/2

  • When using walletSolidity, data is retrieved from the confirmed on-chain state


πŸ› οΈ Technical Support

If you encounter any integration issues or need customized support, contact the CatFee tech team:

  • Telegram Support: @CatFee_James

  • Official Website: https://catfee.io


Choosing a reliable node is critical for building on TRON. CatFee offers highly available, low-latency, authenticated TRON node servicesβ€”your best choice for blockchain development!

PreviousBlockchain Monitoring ServiceNextFrequently Asked Questions (FAQ)

Last updated 1 month ago

Was this helpful?