curl -X POST https://{BASE_URI}/api/tron/token/list
{
"code": 1000,
"message": "success",
"data": [
{
"id": 3,
"icon": "https://res.uuapi.help/trc20_USDC.svg",
"name": "Circle USD",
"symbol": "USDC",
"type": "TRC20",
"contract": "TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8",
"min_re_amt": "1.000000",
"status": 1
},
{
"id": 1,
"icon": "https://res.uuapi.help/trx.svg",
"name": "TRX",
"symbol": "TRX",
"type": "TRX",
"contract": "TRX",
"min_re_amt": "1.000000",
"status": 1
},
{
"id": 2,
"icon": "https://res.uuapi.help/trc20_USDT.svg",
"name": "Tether USD",
"symbol": "USDT",
"type": "TRC20",
"contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"min_re_amt": "1.000000",
"status": 1
}
]
}
| 参数名 | 类型 | 说明 |
|---|---|---|
| id | number | 币种ID |
| icon | string | 币种图标URL |
| name | string | 币种名称 |
| symbol | string | 币种符号 |
| type | string | 币种类型 (TRX/TRC10/TRC20/TRC721) |
| contract | string | 合约地址 |
| min_re_amt | string | 最小收款金额 |
| status | number | 状态 (1: 正常) |
<?php
$baseUri = 'your_base_uri';
$apiKey = 'your_api_key';
$url = 'https://' . $baseUri . '/api/tron/token/list';
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'uu-api-key: ' . $apiKey,
],
CURLOPT_POSTFIELDS => '{}',
]);
$response = curl_exec($ch);
if ($response === false) {
$err = curl_error($ch);
curl_close($ch);
throw new RuntimeException('Request failed: ' . $err);
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status !== 200) {
throw new RuntimeException('HTTP status ' . $status . ', body: ' . $response);
}
$data = json_decode($response, true);
if (!is_array($data)) {
throw new RuntimeException('Invalid JSON response');
}
print_r($data);
const axios = require("axios");
axios.post(
"https://{BASE_URI}/api/tron/token/list", // 请求地址 URI
{
headers: {
"Content-Type": "application/json",
"uu-api-key": "your_api_key",
},
},
);