Core API
Quote Bandwidth
Exact price of a bandwidth order for a volume and duration, fixed fee included
GET
Quote Bandwidth
Quote Bandwidth
Returns the exact amount a bandwidth order of this volume and duration will be charged — rental and fixed fee together, at your rate. The quote is calculated by the same code that charges the order, so while the price is unchanged the purchase costs exactlytotal_trx.
This endpoint is public — authentication is optional. Send your API key to be quoted your own
rate and fixed fee; without it you get the public price.
Query parameters
integer
required
Bandwidth units to price. Between 1 and 100,000.
string
default:"1h"
Rental period:
1h, 1d, or a whole number of minutes from 5m to 59m — the same values as in
Buy Bandwidth.Headers
string
Optional. With a valid key the response reflects your negotiated rate and your fixed fee. An
absent, invalid or revoked key is not an error — you get the public price with
personal_price: false.Response
number
Bandwidth units the quote was calculated for
string
Rental period the quote was calculated for
string
Rate in SUN per 1 bandwidth unit, rounded to 0.01 for display. Minute terms carry a discount, so
their rate is fractional, and the amounts below are calculated from the exact rate — take
total_trx rather than multiplying this rounded value yourself.string
Rental cost for this volume and duration, without the fixed fee
string
Fixed fee, charged once per order regardless of volume and duration. Reflects your own fee if
a custom fee, discount or waiver applies to your account.
string
What you will be charged:
rental_trx + fixed_fee_trx. Pass it as max_price_trx to
Buy Bandwidth.boolean
true when your negotiated rate was applied, false when the quote is at the public price. Check
it: a forgotten X-API-Key header otherwise looks like a normal response, and you would quote
your customers the public price while being charged your own.Example
Values below are an example, with
price_sun_1h of 400 and short_max_discount_pct of 5. Current rates
and the discount are in Get Bandwidth Prices.Response
What the quote does not include
Acting on another account: GET /v1/bandwidth/quote/me
/bandwidth/quote prices for the owner of the API key. If your key acts on another account with
the X-Account-Id header, the purchase is charged at that account’s rate and fee — the quote may
differ from the charge, and a max_price_trx taken from it may be refused with 409 PRICE_CHANGED.
Use GET /v1/bandwidth/quote/me in that case. It takes the same query parameters and returns the
same response, but authentication is required, and the account is resolved exactly as for the
purchase, X-Account-Id included. It needs the view scope, which every key always has.
cURL
Errors
On
/bandwidth/quote an invalid or revoked X-API-Key is not an error: the quote is returned
at the public price with personal_price: false.