ट्रांसफर पैकेज
पैकेज खरीदें
अकाउंट बैलेंस से ट्रांसफर पैकेज खरीदें
POST
/
api
/
v1
/
transfer-packages
/
buy
पैकेज खरीदें
curl --request POST \
--url https://api.example.com/api/v1/transfer-packages/buy \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"package_size": 123,
"single_transfer": true,
"bw_guarantee": true
}
'import requests
url = "https://api.example.com/api/v1/transfer-packages/buy"
payload = {
"address": "<string>",
"package_size": 123,
"single_transfer": True,
"bw_guarantee": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
package_size: 123,
single_transfer: true,
bw_guarantee: true
})
};
fetch('https://api.example.com/api/v1/transfer-packages/buy', 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/transfer-packages/buy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '<string>',
'package_size' => 123,
'single_transfer' => true,
'bw_guarantee' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/transfer-packages/buy"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"package_size\": 123,\n \"single_transfer\": true,\n \"bw_guarantee\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/transfer-packages/buy")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"package_size\": 123,\n \"single_transfer\": true,\n \"bw_guarantee\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/transfer-packages/buy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"package_size\": 123,\n \"single_transfer\": true,\n \"bw_guarantee\": true\n}"
response = http.request(request)
puts response.read_bodyTransfer Package खरीदें
आपके अकाउंट बैलेंस का उपयोग करके ट्रांसफर पैकेज खरीदता है।अनुरोध बॉडी
string
आवश्यक
मॉनिटर करने के लिए TRON एड्रेस
number
पैकेज में ट्रांसफर की संख्या (2 – 10,000)।
single_transfer true न हो तो अनिवार्य। package_size: 1 को 422 के साथ अस्वीकार किया जाता है — एक ट्रांसफर खरीदने के लिए single_transfer: true भेजें।boolean
डिफ़ॉल्ट:"false"
पैकेज के बजाय एक ट्रांसफर खरीदें; तब
package_size को अनदेखा किया जाता है। मूल्य — टियर प्राप्त करें से single_transfer_price (BW Guarantee के साथ bw_fee_per_transfer जुड़ता है)।boolean
डिफ़ॉल्ट:"true"
BW Guarantee सक्षम करें
रिस्पॉन्स
package_id, status, total_price_trx, activation_cost_trx (यदि एड्रेस सक्रिय नहीं था तो उसे सक्रिय करने पर खर्च TRX, अन्यथा 0) और total_charged_trx लौटाता है।
उदाहरण
curl -X POST https://api.tronrental.com/v1/transfer-packages/buy \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"address": "TYourAddress...",
"package_size": 500,
"bw_guarantee": true
}'
Response
{
"package_id": 101,
"status": "active",
"total_price_trx": "1500.0",
"activation_cost_trx": "0",
"total_charged_trx": "1500.0"
}
आप
POST /api/v1/transfer-packages/buy-invoice के माध्यम से इनवॉइस द्वारा भी भुगतान कर सकते हैं —
यह TRX/USDT के लिए एक पेमेंट एड्रेस जनरेट करता है।⌘I
पैकेज खरीदें
curl --request POST \
--url https://api.example.com/api/v1/transfer-packages/buy \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"package_size": 123,
"single_transfer": true,
"bw_guarantee": true
}
'import requests
url = "https://api.example.com/api/v1/transfer-packages/buy"
payload = {
"address": "<string>",
"package_size": 123,
"single_transfer": True,
"bw_guarantee": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
package_size: 123,
single_transfer: true,
bw_guarantee: true
})
};
fetch('https://api.example.com/api/v1/transfer-packages/buy', 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/transfer-packages/buy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '<string>',
'package_size' => 123,
'single_transfer' => true,
'bw_guarantee' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/transfer-packages/buy"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"package_size\": 123,\n \"single_transfer\": true,\n \"bw_guarantee\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/transfer-packages/buy")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"package_size\": 123,\n \"single_transfer\": true,\n \"bw_guarantee\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/transfer-packages/buy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"package_size\": 123,\n \"single_transfer\": true,\n \"bw_guarantee\": true\n}"
response = http.request(request)
puts response.read_body