tronget API
Аренда энергии и bandwidth в сети TRON и активация адресов из вашего кода. Заказы оплачиваются с баланса аккаунта, результат приходит за секунды — в ответе на запрос статуса или callback-ом.Rent TRON energy and bandwidth and activate addresses from your code. Orders are paid from your account balance and complete in seconds — check the status or receive a callback.
Быстрый стартQuick start
- Получите ключ. Зарегистрируйтесь и в личном кабинете → API нажмите «Создать ключ» — получите
API_IDиAPI_KEY.Get a key. Sign up and in Dashboard → API click “Create key” to get yourAPI_IDandAPI_KEY. - Пополните баланс в TRX или USDT (TRC-20) — в кабинете или в боте @trongetbot.Top up your balance with TRX or USDT (TRC-20) — in the dashboard or the bot @trongetbot.
- Проверьте доступ —
/api/accountвернёт баланс.Check access —/api/accountreturns your balance. - Сделайте заказ —
/api/energy/order, затем отслеживайте статус через/api/orderили callback.Place an order —/api/energy/order, then track it with/api/orderor a callback.
call() с подписью. Примеры ниже используют её.A ready-made client — the signed call() function. The examples below use it.
API_ID=YOUR_API_ID
API_KEY=YOUR_API_KEY
# SIGNATURE = hex(HMAC-SHA256(API_KEY, "POST\n" + path + "\n" + body))
call() { # call /api/method '{"json":"body"}'
SIG=$(printf 'POST\n%s\n%s' "$1" "$2" | openssl dgst -sha256 -hmac "$API_KEY" | sed 's/^.* //')
curl -s -X POST "https://tronget.com$1" \
-H "Content-Type: application/json" -H "X-API-ID: $API_ID" -H "SIGNATURE: $SIG" -d "$2"
}
call /api/account '{}'
call /api/energy/order '{"quantity":65000,"receiver":"TXYZ...","outter_id":"inv-1001"}'
import hmac, hashlib, json, requests
API_ID = "YOUR_API_ID"
API_KEY = "YOUR_API_KEY"
BASE = "https://tronget.com"
def call(path, params=None):
body = json.dumps(params or {}, separators=(",", ":"))
msg = "POST\n" + path + "\n" + body
sig = hmac.new(API_KEY.encode(), msg.encode(), hashlib.sha256).hexdigest()
r = requests.post(BASE + path, data=body, headers={
"Content-Type": "application/json", "X-API-ID": API_ID, "SIGNATURE": sig})
return r.json()
print(call("/api/account"))
order = call("/api/energy/order", {"quantity": 65000, "receiver": "TXYZ...", "outter_id": "inv-1001"})
print(order["order"]["id"], order["order"]["status"])
<?php
$apiId = 'YOUR_API_ID';
$apiKey = 'YOUR_API_KEY';
$base = 'https://tronget.com';
function call(string $path, array $params = []): array {
global $apiId, $apiKey, $base;
$body = json_encode($params ?: new stdClass(), JSON_UNESCAPED_SLASHES);
$sig = hash_hmac('sha256', "POST\n" . $path . "\n" . $body, $apiKey);
$ch = curl_init($base . $path);
curl_setopt_array($ch, [
CURLOPT_POST => true, CURLOPT_POSTFIELDS => $body, CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json', "X-API-ID: $apiId", "SIGNATURE: $sig"],
]);
return json_decode(curl_exec($ch), true);
}
print_r(call('/api/account'));
$order = call('/api/energy/order', ['quantity' => 65000, 'receiver' => 'TXYZ...', 'outter_id' => 'inv-1001']);
echo $order['order']['id'], ' ', $order['order']['status'];
const crypto = require('crypto');
const API_ID = 'YOUR_API_ID', API_KEY = 'YOUR_API_KEY', BASE = 'https://tronget.com';
async function call(path, params = {}) {
const body = JSON.stringify(params);
const sig = crypto.createHmac('sha256', API_KEY).update('POST\n' + path + '\n' + body).digest('hex');
const r = await fetch(BASE + path, { method: 'POST', body,
headers: { 'Content-Type': 'application/json', 'X-API-ID': API_ID, 'SIGNATURE': sig } });
return r.json();
}
console.log(await call('/api/account'));
const { order } = await call('/api/energy/order', { quantity: 65000, receiver: 'TXYZ...', outter_id: 'inv-1001' });
console.log(order.id, order.status);
АутентификацияAuthentication
Все методы — POST с JSON-телом на https://tronget.com/api/…. В каждом запросе два заголовка:All methods are POST with a JSON body to https://tronget.com/api/…. Every request carries two headers:
| ЗаголовокHeader | ОписаниеDescription |
|---|---|
X-API-ID | Ваш API_IDYour API_ID |
SIGNATURE | HMAC-SHA256 на ключе API_KEY в hex (строчными) от строки "POST\n" + path + "\n" + body. path — путь метода, например /api/energy/order; body — ровно те байты, что вы отправляете (для методов без параметров — {}).Lowercase hex HMAC-SHA256 keyed with API_KEY over "POST\n" + path + "\n" + body. path is the method path, e.g. /api/energy/order; body is exactly the bytes you send ({} for methods without parameters). |
{ "status": "success", "…": "…" }{ "status": "error", "code": "auth_failed",
"message": "Invalid API_ID or SIGNATURE" }Лимит — 300 запросов в минуту на API_ID (429 rate_limited). Тело может быть и в формате application/x-www-form-urlencoded — подписывается так же.Rate limit: 300 requests per minute per API_ID (429 rate_limited). application/x-www-form-urlencoded bodies are also accepted and signed the same way.
МетодыMethods
POST/api/account
Проверка ключа и баланс аккаунта. Без параметров — тело {}.Checks the key and returns the account balance. No parameters — body {}.
call("/api/account"){
"status": "success",
"account": { "api_id": "123", "balance": 1500.75, "currency": "TRX" }
}POST/api/prices
Актуальные тарифы вашего аккаунта. Цена энергии: floor(quantity / 131000) · price_131000 + (остаток ? price_65000 : 0); точные значения для стандартных объёмов — в table.Current prices for your account. Energy price: floor(quantity / 131000) · price_131000 + (remainder ? price_65000 : 0); exact values for standard volumes are in table.
call("/api/prices"){
"status": "success",
"prices": {
"currency": "TRX", "period": "1h",
"energy": { "min": 65000, "max": 2000000, "step": 1000,
"price_65000": 3, "price_131000": 6,
"table": { "65000": 3, "131000": 6, "262000": 12, "…": "…" } },
"bandwidth": { "min": 1000, "max": 100000, "step": 100, "price_per_1000": 1 },
"activation": { "price": 1.5 }
}
}POST/api/address
Активирован ли адрес в сети TRON. На неактивированный адрес нельзя делегировать ресурсы — сначала активация.Whether an address is activated on TRON. Resources can't be delegated to an inactive address — activate it first.
| ПараметрParameter | Обяз.Req. | ОписаниеDescription |
|---|---|---|
address | даyes | TRON-адрес (T…)TRON address (T…) |
{ "address": "TXYZ..." }{ "status": "success", "address": "TXYZ...", "activated": true }POST/api/energy/order
Аренда энергии на 1 час. Стоимость списывается с баланса при создании заказа; если доставить не удалось — сумма автоматически возвращается на баланс, заказ получает статус failed.Rents energy for 1 hour. The price is charged when the order is created; if delivery fails the amount is automatically returned to your balance and the order becomes failed.
| ПараметрParameter | Обяз.Req. | ОписаниеDescription |
|---|---|---|
quantity | даyes | Энергия: 65 000 – 2 000 000, кратно 1 000Energy: 65,000 – 2,000,000, multiple of 1,000 |
receiver | даyes | Адрес получателя (должен быть активирован)Recipient address (must be activated) |
callback_url | нетno | http(s)-URL для уведомления о результатеhttp(s) URL to notify about the result |
outter_id | нетno | Ваш идентификатор, до 64 символов. Возвращается в ответе и callback. Повторный запрос с тем же outter_id вернёт уже созданный заказ с "duplicate": true — ретраи безопасны.Your own ID, up to 64 characters. Echoed in responses and callbacks. A repeated request with the same outter_id returns the existing order with "duplicate": true — retries are safe. |
{
"quantity": 131000,
"receiver": "TXYZ...",
"callback_url": "https://example.com/hook",
"outter_id": "inv-1001"
}{
"status": "success",
"order": {
"id": "a60efbea-1161-46d5-bcd1-c54fc80908f3",
"service": "energy", "receiver": "TXYZ...", "quantity": 131000,
"price": 6, "currency": "TRX", "status": "pending",
"tx_hash": "", "outter_id": "inv-1001",
"created_at": "2026-10-20T12:00:00Z", "done_at": null, "expires_at": null
}
}POST/api/bandwidth/order
Аренда bandwidth на 1 час. Параметры как у энергии.Rents bandwidth for 1 hour. Same parameters as energy.
| ПараметрParameter | Обяз.Req. | ОписаниеDescription |
|---|---|---|
quantity | даyes | Bandwidth: 1 000 – 100 000, кратно 100Bandwidth: 1,000 – 100,000, multiple of 100 |
receiver | даyes | Адрес получателя (должен быть активирован)Recipient address (must be activated) |
callback_url | нетno | URL для уведомленияNotification URL |
outter_id | нетno | Ваш идентификатор (идемпотентность)Your ID (idempotency) |
{ "quantity": 1000, "receiver": "TXYZ...", "outter_id": "bw-42" }{ "status": "success",
"order": { "id": "…", "service": "bandwidth", "quantity": 1000,
"price": 1, "status": "pending", "…": "…" } }POST/api/activation/order
Активация нового адреса: на него отправляется небольшая сумма TRX. Разовая операция.Activates a new address by sending it a small amount of TRX. One-time operation.
| ПараметрParameter | Обяз.Req. | ОписаниеDescription |
|---|---|---|
receiver | даyes | Адрес для активации (ещё не активирован)Address to activate (not yet activated) |
callback_url | нетno | URL для уведомленияNotification URL |
outter_id | нетno | Ваш идентификатор (идемпотентность)Your ID (idempotency) |
{ "receiver": "TXYZ...", "callback_url": "https://example.com/hook" }{ "status": "success",
"order": { "id": "…", "service": "activation", "price": 1.5,
"status": "pending", "…": "…" } }POST/api/order
Статус заказа любой услуги по его UUID (тип — в поле service).Order status for any service by UUID (type is in the service field).
| ПараметрParameter | Обяз.Req. | ОписаниеDescription |
|---|---|---|
id | даyes | UUID заказаOrder UUID |
{ "id": "a60efbea-1161-46d5-bcd1-c54fc80908f3" }{
"status": "success",
"order": {
"id": "a60efbea-…", "service": "energy", "status": "success",
"tx_hash": "50c96029…", "price": 6,
"done_at": "2026-10-20T12:00:05Z",
"expires_at": "2026-10-20T13:00:05Z", "…": "…"
}
}POST/api/order/list
История заказов, новые первыми.Order history, newest first.
| ПараметрParameter | Обяз.Req. | ОписаниеDescription |
|---|---|---|
limit | нетno | 1–200, по умолчанию 501–200, default 50 |
offset | нетno | Смещение для пагинацииPagination offset |
service | нетno | energy | bandwidth | activation |
{ "limit": 20, "offset": 0, "service": "energy" }{ "status": "success", "orders": [ { "…": "…" } ],
"limit": 20, "offset": 0 }POST/api/aml/networks
Сети и активы, доступные для AML-проверки, и цена одной проверки в TRX. Тело — пустой JSON {}.Networks and assets available for AML checks and the price of one check in TRX. Body — empty JSON {}.
{}{ "status": "success", "available": true,
"price": 2.5, "currency": "TRX",
"networks": [
{ "network": "TRON", "network_name": "TRON", "asset": "USDT",
"label": "USDT TRC-20", "name": "Tether USD" },
{ "network": "ETH", "network_name": "Ethereum", "asset": "ETH", "…": "…" }
] }POST/api/aml/detect
Какие сети подходят адресу и какие активы в них можно проверить. Бесплатно. network — сеть, которая будет выбрана, если не указать её в /api/aml/check; null и ambiguous: true — адрес подходит нескольким сетям, нужно выбрать.Which networks match the address and which assets can be checked there. Free. network is what /api/aml/check will use if you omit it; null with ambiguous: true means several networks match and you must choose.
{ "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }{ "status": "success", "address": "0x742d…f44e",
"network": null, "ambiguous": true,
"networks": [
{ "network": "ETH", "network_name": "Ethereum", "default_asset": "ETH",
"assets": [ { "asset": "ETH", "label": "ETH" },
{ "asset": "USDT", "label": "USDT ERC-20" } ] },
{ "network": "BSC", "network_name": "BNB Chain", "…": "…" }
] }POST/api/aml/check
AML-проверка адреса или транзакции. Стоимость списывается с баланса сразу; если проверку выполнить не удалось — деньги возвращаются. Проверка занимает от нескольких секунд до пары минут: результат придёт на callback_url или его можно запросить через /api/aml/result.AML check of an address or a transaction. The price is charged from the balance immediately; if the check can't be completed, funds are returned. A check takes from a few seconds to a couple of minutes: the result is sent to callback_url or can be fetched via /api/aml/result.
| ПараметрParameter | Обяз.Req. | ОписаниеDescription |
|---|---|---|
network | нет*no* | Сеть: TRON, ETH, BSC, BTC… Можно не указывать — определится по адресу. Обязательна для адресов 0x…: такой адрес есть во всех EVM-сетях (ETH, BSC, Polygon, ETC). Адреса 1…/3… без network считаются Bitcoin — для BCH/BSV/LTC укажите сеть явно.Network: TRON, ETH, BSC, BTC… Optional — detected from the address. Required for 0x… addresses: such an address exists in every EVM network (ETH, BSC, Polygon, ETC). 1…/3… addresses without network are treated as Bitcoin — for BCH/BSV/LTC set the network explicitly. |
asset | нетno | Актив сети, например USDT. По умолчанию: в TRON — USDT, в остальных сетях — основная монетаNetwork asset, e.g. USDT. Default: USDT in TRON, the main coin in other networks |
address | даyes | Проверяемый адресAddress to check |
tx_hash | нетno | Хеш транзакции — проверить конкретный перевод, а не весь адресTransaction hash — check a specific transfer instead of the whole address |
callback_url | нетno | https-URL: по готовности придёт отчёт (POST JSON, подпись SIGNATURE)https URL: the report is POSTed when ready (JSON, SIGNATURE header) |
outter_id | нетno | Ваш идентификатор: повторный запрос с тем же outter_id вернёт ту же проверку без повторного списанияYour ID: a repeated request with the same outter_id returns the same check without charging again |
lang | нетno | ru или en (по умолчанию) — язык подписей в отчётеru or en (default) — language of labels in the report |
{ "address": "TXYZ...",
"callback_url": "https://example.com/aml-hook",
"outter_id": "check-1001", "lang": "en" }{ "status": "success",
"check": { "id": "3f2c9a4e-…", "status": "pending",
"network": "TRON", "asset": "USDT",
"address": "TXYZ...", "price": 2.5,
"currency": "TRX", "result": null, "…": "…" } }POST/api/aml/result
Статус и отчёт проверки. Пока status = pending, поле result пустое. Тот же объект check приходит в callback.Check status and report. While status is pending, result is null. The same check object is sent to the callback.
| ПараметрParameter | Обяз.Req. | ОписаниеDescription |
|---|---|---|
id | даyes | UUID проверки из /api/aml/checkCheck UUID from /api/aml/check |
lang | нетno | ru или en; по умолчанию — язык, указанный при созданииru or en; defaults to the language set at creation |
{ "id": "3f2c9a4e-8d1b-4c6f-9e2a-7b5d1c0e4f88" }{
"status": "success",
"check": {
"id": "3f2c9a4e-…", "status": "success",
"network": "TRON", "network_name": "TRON", "asset": "USDT",
"address": "TXYZ...", "tx_hash": null,
"price": 2.5, "currency": "TRX", "outter_id": "check-1001",
"created_at": "2026-11-18T10:00:00Z",
"done_at": "2026-11-18T10:00:21Z",
"result": {
"risk_score": 12.4, "risk_level": "low", "risk_label": "Low risk",
"owner": { "name": "Binance", "type": "exchange_licensed",
"type_label": "licensed exchange" },
"volume": 15230.5, "risky_volume": 120.2,
"volume_fiat": 15230.5, "risky_volume_fiat": 120.2,
"fiat_currency": "USD",
"signals": [
{ "key": "exchange", "label": "Exchange",
"share": 72.3, "risk": "trusted" },
{ "key": "gambling", "label": "Gambling",
"share": 0.8, "risk": "suspicious" }
]
},
"error": null
}
}risk_score — 0–100; risk_level: low (до 30), medium (30–70), high (от 70). signals — откуда пришли средства, доля в процентах; risk: trusted, suspicious, dangerous. owner — известный владелец адреса или null. Если проверка не удалась: status = failed, price = 0 (деньги возвращены), текст в error.risk_score — 0–100; risk_level: low (up to 30), medium (30–70), high (70+). signals — where the funds came from, share in percent; risk: trusted, suspicious, dangerous. owner — known owner of the address or null. If the check failed: status is failed, price is 0 (funds returned), text in error.
Callback: { "event": "aml.success" | "aml.failed", "status": …, "check": { …как выше… }, "outter_id": …, "timestamp": … } — подпись SIGNATURE и до 20 повторов, как у заказов (раздел «Статусы и callback»).Callback: { "event": "aml.success" | "aml.failed", "status": …, "check": { …as above… }, "outter_id": …, "timestamp": … } — SIGNATURE header and up to 20 retries, as for orders (see “Statuses & callbacks”).
Статусы и callbackStatuses & callbacks
| СтатусStatus | ЗначениеMeaning |
|---|---|
pending | В обработке, обычно до 10 секундProcessing, usually under 10 seconds |
success | Выполнен: транзакция в tx_hash; для аренды expires_at = done_at + 1 часDone: transaction in tx_hash; for rentals expires_at = done_at + 1 hour |
failed | Не выполнен: сумма возвращена на баланс, price = 0Not fulfilled: amount returned to balance, price = 0 |
Если в заказе указан callback_url, при переходе в success или failed мы отправим на него POST с JSON. Заголовок SIGNATURE — HMAC-SHA256 тела на вашем API_KEY (hex): проверяйте его, прежде чем доверять данным. Ответьте HTTP 200 — иначе повторим до 20 раз с интервалом 5 секунд. Обработчик должен быть идемпотентным: одно событие может прийти повторно.If the order has a callback_url, we POST JSON to it when the order becomes success or failed. The SIGNATURE header is the hex HMAC-SHA256 of the body keyed with your API_KEY — verify it before trusting the data. Reply with HTTP 200, otherwise we retry up to 20 times every 5 seconds. Make your handler idempotent: the same event may arrive more than once.
{
"event": "order.success",
"status": "success",
"order": {
"id": "a60efbea-…", "service": "energy", "receiver": "TXYZ...",
"quantity": 131000, "price": 6, "currency": "TRX",
"status": "success", "tx_hash": "50c96029…", "outter_id": "inv-1001",
"created_at": "2026-10-20T12:00:00Z",
"done_at": "2026-10-20T12:00:05Z", "expires_at": "2026-10-20T13:00:05Z"
},
"outter_id": "inv-1001",
"timestamp": 1792497605
}# Flask
@app.post("/hook")
def hook():
body = request.get_data() # raw bytes!
calc = hmac.new(API_KEY.encode(), body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(calc, request.headers.get("SIGNATURE", "")):
return "bad signature", 400
data = json.loads(body)
# data["order"]["id"], data["status"], data["outter_id"]
return "ok", 200
<?php
$body = file_get_contents('php://input'); // raw body!
$calc = hash_hmac('sha256', $body, $apiKey);
if (!hash_equals($calc, $_SERVER['HTTP_SIGNATURE'] ?? '')) {
http_response_code(400); exit('bad signature');
}
$data = json_decode($body, true);
// $data['order']['id'], $data['status'], $data['outter_id']
http_response_code(200); echo 'ok';
// Express: raw body required
app.post('/hook', express.raw({ type: '*/*' }), (req, res) => {
const calc = crypto.createHmac('sha256', API_KEY).update(req.body).digest('hex');
const sig = req.get('SIGNATURE') || '';
if (calc.length !== sig.length ||
!crypto.timingSafeEqual(Buffer.from(calc), Buffer.from(sig)))
return res.status(400).send('bad signature');
const data = JSON.parse(req.body);
// data.order.id, data.status, data.outter_id
res.send('ok');
});
Коды ошибокError codes
При ошибке — "status": "error", машинный code и текст message. Обрабатывайте ошибки по code.Errors return "status": "error", a machine-readable code and a human-readable message. Handle errors by code.
| code | HTTP | КогдаWhen |
|---|---|---|
auth_failed | 401 | Неверный API_ID или SIGNATURE, либо нет заголовковInvalid API_ID or SIGNATURE, or headers missing |
account_blocked | 403 | Аккаунт заблокирован — обратитесь в поддержкуAccount is blocked — contact support |
rate_limited | 429 | Больше 300 запросов в минутуMore than 300 requests per minute |
method_not_allowed | 405 | Нужен POSTPOST required |
invalid_body | 400 | Тело не JSON или слишком большоеBody is not JSON or too large |
invalid_receiver | 400 | Некорректный адрес получателяInvalid recipient address |
invalid_address | 400 | Некорректный адрес в /api/addressInvalid address in /api/address |
receiver_not_activated | 400 | Адрес не активированAddress is not activated |
receiver_already_activated | 400 | Адрес уже активированAddress is already activated |
invalid_quantity | 400 | Количество вне диапазона или не кратно шагуQuantity out of range or not a multiple of the step |
invalid_callback_url | 400 | callback_url — не http(s)-URLcallback_url is not an http(s) URL |
invalid_outter_id | 400 | outter_id длиннее 64 символовoutter_id longer than 64 characters |
insufficient_balance | 402 | Недостаточно средств на балансеInsufficient balance |
too_many_pending | 429 | Слишком много заказов в обработке — подождитеToo many orders in progress — wait and retry |
invalid_order_id | 400 | id — не UUIDid is not a UUID |
order_not_found | 404 | Заказ не найденOrder not found |
invalid_params | 400 | AML: неизвестная сеть/актив, некорректный адрес или хешAML: unknown network/asset, invalid address or hash |
network_required | 400 | AML: адрес подходит нескольким сетям (обычно 0x…) — укажите networkAML: the address matches several networks (usually 0x…) — specify network |
invalid_address | 400 | AML: адрес не подходит ни одной поддерживаемой сетиAML: the address does not match any supported network |
invalid_check_id | 400 | AML: id — не UUIDAML: id is not a UUID |
check_not_found | 404 | AML: проверка не найденаAML: check not found |
check_failed | 502 | AML: проверку не удалось запустить, деньги возвращеныAML: the check could not be started, funds returned |
service_unavailable | 503 | AML-проверки временно недоступныAML checks are temporarily unavailable |
duplicate_outter_id | 409 | AML: проверка с этим outter_id уже есть — запросите её через /api/aml/result (обычно повтор просто возвращает её с "duplicate": true)AML: a check with this outter_id exists — fetch it via /api/aml/result (normally a repeat just returns it with "duplicate": true) |
internal_error | 500 | Внутренняя ошибка — повторите позже (с тем же outter_id)Internal error — retry later (with the same outter_id) |
Вопросы по интеграции — @tronget_support.Integration questions — @tronget_support.