Pricing

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

get/v1/pricing

Request

  • Base URL
    https://api.mystars.tg
  • Auth
    API key in header X-Api-Key

Query parameters

type'stars' | 'premium' required
quantityinteger

Required when type=stars — the number of Stars (50–1000000), as plain decimal digits (no sign, decimal point, exponent or hex prefix).

months3 | 6 | 12

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

payment_currency'ton' | 'usdt_ton' required

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.

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

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.

usdt_per_tonstring nullable required

The current indicative USDT per 1 GRAM (the field name usdt_per_ton is frozen for wire compatibility) — 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 the order's payment window. Read expires_at on the order for that deadline — it is authoritative; do not assume a fixed duration.

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_unavailable enum value to the error/code response property for the response status

    • warning

      added the new antibot_enforce_unavailable enum value to the error/code response property for the response status

    • warning

      added the new antibot_enforce_unavailable enum value to the error/code response property for the response status

    167 more changes in this revision