Market
What energy costs at the vendors we measure. Reference about somebody else's prices, not an offer.
GET /market
TRON energy market
Authentication: None — this endpoint is public and takes no API key.
What energy costs at the vendors we measure, beside what it costs here. Public endpoint, no authorization required; rate limited by IP, since a public request carries no key.
The response is cacheable for at most a minute — the cadence the
measurement itself runs at — and never longer than what is left of
the window in which our servers hold the current price: ours here
is GET /tariff's price.
Every figure is an observation, never a quote we arranged: each
vendor's own published rate for its own product, read at the moment
in observed_at and fee-inclusive for one order of that size. A
field we did not measure is null, never a plausible number —
sun_131k is null where the vendor will not serve that size, not
the price of the nearest size it will.
This is reference, and about somebody else's prices. Only ours
is ours, and only your order's price is a commitment: it is set when
the order is created and can be raised at fulfillment only to the
cheapest available vendor price plus our minimum margin, capped (see
GET /tariff). A vendor listed here is not a
supplier of ours and not a recommendation; we do not link to any of
them, and their availability, terms and honesty are their own.
The list is not the whole market: it is the vendors that publish a
price we can read, that answered within the last 24 hours, that we
are free to name, and whose rates are above ours. A vendor is not
listed while either of its printed rates — sun_65k or sun_131k —
is at or below our own current price, and it comes back by itself
when our price moves under both. A vendor that publishes no
sun_65k we can read is not listed at all, whatever its sun_131k
says: with no price at the size this answer is ordered by there is
nothing to compare against ours and nothing to show. An empty
vendors with a null observed_at is a valid answer and means the
measurement is empty, not that the service is unwell.
duration_s asks the same question about one lease. With it, a vendor
is quoted on the cheapest of its leases that cover that term — the
term itself or a longer one, since an hour of energy serves a
five-minute transfer as well as five minutes do — and on the exact
term when two print the same price. The row's own duration_s names
the lease it is quoted on, so a five-minute answer can list a vendor
at 3600. A shorter lease never stands in for a longer one: a vendor
with no lease of that term or longer is left out. ours is that
lease's own price, so which vendors clear it is decided per product
too, and against every covering lease a vendor sells: a printed rate
at or below ours in either column of any of them leaves the vendor
out, whichever lease it would have been shown on. Without it the
answer is what it has always been: each vendor on the product we rank
first for it, ours at the five-minute price, and duration_s echoed
as null. Anything outside the leases we sell is
400 invalid_request whose details carries both the refused
duration_s and allowed.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
duration_s | query | optional | integer | Which lease to compare, in seconds: Given, each vendor is quoted on its cheapest lease that covers
this one — this term or a longer one, the exact term on a tie —
and Left off, no term is asked for and none is imposed: every vendor
is quoted on the product we rank first for it, which need not be
the same term for two vendors, and Anything outside those three is Example: |
Responses
200
OK
Content type application/json.
| Field | Type | Required | Description |
|---|---|---|---|
duration_s | integer or null | required | The lease this comparison is about, echoed from the
request. Read it rather than remembering what you asked for. Two terms fetched at once are two answers that look alike, and the one thing that tells them apart is this field. Example: |
observed_at | string (date-time) or null | required | The latest pass among the vendors listed — the moment
the freshest row in Example: |
ours | object | required | Our own price at the same moment, from the same
computation |
ours.current_price_sun | integer | required | Our price per unit of energy right now, in sun. An integer, and not reformatted: it is a tariff, not a measurement. Example: |
vendors | array of object | required | One entry per vendor with an error-free observation in
the last 24 hours and a readable |
vendors[].name | string | required | The vendor's own public brand name, and the key of the row. Named as a market participant and nothing else: nobody in this array is a supplier of ours, and this response never says who is. Example: |
vendors[].site | string or null | required | The vendor's site, or Example: |
vendors[].channels | array of string | required | How the vendor can be reached, as far as we established: an API, a web front, a bot. An empty array means we established none — not that there are none. Each item — One of: |
vendors[].product | string | required | The product id as the observer records it — usually the vendor's own spelling; for a derived rate it is ours, since what was costed is not a product the vendor sells under that name. One product per vendor. Without Example: |
vendors[].duration_s | integer or null | required | The term of that product in seconds; Example: |
vendors[].sun_65k | string or null | required | Fee-inclusive price per unit of energy for one
order of 65 000 units, in sun, always with two
decimals. Fee-inclusive because ranking by a bare
rate compares a number nobody is ever charged: at
this size a fixed per-order fee is a tenth of the
bill. Nullable in this schema and never Example: |
vendors[].sun_131k | string or null | required | The same for an order of 131 000 units. Example: |
vendors[].basis | string | required | What kind of number
One of: |
vendors[].change_24h_pct | string or null | required |
Example: |
vendors[].available_energy | integer or null | required | Energy the vendor says it can deliver right now.
Example: |
vendors[].min_order | integer or null | required | Smallest order the vendor accepts, in units of energy; Example: |
vendors[].max_order | integer or null | required | Largest order the vendor accepts, in units of energy; Example: |
vendors[].observed_at | string (date-time) | required | The pass these numbers come from, on our clock, UTC. Example: |
vendors[].stale | boolean | required | True when that pass is more than 15 minutes old. The row is still shown — an old measurement is a fact and a hidden one is not — but it is shown as old. |
429
Rate limit exceeded (rate_limited), or too many failed
authorizations from this credential (too_many_auth_failures). Both
are 429 and both carry Retry-After; they differ in what you
should do about it, which is why they differ in code and not only
in message. rate_limited also carries the RateLimit-* state of
the bucket it came from; too_many_auth_failures does not, because
the counter behind it is not a bucket. See "Rate limits" and
"Repeated authorization failures" above.
On POST /orders a rate_limited may also carry
details.reason = bulk_volume_cap: not requests per minute but
energy per window — a mode c order whose volumes would take
your account past the bulk allowance. details carries cap_units
(the allowance), spent_units (your volume already inside the
window), requested_units (what this order asked for) and
window_s (the width of the window, 3600). Retry-After is the
first instant at which this body can be accepted: enough of your
counted volume has to leave the window to make room for
requested_units, which is not in general the moment the oldest
position leaves — one departure frees only that position's units.
An order whose own volume is larger than the whole allowance is not
answered here at all: no waiting would help it, and it is
400 invalid_request with
details.reason = bulk_order_over_cap. It is a pace limit like the
others, so it is the same code: the order is not wrong, and the same
body sent later is accepted. It carries no RateLimit-* headers:
those describe a bucket of requests per minute, and this allowance
is energy per hour — details above is its whole state.
Content type application/json.
Schema: Error.
| Header | Type | Description |
|---|---|---|
Retry-After | integer | Seconds to wait before retrying. |
RateLimit-Limit | integer | Requests per minute in this bucket — per UTC day on
|
RateLimit-Remaining | integer | Requests left in this bucket right now. |
RateLimit-Reset | integer | Seconds until the bucket is full again. |