🔌 Public API

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.

Base URL  https://tronscan.energy/api/v1
Format  JSON
Auth  X-API-Key header
🚀
Quick Start
Free API key — Request access using the form at the bottom of this page. Keys are issued manually, usually within 24h.

All requests require an X-API-Key header. Here's how to get energy prices in one call:

Shell
curl -H "X-API-Key: YOUR_API_KEY" \
     "https://tronscan.energy/api/v1/rates?resource=energy&best=1"
PHP
$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);
Python
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:

Response envelope
{
  "success": true,
  "ts": "2026-10-27T10:00:00Z",
  "meta": { "provider_count": 8, "total_tiers": 64 },
  "data": [ ... ]
}
🔑
Authentication

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.

Header (recommended)
X-API-Key: ts_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
Keep your key private. Do not expose it in client-side JavaScript or public repositories. If compromised, regenerate it from your account (Profile → API): the old key stops working immediately.
📊
Plans & Rate Limits
Free
60
requests / hour
All read endpoints
Self-service from your account
No create-order
Partner
∞
unlimited
V1 + V2 (coming)
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.

⚠️
Error Codes
HTTPcodeMeaning
200—Success
400missing_parameterRequired parameter not provided
400invalid_parameterParameter value not valid (e.g. non-numeric duration, unknown sort)
400api_key_in_queryAPI key sent as ?api_key=: use the X-API-Key header
401missing_api_keyX-API-Key header not present
401invalid_api_keyKey not found or hash mismatch
403api_key_inactiveKey pending approval or revoked
403endpoint_not_allowedYour plan does not include this endpoint
404provider_not_foundSlug does not match any active provider
405method_not_allowedOnly GET is supported
429rate_limit_exceededHourly quota exceeded (see Retry-After)
429too_many_auth_failuresToo many requests with a missing or invalid key from your IP (20 in 10 min); see Retry-After
503database_unavailableTemporary backend issue (retry after the Retry-After seconds)
Error response
{
  "success": false,
  "error": {
    "code":    "invalid_api_key",
    "message": "Invalid API key"
  },
  "ts": "2026-10-27T10:00:00Z"
}
⚡
Endpoints
GET
/api/v1/rates Buy-side prices from all active providers
▼

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.

Query Parameters
ParameterTypeRequiredDescriptionDefault
resource string optional energy | bandwidth | all energy
duration integer optional Duration in seconds (e.g. 3600, 86400): exact tiers, ranges containing it, or the 5m-15m group for 300–900 —
best integer optional Set to 1 to return only the best price per duration tier 0
provider string optional Filter by provider slug from /providers (e.g. tronsave, feee_io) —
resource string optional
energy | bandwidth | all
default: energy
duration integer optional
Duration in seconds (e.g. 3600, 86400): exact tiers, ranges containing it, or the 5m-15m group for 300–900
best integer optional
Set to 1 to return only the best price per duration tier
default: 0
provider string optional
Filter by provider slug from /providers (e.g. tronsave, feee_io)
Example Request
curl -H "X-API-Key: YOUR_KEY" \
     "https://tronscan.energy/api/v1/rates?resource=energy&best=1"
Try it live
Response

                
Example Response
{
  "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"
          }
        ]
      }
    ]
  }
}
GET
/api/v1/offers Live sell-side orders from all providers
▼

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.

Query Parameters
ParameterTypeRequiredDescriptionDefault
resource string optional energy | bandwidth energy
provider string optional Provider slug from /providers (e.g. tronenergy_market, tronify); legacy platform slugs (tronenergymarket, feee) also accepted —
min_qty integer optional Minimum quantity_available —
max_price number optional Maximum price_sun (decimals allowed, e.g. 52.5) —
sort string optional price_asc | price_desc | qty_desc | income_desc (other values → 400) price_asc
page integer optional Page number 1
limit integer optional Results per page (max 100) 20
include_outliers boolean optional 1 = also return price outliers (price_sun below 5) 0
resource string optional
energy | bandwidth
default: energy
provider string optional
Provider slug from /providers (e.g. tronenergy_market, tronify); legacy platform slugs (tronenergymarket, feee) also accepted
min_qty integer optional
Minimum quantity_available
max_price number optional
Maximum price_sun (decimals allowed, e.g. 52.5)
sort string optional
price_asc | price_desc | qty_desc | income_desc (other values → 400)
default: price_asc
page integer optional
Page number
default: 1
limit integer optional
Results per page (max 100)
default: 20
include_outliers boolean optional
1 = also return price outliers (price_sun below 5)
default: 0
Example Request
curl -H "X-API-Key: YOUR_KEY" \
     "https://tronscan.energy/api/v1/offers?resource=energy&sort=price_desc&limit=5"
Try it live
Response

                
Example Response
{
  "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"
    }
  ]
}
GET
/api/v1/market Aggregated sell-side market snapshot
▼

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).

Example Request
curl -H "X-API-Key: YOUR_KEY" \
     "https://tronscan.energy/api/v1/market"
Try it live
Response

                
Example Response
{
  "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"
  }
}
GET
/api/v1/quote Instant cost estimate for a given quantity and duration
▼

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.

Query Parameters
ParameterTypeRequiredDescriptionDefault
qty integer required Energy or bandwidth amount to purchase —
duration integer required Rental duration in seconds (e.g. 86400 = 1 day) —
resource string optional energy | bandwidth energy
provider string optional Filter to a specific provider slug —
qty integer required
Energy or bandwidth amount to purchase
duration integer required
Rental duration in seconds (e.g. 86400 = 1 day)
resource string optional
energy | bandwidth
default: energy
provider string optional
Filter to a specific provider slug
Example Request
curl -H "X-API-Key: YOUR_KEY" \
     "https://tronscan.energy/api/v1/quote?qty=65000&duration=86400&resource=energy"
Try it live
Response

                
Example Response
{
  "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
    }
  ]
}
GET
/api/v1/providers List of all active providers with metadata
▼

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.

Example Request
curl -H "X-API-Key: YOUR_KEY" \
     "https://tronscan.energy/api/v1/providers"
Try it live
Response

                
Example Response
{
  "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"
    }
  ]
}
GET
/api/v1/history Historical buy-side prices for a provider
▼

Returns price time-series from price_snapshots. Data points are recorded every 6 hours. Up to 90 days available.

Query Parameters
ParameterTypeRequiredDescriptionDefault
provider string required Provider slug (from /providers) —
field string optional 10m | 1h | 3h | 6h | 1d | 2d | 3d | 30d (also: short = 5–15 min group; legacy names 1g | 2g | 3gg | 30gg still accepted). Same fields for bandwidth: set resource=bandwidth or prefix bw_ (e.g. bw_6h, bw_short) 1d
days integer optional How many days back (max 90) 7
resource string optional energy | bandwidth (auto-prefixes field) energy
provider string required
Provider slug (from /providers)
field string optional
10m | 1h | 3h | 6h | 1d | 2d | 3d | 30d (also: short = 5–15 min group; legacy names 1g | 2g | 3gg | 30gg still accepted). Same fields for bandwidth: set resource=bandwidth or prefix bw_ (e.g. bw_6h, bw_short)
default: 1d
days integer optional
How many days back (max 90)
default: 7
resource string optional
energy | bandwidth (auto-prefixes field)
default: energy
Example Request
curl -H "X-API-Key: YOUR_KEY" \
     "https://tronscan.energy/api/v1/history?provider=tronsave&field=1d&days=30"
Try it live
Response

                
Example Response
{
  "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 }
  ]
}
🔑
Get an API Key
API keys are available to Premium accounts: one personal key per account, activated instantly from Profile → API, where you can also regenerate or revoke it at any time. Already have a Premium account? Sign in below. Otherwise contact us.