API
REST/JSON (not JSON-RPC). Base URL: https://api.trxwatt.com. Amounts are in sun (1 TRX = 1,000,000 sun) unless the field ends in Trx. Endpoints marked auth require an X-API-Key header when the server has API_KEYS set — generate a wallet-bound key on the Settings page (or POST /v1/keys). Errors are { "error": "..." }.
Seller staking / withdraw / claim happen on-chain via TronLink, not through this API.
/v1/priceQuote a rental. Price is a fraction of the live burn price, so it always beats burning TRX.
period | must be "1h" — 1-hour rentals only |
energyAmount | 15,000 – 200,000,000 (≈65,000 per USDT transfer) |
curl 'https://api.trxwatt.com/v1/price?period=1h&energyAmount=65000'
// { "totalTrx": 2.6, "totalSun": 2600000, "burnAlternativeSun": 6500000, "savingsPct": 60, ... }/v1/ordersauthCreate + open a rental order (operator delegates pooled Energy to the destination).
destinationAddress | address that receives Energy (the USDT sender) |
period | must be "1h" — 1-hour rentals only |
energyAmount | integer |
preActivate | bool — activate a fresh address first |
curl -X POST https://api.trxwatt.com/v1/orders \
-H 'X-API-Key: <key>' \
-H 'Content-Type: application/json' \
-d '{"destinationAddress":"T...","period":"1h","energyAmount":65000}'/v1/orders/{id}Fetch an order. Includes energyAmount, priceSun, feeSun (platform cut), status (QUOTED → ACTIVE → CLOSED / FAILED / CANCELLED), openTx/closeTx.
curl 'https://api.trxwatt.com/v1/orders/1'/v1/activateauthPre-activate a fresh TRON address (~1 TRX one-time account-creation cost).
curl -X POST https://api.trxwatt.com/v1/activate \
-H 'X-API-Key: <key>' \
-H 'Content-Type: application/json' \
-d '{"address":"T..."}'/v1/couponValidate and claim a coupon code for free Energy. Returns ok, message, and energyAmount on success.
code | coupon code (e.g. FREETRIAL) |
address | TRON address the free Energy will be delegated to |
curl -X POST https://api.trxwatt.com/v1/coupon \
-H 'X-API-Key: <key>' \
-H 'Content-Type: application/json' \
-d '{"code":"FREETRIAL","address":"T..."}'/v1/poolLive market snapshot: burn price, energy/TRX/day, available energy, utilization, 24h activity.
curl 'https://api.trxwatt.com/v1/pool'/v1/configStatic pricing params (platform fee bps, rent-fraction curve, energy min/max) so clients can reproduce /v1/price quotes locally — e.g. the seller earnings estimator.
curl 'https://api.trxwatt.com/v1/config'/v1/seller/{addr}Per-seller earnings (reporting mirror; the contract is the source of truth).
curl 'https://api.trxwatt.com/v1/seller/T...'/v1/buyer/{addr}/ordersA wallet's rental orders, newest first (powers the dashboard 'Rentals' tab).
curl 'https://api.trxwatt.com/v1/buyer/T.../orders'/v1/purchasesRecent completed rentals across all buyers, newest first — paginated and date-filterable.
limit | page size (default 10, max 100) |
offset | rows to skip (pagination) |
from | unix millis — only purchases at/after this time (optional) |
to | unix millis — only purchases at/before this time (optional) |
curl 'https://api.trxwatt.com/v1/purchases?limit=10&offset=0'
// { "items": [ { "id":1, "energyAmount":65000, "priceSun":3250000, ... } ], "total": 42 }/v1/keysIssue (or rotate) a programmatic API key bound to a wallet. Rotating invalidates the previous key. Testnet trusts the posted address; production requires a wallet signature.
address | your TRON (base58) address |
curl -X POST https://api.trxwatt.com/v1/keys \
-H 'X-API-Key: <key>' \
-H 'Content-Type: application/json' \
-d '{"address":"T..."}'/v1/keys/{addr}The current API key for an address (apiKey is null if none has been issued).
curl 'https://api.trxwatt.com/v1/keys/T...'
// { "address": "T...", "apiKey": "twk_..." }