Quote a price
Changed onGet a quote for an item in a payment currency. The amount is the full, all-in total you'll send on-chain (in currency) — there's nothing else to add.
The quote echoes back what it priced — type plus quantity (for Stars) or months (for Premium); the field that doesn't apply is null — so the amount is self-describing and you never have to correlate it to your request.
The response also carries quoted_at + valid_until (a re-quote hint — the price tracks the market and is recomputed about every minute; it is locked only when you create an order) and usdt_per_ton (the current public GRAM↔USDT rate, for your own conversion; null if momentarily unavailable).
Rate limit: this endpoint carries a tighter per-tenant cap of 60 requests/min (in addition to the standard per-tenant budget). If you exceed this, you receive a 429 and should back off for the remainder of the minute.
Request
- Base URLhttps://api.mystars.tg
- AuthAPI key in header X-Api-Key
Query parameters
Required when type=stars — the number of Stars (50–1000000), as plain decimal digits (no sign, decimal point, exponent or hex prefix).
Required when type=premium — the subscription length in months (3, 6, or 12), as plain decimal digits.
The asset the order is paid in. ton = the native coin GRAM (ex TON), sent as a plain transfer — it is not USDT on TON. usdt_ton = USDT (TON), sent as a jetton transfer. Required on every create and pricing request: a request without it is rejected with 400 bad_request.
The currency to quote in. Where USDT payments are not offered, usdt_ton answers 422 currency_not_available.
Response
A price quote.
Example response
{
"quantity": 500,
"amount": "5.757",
"fee": {
"subtotal": "13.18",
"processing_fee": "0.92",
"total": "14.1",
"description": "1% swap + 0.5 GRAM gas",
"kind": "swap"
},
"usdt_per_ton": "2.85",
"quoted_at": "2026-06-21T14:03:12.000Z",
"valid_until": "2026-06-21T14:04:12.000Z"
}Changes
- warning
added the new
antibot_enforce_unavailableenum value to theerror/coderesponse property for the response status - warning
added the new
antibot_enforce_unavailableenum value to theerror/coderesponse property for the response status - warning
added the new
antibot_enforce_unavailableenum value to theerror/coderesponse property for the response status
167 more changes in this revision
- warning