Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Получить текущие цены на энергию и bandwidth
cURL
curl --request GET \ --url https://api.tronrental.com/v1/prices
import requests url = "https://api.tronrental.com/v1/prices" response = requests.get(url) print(response.text)
const options = {method: 'GET'}; fetch('https://api.tronrental.com/v1/prices', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.tronrental.com/v1/prices", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.tronrental.com/v1/prices" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
HttpResponse<String> response = Unirest.get("https://api.tronrental.com/v1/prices") .asString();
require 'uri' require 'net/http' url = URI("https://api.tronrental.com/v1/prices") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body
{ "energy_trx": {}, "energy_sun": {}, "energy_usd": {}, "energy_volume": 123, "bandwidth_trx": {}, "bandwidth_sun": {}, "bandwidth_usd": {}, "bandwidth_volume": 123, "trx_usd_rate": "<string>", "burn_cost_trx": "<string>", "burn_cost_usd": "<string>", "savings_percent": "<string>" }
1h
curl https://api.tronrental.com/v1/prices
import requests resp = requests.get("https://api.tronrental.com/v1/prices") print(resp.json())
const resp = await fetch("https://api.tronrental.com/v1/prices"); const data = await resp.json(); console.log(data);
{ "energy_trx": {"1h": "2.32"}, "energy_sun": {"1h": "35.68"}, "energy_usd": {"1h": "0.69"}, "energy_volume": 65000, "bandwidth_trx": {"1h": "0.14"}, "bandwidth_sun": {"1h": "400.00"}, "bandwidth_usd": {"1h": "0.04"}, "bandwidth_volume": 350, "trx_usd_rate": "0.297", "burn_cost_trx": "6.5", "burn_cost_usd": "1.93", "savings_percent": "64.3", "note": "Energy price is for 65,000 units in TRX" }