Балансы по активам: total / reserved / available / pending + USD
curl --request GET \
--url https://api.example.com/v1/public/balances \
--header 'X-Signature: <api-key>'import requests
url = "https://api.example.com/v1/public/balances"
headers = {"X-Signature": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Signature': '<api-key>'}};
fetch('https://api.example.com/v1/public/balances', 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/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/public/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Signature", "<api-key>")
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/v1/public/balances")
.header("X-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"assetCode": "USDT_TRC20",
"symbol": "USDT",
"network": "TRON",
"decimals": 6,
"total": "1530.500000",
"reserved": "30.000000",
"available": "1500.500000",
"pendingOutgoing": "0.000000",
"pendingIncoming": "250.000000",
"availableUsd": "1500.50",
"rateUsd": "1.00",
"updatedAt": "2023-11-07T05:31:56Z"
}
]public · balances
Балансы по активам: total / reserved / available / pending + USD
Агрегированные средства hot-кошельков по каждому активу. available = on-chain баланс минус выплаты, принятые, но ещё не отправленные (reserved) — то, чем можно оплатить новую выплату. pendingOutgoing — отправлено и ждёт подтверждений; pendingIncoming — депозиты с замеченной tx до финализации. USD — по курсу на момент ответа. Поля available/updatedAt совместимы с 1.3.x.
GET
/
v1
/
public
/
balances
Балансы по активам: total / reserved / available / pending + USD
curl --request GET \
--url https://api.example.com/v1/public/balances \
--header 'X-Signature: <api-key>'import requests
url = "https://api.example.com/v1/public/balances"
headers = {"X-Signature": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Signature': '<api-key>'}};
fetch('https://api.example.com/v1/public/balances', 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/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/public/balances"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Signature", "<api-key>")
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/v1/public/balances")
.header("X-Signature", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/public/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Signature"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"assetCode": "USDT_TRC20",
"symbol": "USDT",
"network": "TRON",
"decimals": 6,
"total": "1530.500000",
"reserved": "30.000000",
"available": "1500.500000",
"pendingOutgoing": "0.000000",
"pendingIncoming": "250.000000",
"availableUsd": "1500.50",
"rateUsd": "1.00",
"updatedAt": "2023-11-07T05:31:56Z"
}
]Authorizations
HMAC-SHA256-Hex(timestamp + "." + raw_body, api_secret)
Response
200 - application/json
Example:
"USDT_TRC20"
Example:
"USDT"
Example:
"TRON"
Example:
6
On-chain баланс hot-кошельков.
Example:
"1530.500000"
Принятые, ещё не отправленные выплаты.
Example:
"30.000000"
total − reserved: чем можно оплатить новую выплату.
Example:
"1500.500000"
Отправлено в сеть, ждёт подтверждений.
Example:
"0.000000"
Депозиты с замеченной tx, ждут подтверждений.
Example:
"250.000000"
Example:
"1500.50"
Example:
"1.00"