USDT余额查询-网亿工作室

USDT余额查询

GET /usdtcha 费率:10积分/次

接口说明

获取USDT和TRX、可用能量、TRX数量、USDT数量、USDT和TRX余额(已兑换CNY)、实时汇率、创建时间

参数说明

请求地址

接口地址: https://www.51dzsc.com/wp-json/wangyi/v1/usdtcha
请求方式: GET

请求头

参数名 必填 说明
X-API-Key API密钥,用于认证请求
Content-Type 请求内容类型,固定为 application/json

请求参数

参数名 类型 必填 说明
address string address

返回示例

{
    "status": "success",
    "data": {
        "TRX_Balance": "TRX余额",
        "USDT_Balance": "USDT余额",
        "TRX_to_CNY_Rate": "TRX转人民币的汇率",
        "USDT_to_CNY_Rate": "USDT转人民币的汇率",
        "CNY_from_USDT": "人民币转USDT",
        "CNY_from_TRX": "人民币转TRX",
        "Total_CNY_Balance": "转换后的总余额",
        "Available_Bandwidth": "可用带宽",
        "Available_Energy": "可用能量",
        "Account_Details": {
            "address": "地址",
            "create_time": "创建时间",
            "latest_opration_time": "最近操作时间",
            "latest_consume_free_time": "最近免费消耗时间",
            "net_window_size": "网络窗口大小",
            "net_window_optimized": "网络窗口是否优化",
            "account_resource": {
                "latest_consume_time_for_energy": "最近能量消耗时间",
                "energy_window_size": "能量窗口大小",
                "energy_window_optimized": "能量窗口是否优化"
            },
            "asset_optimized": "资产是否优化"
        }
    }
}

在线测试

示例代码

# cURL示例
curl -X GET \
    -H "X-API-Key: your_api_key" \
    -H "Content-Type: application/json" \
    
    https://www.51dzsc.com/wp-json/wangyi/v1/usdtcha
# Python示例
import requests
import json

url = "https://www.51dzsc.com/wp-json/wangyi/v1/usdtcha"
headers = {
    "X-API-Key": "your_api_key",
    "Content-Type": "application/json"
}
response = requests.get(url, headers=headers)

print(response.json())
# PHP示例
<?php
$url = "/usdtcha";
$api_key = "your_api_key";

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "/usdtcha",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-API-Key: $api_key",
        "Content-Type: application/json"
    ],
]);

$response = curl_exec($curl);
$data = json_decode($response, true);

curl_close($curl);
print_r($data);
// JavaScript示例
const apiUrl = 'https://www.51dzsc.com/wp-json/wangyi/v1/usdtcha';
const apiKey = 'your_api_key';

fetch(apiUrl, {
    method: 'GET',
    headers: {
        'X-API-Key': apiKey,
        'Content-Type': 'application/json'
    }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
// Java示例
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ApiExample {
    public static void main(String[] args) {
        HttpClient client = HttpClient.newHttpClient();
                HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://www.51dzsc.com/wp-json/wangyi/v1/usdtcha"))
            .header("X-API-Key", "your_api_key")
            .header("Content-Type", "application/json")
            .GET()
            .build();
        
        try {
            HttpResponse response = client.send(request,
                HttpResponse.BodyHandlers.ofString());
            System.out.println(response.body());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}