Getting rental prices

API method
HTTP
GET https://api.tronmart.net/v1/RentPrice/Get

Response parameters
FieldTypeDescription
codestringThe return code of the request call, the list of error codes is here
msgstringDetailed information about a possible error
errorsarrayDetailed information on errors
request_idstringAn internal request identifier that is used to identify the request in case of problems
datajson
   {
      rent_pricesarrayRent prices
         {
            resource_typeintegerResource type (0 ... Bandwidth, 1 = Energy)
            rent_durationintegerDuration of resource rental in TRON units (20 tron time units equals 1 minute)
            resource_value_minintegerMinimum quantity of ordered resources
            resource_value_maxintegerMaximum quantity of ordered resources
            resource_splitintegerSplitting the order
            sunintegerPrice for rent in sun
            taxnumberFixed rental tax
         }
   }

Example of response parameters
JSON
{
    "code": "Success",
    "msg": null,
    "errors": [],
    "request_id": "b7859619-87e6-4ddc-9034-7b50568d9ad5",
    "data": {
        "rent_prices": [
            {
                "resource_type": 1,
                "rent_duration": 1200,
                "resource_value_min": 32000,
                "resource_value_max": 64000,
                "resource_split": 1000000,
                "sun": 95,
                "tax": 0.560000
            },
            {
                "resource_type": 1,
                "rent_duration": 1200,
                "resource_value_min": 64001,
                "resource_value_max": 50000000,
                "resource_split": 1000000,
                "sun": 95,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 2400,
                "resource_value_min": 32000,
                "resource_value_max": 64000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.560000
            },
            {
                "resource_type": 1,
                "rent_duration": 86400,
                "resource_value_min": 32000,
                "resource_value_max": 64000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.560000
            },
            {
                "resource_type": 1,
                "rent_duration": 57600,
                "resource_value_min": 32000,
                "resource_value_max": 64000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.560000
            },
            {
                "resource_type": 1,
                "rent_duration": 57600,
                "resource_value_min": 64001,
                "resource_value_max": 20000000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 86400,
                "resource_value_min": 64001,
                "resource_value_max": 20000000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 201600,
                "resource_value_min": 500000,
                "resource_value_max": 10000000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 403200,
                "resource_value_min": 500000,
                "resource_value_max": 10000000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 864000,
                "resource_value_min": 500000,
                "resource_value_max": 10000000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 2400,
                "resource_value_min": 64001,
                "resource_value_max": 50000000,
                "resource_split": 1000000,
                "sun": 100,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 3600,
                "resource_value_min": 32000,
                "resource_value_max": 64000,
                "resource_split": 1000000,
                "sun": 105,
                "tax": 0.560000
            },
            {
                "resource_type": 1,
                "rent_duration": 3600,
                "resource_value_min": 64001,
                "resource_value_max": 50000000,
                "resource_split": 1000000,
                "sun": 105,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 7200,
                "resource_value_min": 32000,
                "resource_value_max": 64000,
                "resource_split": 1000000,
                "sun": 110,
                "tax": 0.560000
            },
            {
                "resource_type": 1,
                "rent_duration": 7200,
                "resource_value_min": 64001,
                "resource_value_max": 50000000,
                "resource_split": 1000000,
                "sun": 110,
                "tax": 0.000000
            },
            {
                "resource_type": 1,
                "rent_duration": 28800,
                "resource_value_min": 32000,
                "resource_value_max": 64000,
                "resource_split": 1000000,
                "sun": 130,
                "tax": 0.560000
            },
            {
                "resource_type": 1,
                "rent_duration": 28800,
                "resource_value_min": 64001,
                "resource_value_max": 30000000,
                "resource_split": 1000000,
                "sun": 130,
                "tax": 0.000000
            }
        ]
    }
}

Example of a call
HTTP
GET /v1/RentPrice/Get HTTP/1.1
Host: api.tronmart.net
key: C2CC6C80-B86A-4E08-AE69-E28DA009A50F
cURL
curl -X GET 'https://api.tronmart.net/v1/RentPrice/Get'
     -H 'key: C2CC6C80-B86A-4E08-AE69-E28DA009A50F'
C# (HttpClient)
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.tronmart.net/v1/RentPrice/Get");
request.Headers.Add("key", "C2CC6C80-B86A-4E08-AE69-E28DA009A50F");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Java (OkHttp)
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://api.tronmart.net/v1/RentPrice/Get")
  .method("GET", body)
  .addHeader("key", "C2CC6C80-B86A-4E08-AE69-E28DA009A50F")
  .build();
Response response = client.newCall(request).execute();
Go (native)
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.tronmart.net/v1/RentPrice/Get"
  method := "GET"

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, nil)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("key", "C2CC6C80-B86A-4E08-AE69-E28DA009A50F")

  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))
}