Calculate payout breakdown (1.4.0, без создания)
curl --request POST \
--url https://api.example.com/v1/public/payouts/calculate \
--header 'Content-Type: application/json' \
--header 'X-Signature: <api-key>' \
--data '
{
"assetCode": "USDT_TRC20",
"amount": "50.00",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"priority": "recommended",
"isSubtract": false
}
'import requests
url = "https://api.example.com/v1/public/payouts/calculate"
payload = {
"assetCode": "USDT_TRC20",
"amount": "50.00",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"priority": "recommended",
"isSubtract": False
}
headers = {
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Signature': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetCode: 'USDT_TRC20',
amount: '50.00',
destinationAddress: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
priority: 'recommended',
isSubtract: false
})
};
fetch('https://api.example.com/v1/public/payouts/calculate', 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/v1/public/payouts/calculate",
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([
'assetCode' => 'USDT_TRC20',
'amount' => '50.00',
'destinationAddress' => 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
'priority' => 'recommended',
'isSubtract' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Signature: <api-key>"
],
]);
$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/v1/public/payouts/calculate"
payload := strings.NewReader("{\n \"assetCode\": \"USDT_TRC20\",\n \"amount\": \"50.00\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"priority\": \"recommended\",\n \"isSubtract\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<api-key>")
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/v1/public/payouts/calculate")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assetCode\": \"USDT_TRC20\",\n \"amount\": \"50.00\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"priority\": \"recommended\",\n \"isSubtract\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/payouts/calculate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetCode\": \"USDT_TRC20\",\n \"amount\": \"50.00\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"priority\": \"recommended\",\n \"isSubtract\": false\n}"
response = http.request(request)
puts response.read_body{
"assetCode": "USDT_TRC20",
"network": "TRON",
"priority": "economy",
"isSubtract": true,
"amount": "100.000000",
"serviceFee": {
"percent": "0.5",
"amount": "0.500000",
"amountUsd": "0.50"
},
"networkFee": {
"amount": "13.5",
"assetCode": "TRX",
"amountUsd": "1.62",
"estimatedConfirmationSeconds": 60,
"error": null
},
"recipientReceives": "100.000000",
"totalDebit": "100.500000",
"amountUsd": "<string>",
"rateUsd": "<string>",
"minPayout": "1.000000",
"checks": {
"payoutEnabled": true,
"aboveMinimum": true,
"withinLimits": {
"ok": true,
"code": null,
"message": null
},
"sufficientBalance": true,
"availableBalance": "1530.500000"
}
}public · payouts
Calculate payout breakdown (1.4.0, без создания)
Раскладка выплаты ДО создания: комиссия обменника, сетевая комиссия по приоритету, сколько получит адресат, сколько спишется, USD-оценки, проверки (минимум, лимиты сайта, достаточность hot-баланса). Ничего не создаёт и не резервирует.
POST
/
v1
/
public
/
payouts
/
calculate
Calculate payout breakdown (1.4.0, без создания)
curl --request POST \
--url https://api.example.com/v1/public/payouts/calculate \
--header 'Content-Type: application/json' \
--header 'X-Signature: <api-key>' \
--data '
{
"assetCode": "USDT_TRC20",
"amount": "50.00",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"priority": "recommended",
"isSubtract": false
}
'import requests
url = "https://api.example.com/v1/public/payouts/calculate"
payload = {
"assetCode": "USDT_TRC20",
"amount": "50.00",
"destinationAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"priority": "recommended",
"isSubtract": False
}
headers = {
"X-Signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Signature': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetCode: 'USDT_TRC20',
amount: '50.00',
destinationAddress: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
priority: 'recommended',
isSubtract: false
})
};
fetch('https://api.example.com/v1/public/payouts/calculate', 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/v1/public/payouts/calculate",
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([
'assetCode' => 'USDT_TRC20',
'amount' => '50.00',
'destinationAddress' => 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
'priority' => 'recommended',
'isSubtract' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Signature: <api-key>"
],
]);
$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/v1/public/payouts/calculate"
payload := strings.NewReader("{\n \"assetCode\": \"USDT_TRC20\",\n \"amount\": \"50.00\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"priority\": \"recommended\",\n \"isSubtract\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Signature", "<api-key>")
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/v1/public/payouts/calculate")
.header("X-Signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assetCode\": \"USDT_TRC20\",\n \"amount\": \"50.00\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"priority\": \"recommended\",\n \"isSubtract\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/payouts/calculate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetCode\": \"USDT_TRC20\",\n \"amount\": \"50.00\",\n \"destinationAddress\": \"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t\",\n \"priority\": \"recommended\",\n \"isSubtract\": false\n}"
response = http.request(request)
puts response.read_body{
"assetCode": "USDT_TRC20",
"network": "TRON",
"priority": "economy",
"isSubtract": true,
"amount": "100.000000",
"serviceFee": {
"percent": "0.5",
"amount": "0.500000",
"amountUsd": "0.50"
},
"networkFee": {
"amount": "13.5",
"assetCode": "TRX",
"amountUsd": "1.62",
"estimatedConfirmationSeconds": 60,
"error": null
},
"recipientReceives": "100.000000",
"totalDebit": "100.500000",
"amountUsd": "<string>",
"rateUsd": "<string>",
"minPayout": "1.000000",
"checks": {
"payoutEnabled": true,
"aboveMinimum": true,
"withinLimits": {
"ok": true,
"code": null,
"message": null
},
"sufficientBalance": true,
"availableBalance": "1530.500000"
}
}Authorizations
HMAC-SHA256-Hex(timestamp + "." + raw_body, api_secret)
Body
application/json
Example:
"USDT_TRC20"
Example:
"50.00"
Адрес получателя (уточняет оценку сетевой комиссии).
Example:
"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
Available options:
economy, recommended, high true — комиссии вычитаются из amount (получатель получает меньше, списывается ровно amount); false — получатель получает ровно amount, комиссии сверху.
Response
200 - application/json
Example:
"USDT_TRC20"
Example:
"TRON"
Available options:
economy, recommended, high Example:
"100.000000"
Example:
{
"percent": "0.5",
"amount": "0.500000",
"amountUsd": "0.50"
}
Example:
{
"amount": "13.5",
"assetCode": "TRX",
"amountUsd": "1.62",
"estimatedConfirmationSeconds": 60,
"error": null
}
Example:
"100.000000"
Example:
"100.500000"
Example:
"1.000000"
Example:
{
"payoutEnabled": true,
"aboveMinimum": true,
"withinLimits": { "ok": true, "code": null, "message": null },
"sufficientBalance": true,
"availableBalance": "1530.500000"
}