v2

latestOpenAPI 3.1.0Proprietary2026-07-3191563.2 KB
Pricing

Quote a price

Get 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 pricedtype 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 USDT/TON rate, for your own GRAM↔USDT 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.

get/v1/pricing

Query parameters

type'stars' | 'premium' required
quantityinteger

Required when type=stars — the number of Stars (50–1000000).

months3 | 6 | 12

Required when type=premium — the subscription length in months (3, 6, or 12).

payment_currency'ton' | 'usdt_ton'

ton = GRAM (TON), usdt_ton = USDT on the TON chain.

Response

A price quote.

type'stars' | 'premium' required

The product this quote priced — echoed back from your request.

quantityinteger nullable required

The number of Stars priced (when type=stars); null for Premium.

monthsinteger nullable required

The Premium subscription length in months priced (when type=premium); null for Stars.

amountstring required

The full, all-in total to pay, as a decimal string in currency. Nothing else to add — send exactly this amount on-chain.

currency'ton' | 'usdt_ton' required

ton = GRAM (TON), usdt_ton = USDT on the TON chain.

usdt_per_tonstring nullable required

The current indicative USDT per 1 TON (shown as GRAM in MyStars UIs) — public market data you can use to convert GRAM↔USDT in your own interface. null if the rate is momentarily unavailable. This is NOT the amount you pay (that is amount); it is informational only.

quoted_atstring date-time required

Server timestamp (ISO 8601) when this quote was computed.

valid_untilstring date-time required

A RE-QUOTE HINT (ISO 8601): the price tracks the market and is recomputed about every minute, so re-fetch after this time. It is not a price lock — the price is locked only when you create an order (POST /v1/orders), which fixes the amount for a 1-hour payment window (expires_at on the order).

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"
  },
  "usdt_per_ton": "2.85",
  "quoted_at": "2026-06-21T14:03:12.000Z",
  "valid_until": "2026-06-21T14:04:12.000Z"
}