Pricing

Quote many Stars quantities in one request

Changed on

Quote a whole LIST of Stars quantities in a single request — built for storefronts that refresh preview prices for an entire pack catalog. One batch call consumes ONE unit of your request budget (and one probe unit), instead of one per pack.

Stars-only (type=stars). The quantity list is deduped and returned sorted ascending, up to 200 values per call. Each entry carries the same amount + fee itemisation as GET /v1/pricing for that quantity — the two endpoints agree cent-for-cent. Shared response fields (usdt_per_ton, quoted_at, valid_until) are hoisted to the top level.

Rate limit: same tighter 60 req/min per-tenant probe cap as GET /v1/pricing — but since a single call covers your whole catalog, one call per refresh window is all you need.

get/v1/pricing/batch

Request

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

Query parameters

type'stars' required
quantitiesstring required

Comma-separated Stars quantities (each 50–1000000, max 200 values). Each value is plain decimal digits; spaces around a comma are ignored. Duplicates are merged.

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

One quote per requested quantity (deduped, ascending).

type'stars' required

Batch pricing is Stars-only.

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

Indicative USDT per 1 GRAM (informational; the field name usdt_per_ton is frozen for wire compatibility; null if unavailable).

quoted_atstring date-time required
valid_untilstring date-time required

Re-quote hint — prices are locked only at order creation.

Example response

{
  "quotes": [
    {
      "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"
}

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