Type/to search
Welcome to FMZ Quant Trading Platform
Programming Languages
JavaScript
TypeScript
Python
C++
MyLanguage
PINE Language
Blockly Visual Programming
Workflow
Key Security
Live Trading
Strategy Library
Docker
Deploy Docker
One-Click Docker Rental
Manual Deployment of Bot
Docker Operation Precautions
Global IP Address Specification
Command Line Parameters for Bot Program
Live Trading Data Migration
Docker Monitor
Exchange
Strategy Editor
Backtesting System
Strategy Entry Functions
Strategy Framework and API Functions
Template Library
Strategy Parameters
Interactive Controls
Options Trading
C++ Strategy Writing Guide
JavaScript Strategy Writing Guide
Web3
Built-in Libraries
Extended API Interface
MCP Service
Trading Terminal
Data Explorer
Alpha Factor Analysis Tool
General Protocol
Debugging Tool
Remote Editing
Import and Export of Complete Strategies
Multi-language Support
Live Trading and Strategy Grouping
Live Trading Display
Strategy Sharing and Renting
Live Trading Message Push
Common Causes of Live Trading Errors and Abnormal Exits
Exchange-Specific Notes

Use the exchange.IO() function to call TRON RPC methods. For methods requiring signatures, the underlying layer has automatically encapsulated the signing operations. The following lists commonly used methods. For other methods, please refer to the official TRON project documentation.

  • GetAccount
    javascript
    exchange.IO("api", "tron", "GetAccount", "TKCG...") // "TKCG..." is the TRON wallet address, this function returns the account information for the "TKCG..." address.
  • GetAccountResource
    javascript
    exchange.IO("api", "tron", "GetAccountResource", "TKCG...") // Get resources for the specified wallet address, including energy and bandwidth.
  • GetContractABI
    javascript
    exchange.IO("api", "tron", "GetContractABI", "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t") // Get USDT TRC20 contract ABI
  • GetAssetIssueByName
    javascript
    exchange.IO("api", "tron", "GetAssetIssueByName", "TRX") // Get token asset information by token name
  • GetNowBlock
    javascript
    exchange.IO("api", "tron", "GetNowBlock") // Get current block information
  • GetBlockByNum
    javascript
    exchange.IO("api", "tron", "GetBlockByNum", 70624300)
  • GetTransactionByID
    javascript
    exchange.IO("api", "tron", "GetTransactionByID", "05a8fae2cd1cbf36b61d12e219588d25b4826436f055f93388a96e620ec3f3f2") // Get Transaction by transaction hash
  • TRC20ContractBalance
    javascript
    exchange.IO("api", "tron", "TRC20ContractBalance", "TKCG...", "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t") // Get wallet USDT balance, note that the returned data is not precision-processed, for example, returned data: ```6890251``` means ```6.890251 USDT```.
  • TriggerConstantContract
    javascript
    function main() { let ret = exchange.IO("api", "tron", "TriggerConstantContract", "", "TSUUVjysXV8YqHytSNjfkNXnnB49QDvZpx", "token0()", "") // Call the token0() method of the smart contract, TriggerConstantContract is used to call read-only methods let data = exchange.IO("decode", "address", Encode("raw", "raw", "hex", ret["constant_result"][0])) // Decode data return data // data: 0x891cdb91d149f23b1a45d9c5ca78a88d0cb44c18 }
  • TRC20Call
    javascript
    function main() { let ret = exchange.IO("api", "tron", "TRC20Call", "", "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "0x06fdde03", true, 0) // Use TRC20Call to call read-only method 0x06fdde03 let data = Encode("raw", "raw", "hex", ret.constant_result[0]) return exchange.IO("api", "tron", "ParseTRC20StringProperty", data) // Tether USD }
  • Transfer
    javascript
    exchange.IO("api", "tron", "Transfer", "TWTbn...", "TKCG...", 1000000) // Use Transfer method to transfer TRX, from "TWTbn..." to "TKCG...", 1000000 equals 1 TRX.