TronScan.energy API v1
Real-time TRON energy and bandwidth market data. Prices from 10+ providers, live sell-side offers, historical data and instant quotes — all in one endpoint.
Getting Started
Quick Start Authentication Plans & Limits Error CodesEndpoints
/rates /offers /market /quote /providers /historyRequest Key
Get your API key →
All requests require an X-API-Key header. Here's how to get energy prices in one call:
curl -H "X-API-Key: YOUR_API_KEY" \ "https://tronscan.energy/api/v1/rates?resource=energy&best=1"
$ch = curl_init('https://tronscan.energy/api/v1/rates?resource=energy&best=1'); curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: YOUR_API_KEY']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = json_decode(curl_exec($ch), true);
import requests
r = requests.get(
'https://tronscan.energy/api/v1/rates',
headers={'X-API-Key': 'YOUR_API_KEY'},
params={'resource': 'energy', 'best': 1}
)
data = r.json()
Every response follows the same structure:
{
"success": true,
"ts": "2026-10-27T10:00:00Z",
"meta": { "provider_count": 8, "total_tiers": 64 },
"data": [ ... ]
}
Pass your API key in the X-API-Key HTTP header with every request.
Passing the key in the URL (?api_key=...) is not supported and returns HTTP 400 api_key_in_query: URLs end up in server logs, browser history and Referer headers.
X-API-Key: ts_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
Self-service from your account
No create-order
Upgrade on request
Priority support
Webhooks
SLA guarantee
Rate limit headers are returned on every response:
X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset
(Unix time when the next request slot frees up). The limit is a rolling 60-minute window:
a slot frees up one hour after the call that used it, not at the top of the hour.
Exceeding the limit returns HTTP 429 with a Retry-After header (seconds).
Responses are cached for 60 seconds; cached calls still count toward the limit.
Conventions. All timestamps are ISO 8601 in UTC (2026-10-27T07:16:27Z).
Durations are in seconds; labels use one compact format (15m, 1h, 1d, ranges 3d-14d).
Prices are in SUN per unit of energy/bandwidth (1 TRX = 1,000,000 SUN).
Provider slugs are the ones returned by /providers and are accepted by every endpoint.
Integer parameters must be plain non-negative integers, otherwise HTTP 400 invalid_parameter.
{
"success": false,
"error": {
"code": "invalid_api_key",
"message": "Invalid API key"
},
"ts": "2026-10-27T10:00:00Z"
}
Returns price tiers from provider_price_tiers, refreshed by the cron every 6 hours (tiers older than 7 hours are not returned). Each tier includes standard and FAST price when available. price_sun is per period for durations under 1 day and per day from 1 day up (price_basis). The shortest tier is the short group 5m-15m: providers sell 5, 10 or 15 minute rentals, compared together at a per-period price; each provider entry reports its own real duration_sec/duration_label. Duration labels use one compact format across the whole API (15m, 1h, 1d, 3d; ranges as 3d-14d); duration_sec gives the exact value.
curl -H "X-API-Key: YOUR_KEY" \ "https://tronscan.energy/api/v1/rates?resource=energy&best=1"
{
"success": true,
"ts": "2026-10-27T10:00:00Z",
"meta": { "resource": "energy", "provider_count": 13, "total_tiers": 61,
"updated_at": "2026-10-27T07:16:27Z" },
"data": {
"energy": [
{
"duration_sec": 3600,
"duration_sec_max": null,
"duration_label": "1h",
"is_short_group": false,
"price_basis": "per_period",
"providers": [
{
"name": "Itrx.io",
"slug": "itrx_io",
"duration_sec": 3600,
"duration_label": "1h",
"price_sun": 35,
"price_sun_fast": null,
"qty_available": null,
"qty_min": 50000,
"qty_max": null,
"updated_at": "2026-10-27T07:15:20Z"
}
]
}
]
}
}
Returns active sell orders from sell_offers, updated every minute. Only orders with quantity_available > 0 fetched in the last 15 min are returned. This is the item-by-item list of the same orders that /market summarises. Orders priced below min_market_price_sun (5 SUN) are price outliers (e.g. dust test orders): excluded by default, counted in meta.price_outliers, shown with include_outliers=1. duration.value/unit are always in seconds. provider.slug is the same slug as in /providers; provider.platform_slug is the legacy platform identifier (both are accepted by the provider filter). Results are ordered by the chosen sort, then by a stable key, so pagination never repeats or skips orders.
curl -H "X-API-Key: YOUR_KEY" \ "https://tronscan.energy/api/v1/offers?resource=energy&sort=price_desc&limit=5"
{
"meta": { "total": 328, "page": 1, "limit": 5, "has_more": true,
"min_market_price_sun": 5, "price_outliers": 2, "outliers_included": false },
"data": [
{
"provider": { "name": "TronEnergy.Market", "slug": "tronenergy_market",
"platform_slug": "tronenergymarket" },
"order_no": "2304190664759388169206",
"price_sun": 105,
"quantity": { "available": 399989, "total": 500000, "min": 100000 },
"price_outlier": false,
"duration": { "days": 3, "label": "3d", "value": 259200, "unit": "s" },
"income": { "max_trx": 94.49, "min_trx": 18.9 },
"is_partial_fill": true,
"is_lock": true,
"fetched_at": "2026-10-27T12:39:04Z"
}
]
}
Single-call overview of the current market state: total available energy/bandwidth, price range, top offer. It aggregates the same live orders that /offers lists one by one; price outliers (below min_market_price_sun, 5 SUN) are excluded from the statistics and counted in excluded_outliers. top_offer is the highest-priced offer. price_avg_sun is the simple average over orders; price_avg_weighted_sun weights each order by its available quantity (the typical price of one unit on the market).
curl -H "X-API-Key: YOUR_KEY" \ "https://tronscan.energy/api/v1/market"
{
"data": {
"energy": {
"total_offers": 328,
"total_available": 1645427335,
"price_min_sun": 30,
"price_max_sun": 60,
"price_avg_sun": 38.4,
"price_avg_weighted_sun": 41.7,
"active_providers": 4,
"excluded_outliers": 2,
"last_updated": "2026-10-27T12:39:04Z",
"top_offer": {
"provider": "TronEnergy.Market",
"slug": "tronenergy_market",
"platform_slug": "tronenergymarket",
"price_sun": 60,
"qty_available": 41273711,
"duration_days": 14,
"duration_label": "14d"
}
},
"bandwidth": { "total_offers": 7, "price_min_sun": 100, "price_max_sun": 600,
"price_avg_sun": 380, "price_avg_weighted_sun": 412.5,
"last_updated": "2026-10-27T12:39:02Z" },
"min_market_price_sun": 5,
"last_updated": "2026-10-27T12:39:04Z"
}
}
Calculates total TRX cost across all providers for the requested qty × duration. Price scale: for durations under 1 day price_sun is the price per unit for the whole period (cost = price × qty); from 1 day up it is per day (cost = price × qty × days) — see price_basis. A requested duration between 300 and 900 s matches the short group (meta.duration_group); each entry carries the real provider duration and duration_covers (true if it is at least the requested duration). Useful for bot decision logic. Returns both standard and FAST price when available.
Quantity limits: providers whose tier minimum/maximum (min_qty/max_qty) does not allow the requested qty are left out and counted in meta.excluded_by_qty. qty_sufficient is null when the provider does not publish its availability.
Non-standard durations: if no tier has the requested duration (e.g. 2h or 36h), each provider's shortest tier that covers it is returned instead and meta.match is next_longer (otherwise exact). In that case you pay the tier's duration: billed_duration_sec shows what the cost refers to.
curl -H "X-API-Key: YOUR_KEY" \ "https://tronscan.energy/api/v1/quote?qty=65000&duration=86400&resource=energy"
{
"meta": {
"qty": 65000, "duration_sec": 86400, "duration_days": 1,
"resource": "energy", "match": "exact", "duration_group": null,
"provider_count": 9, "excluded_by_qty": 2,
"best_price_sun": 40, "best_total_trx": 2.6
},
"data": [
{
"provider": "JustLend",
"slug": "justlend",
"price_sun": 40,
"price_sun_fast": null,
"total_cost_trx": 2.6,
"total_cost_trx_fast": null,
"price_basis": "per_day",
"billed_duration_sec": 86400,
"qty_available": null,
"qty_sufficient": null,
"duration_sec": 86400,
"duration_label": "1d",
"duration_covers": true,
"min_qty": 1,
"max_qty": null
}
]
}
Returns slugs, URLs, min quantities, current price ranges and availability for each active provider. Use slugs as the provider param in other endpoints. Because tiers under 1 day are priced per period and tiers from 1 day up per day, prices are split in per_period and per_day ranges (the flat min/max mix both scales and are kept only for backward compatibility). energy_available is the provider's published pool liquidity (null if not published). has_live_prices is false when the provider has no tier fresher than 7 hours.
curl -H "X-API-Key: YOUR_KEY" \ "https://tronscan.energy/api/v1/providers"
{
"meta": { "total": 10 },
"data": [
{
"name": "Feee.io",
"slug": "feee_io",
"url": "https://feee.io",
"ref_url": "https://feee.io?ref=VVR6",
"min_qty_energy": 32000,
"energy_price_sun": {
"min": 35, "max": 120,
"per_period": { "min": 35, "max": 45 },
"per_day": { "min": 40, "max": 120 }
},
"bw_price_sun_min": 600,
"bw_price_sun": {
"per_period": { "min": 600, "max": 600 },
"per_day": { "min": 700, "max": 800 }
},
"energy_available": 34264169,
"tier_count": 8,
"has_live_prices": true,
"prices_updated_at": "2026-10-27T07:15:13Z"
}
]
}
Returns price time-series from price_snapshots. Data points are recorded every 6 hours. Up to 90 days available.
curl -H "X-API-Key: YOUR_KEY" \ "https://tronscan.energy/api/v1/history?provider=tronsave&field=1d&days=30"
{
"meta": {
"provider": "Tronsave", "field": "1d", "db_field": "prezzo_1g", "days": 30,
"data_points": 120, "price_min": 80, "price_max": 92, "price_avg": 86.4,
"price_last": 87
},
"data": [
{ "ts": "2026-09-27T07:15:38Z", "price_sun": 87 },
{ "ts": "2026-09-27T13:15:37Z", "price_sun": 87 },
{ "ts": "2026-09-27T19:15:40Z", "price_sun": 85 }
]
}
