Query API details
TIP
- According to this interface, you can judge whether the API usage and platform balance are sufficient
- When you need to recharge, you can use the wallet of
data.trx_addressto transfer TRX to the wallet ofdata.recharge_address.
API Method
shell
GET /v2/api/queryRequest params
Null
Responses
| Field | Type | Required | Description |
|---|---|---|---|
| code | integer | true | Response code |
| msg | string | true | Code description |
| request_id | string | true | |
| data | object | true | |
| » name | string | true | APP name |
| » today_consume_trx_amount | number | true | Today's Consumption of Platform Balance |
| » today_energy_value | integer | true | Today's rental energy |
| » today_bandwidth_value | integer | true | Today's rental bandwidth |
| » yesterday_consume_trx_amount | number | true | Yesterday's Consumption of Platform Balance |
| » yesterday_energy_value | integer | true | Yesterday's rental energy |
| » yesterday_bandwidth_value | integer | true | Yesterday's rental bandwidth |
| » all_consume_trx_amount | number | true | Total consumed platform balance |
| » all_energy_value | integer | true | Total rented energy quantity |
| » all_bandwidth_value | integer | true | Total rented bandwidth quantity |
| » create_time | integer | true | Create time |
| » analysis_time | integer | true | Update time |
| » trx_money | number | true | Balance of platform |
| » trx_address | string | true | Account-bound wallet |
| » recharge_address | string | true | Platform recharge wallet |
| » order_duration | []integer | true | Available order duration |
Response example
json
{
"code": 0,
"msg": "ok",
"request_id": "897a9b33-152c-488f-8d2b-ab9a6a39268a",
"data": {
"name": "App1",
"energy_surplus": 0,
"bandwidth_surplus": 0,
"today_consume_trx_amount": 12.24,
"today_energy_value": 96000,
"today_bandwidth_value": 0,
"yesterday_consume_trx_amount": 3.92,
"yesterday_energy_value": 32000,
"yesterday_bandwidth_value": 0,
"all_consume_trx_amount": 0,
"all_energy_value": 0,
"all_bandwidth_value": 0,
"ip_whitelist": "127.0.0.1",
"ua_whitelist": "",
"create_time": 1657004698,
"analysis_time": 1727254700,
"trx_money": 102425.036166,
"trx_address": "xxxxxxxxxxxx",
"recharge_address": "xxxxxxxxx",
"order_duration": [
600,
3600,
10800,
86400,
172800,
259200,
345600,
432000,
518400,
604800,
2592000
]
}
}Code demo
Shell
shell
curl --location --request GET 'https://feee.io/open/v2/api/query' \
--header 'key: <key>' \
--header 'User-Agent: Feee.io Shell Client/1.0.0 (https://feee.io)'Golang
go
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://feee.io/open/v2/api/query"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("key", "<key>")
req.Header.Add("User-Agent", "Feee.io Golang Client/1.0.0 (https://feee.io)")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}PHP
php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://feee.io/open/v2/api/query',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'key: <key>',
'User-Agent: Feee.io PHP Client/1.0.0 (https://feee.io)'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;Python
python
import http.client
conn = http.client.HTTPSConnection("feee.io")
payload = ''
headers = {
'key': '<key>',
'User-Agent': 'Feee.io Python Client/1.0.0 (https://feee.io)'
}
conn.request("GET", "/open/v2/api/query", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))Java
java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://feee.io/open/v2/api/query")
.method("GET", body)
.addHeader("key", "<key>")
.addHeader("User-Agent", "Feee.io Java Client/1.0.0 (https://feee.io)")
.build();
Response response = client.newCall(request).execute();