Skip to content

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_address to transfer TRX to the wallet of data.recharge_address.

API Method

shell
GET /v2/api/query

Request params

Null

Responses

FieldTypeRequiredDescription
codeintegertrueResponse code
msgstringtrueCode description
request_idstringtrue
dataobjecttrue
» namestringtrueAPP name
» today_consume_trx_amountnumbertrueToday's Consumption of Platform Balance
» today_energy_valueintegertrueToday's rental energy
» today_bandwidth_valueintegertrueToday's rental bandwidth
» yesterday_consume_trx_amountnumbertrueYesterday's Consumption of Platform Balance
» yesterday_energy_valueintegertrueYesterday's rental energy
» yesterday_bandwidth_valueintegertrueYesterday's rental bandwidth
» all_consume_trx_amountnumbertrueTotal consumed platform balance
» all_energy_valueintegertrueTotal rented energy quantity
» all_bandwidth_valueintegertrueTotal rented bandwidth quantity
» create_timeintegertrueCreate time
» analysis_timeintegertrueUpdate time
» trx_moneynumbertrueBalance of platform
» trx_addressstringtrueAccount-bound wallet
» recharge_addressstringtruePlatform recharge wallet
» order_duration[]integertrueAvailable 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();