ऑर्डर
ऑर्डर सूची
पेजिनेशन और फ़िल्टर के साथ अपने ऑर्डर सूचीबद्ध करें
GET
/
api
/
v1
/
orders
ऑर्डर सूची
curl --request GET \
--url https://api.example.com/api/v1/ordersimport requests
url = "https://api.example.com/api/v1/orders"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/orders', 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.example.com/api/v1/orders",
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.example.com/api/v1/orders"
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.example.com/api/v1/orders")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/orders")
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ऑर्डर सूची
आपके ऑर्डर की पेजिनेटेड सूची लौटाता है, नवीनतम पहले।क्वेरी पैरामीटर
number
पेज संख्या (डिफ़ॉल्ट 1)
number
प्रति पेज परिणाम (डिफ़ॉल्ट 50, अधिकतम 100)
string
स्थिति के अनुसार फ़िल्टर करें (जैसे
filled, pending, failed)string
ऑर्डर प्रकार के अनुसार फ़िल्टर करें —
energy या bandwidthरिस्पॉन्स
orders (ऑर्डर ऑब्जेक्ट की सरणी), total, page और page_size लौटाता है।
उदाहरण
curl "https://api.tronrental.com/v1/orders?type=energy&status=filled&page=1" \
-H "X-API-Key: your_api_key"
Response
{
"orders": [
{
"id": 12345,
"type": "energy",
"target_address": "TRecipientAddress...",
"volume": 65000,
"duration": "1h",
"price_trx": "1.79",
"status": "filled",
"delegate_txid": "a1b2c3d4e5f6...",
"undelegate_txid": null,
"reclaim_at": null,
"source": "api",
"created_at": "2026-06-10T04:30:00Z"
}
],
"total": 42,
"page": 1,
"page_size": 50
}
⌘I
ऑर्डर सूची
curl --request GET \
--url https://api.example.com/api/v1/ordersimport requests
url = "https://api.example.com/api/v1/orders"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/orders', 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.example.com/api/v1/orders",
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.example.com/api/v1/orders"
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.example.com/api/v1/orders")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/orders")
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