---
title: "Quote many Stars quantities in one request"
method: GET
path: "/v1/pricing/batch"
tags: ["Pricing"]
---

# Quote many Stars quantities in one request

`GET /v1/pricing/batch`

## Request

- Base URL: `https://api.mystars.tg`
- URL: `https://api.mystars.tg/v1/pricing/batch`
- Auth: API key in header `X-Api-Key`

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.

## Query parameters

- `type` 'stars', required
- `quantities` string, required
- `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`.

## Response `200`

One quote per requested quantity (deduped, ascending).

- QuoteBatch
  - `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`.
  - `quotes` object[], required: One entry per requested quantity (deduped, ascending).
    - `quantity` integer, required: The number of Stars this entry priced.
    - `amount` string, required: The full, all-in total to pay for this quantity, as a decimal string in the top-level `currency` — identical to what `GET /v1/pricing` returns for the same quantity.
    - `fee` FeeBreakdown, nullable, required: Itemisation of the `usdt_ton` processing fee that is ALREADY part of the all-in amount. `subtotal + processing_fee == total == amount`. Pass-through network cost only — it does not reveal our cost basis or markup. It takes one of two forms, named by `kind`: a swap-backed fee (the 1% DEX swap fee plus GRAM swap gas) or, for an order settled without a swap, network gas alone. Only `total` (= `amount`) is binding — the `subtotal`/`processing_fee` split is informational and may shift by a cent with the live FX rate.
      - `subtotal` string, required: The item price before the processing fee, as a decimal string (USDT).
      - `processing_fee` string, required: The pass-through network cost, rounded up to the cent, as a decimal string (USDT) — the 1% DEX swap fee plus GRAM swap gas for a swap-backed order, or network gas alone for an order settled without a swap.
      - `total` string, required: subtotal + processing_fee — equals `amount`. Decimal string (USDT).
      - `description` string, required: Human-readable label for the fee components — for example "1% swap + 0.5 GRAM gas" for a swap-backed fee, or "TON network gas" for a fee that is network gas alone. A label for display; do not parse it — branch on `kind`.
      - `kind` 'swap' | 'network', required: Machine-readable fee form. `swap` — a swap-backed fee (the 1% DEX swap fee plus GRAM swap gas); `network` — network gas alone, for an order settled without a swap. Use it to choose your own wording for the fee.
      - `currency` 'usdt', required: The unit of the fee amounts (always `usdt`).
  - `usdt_per_ton` string, nullable, required: Indicative USDT per 1 GRAM (informational; the field name `usdt_per_ton` is frozen for wire compatibility; `null` if unavailable).
  - `quoted_at` string, date-time, required
  - `valid_until` string, date-time, required: Re-quote hint — prices are locked only at order creation.

## Other responses

- `400`: Malformed request (`bad_request`): a missing or invalid field, header or query parameter (the `message` names it), a malformed `cursor`, a body that is not valid JSON, or a body nested deeper than 64 levels. Send integer query parameters as plain decimal digits: the pricing, order, giveaway and series routes refuse any other spelling (a sign, decimal point, exponent, hex prefix or surrounding spaces) with a `400` naming the parameter. Fix the request; retrying it unchanged gets the same answer.
- `401`: Missing or invalid `X-Api-Key`.
- `403`: The API key is valid, but the tenant is suspended (for example after `/api_revoke` — run `/api_rotate` in the bot to restore access) or banned, or the product (campaigns, giveaways) is not enabled for it. Products are enabled per tenant on request. A source address blocked at our edge gets `403 forbidden` with the message `source blocked`, whatever the key.
- `422`: The request is well-formed but cannot be served: `recipient_ineligible` (order create: the recipient cannot receive the item, and no order is created), `product_not_available`, `currency_not_available` (the currency is not offered on this service; nothing is created), `channel_checks_failed` (with `checks`), `schedule_out_of_bounds` (with `bound` and `limit`) or `unprocessable`.
- `429`: A rate limit was reached (`rate_limited`). See **Rate limits** in the overview. Which `429`s carry headers: - **Per-minute buckets** — the general request budget, the order-lifecycle bucket, the pricing/recipient-check probe cap (60 req/min), the campaign bucket, and your giveaway read, write, quote and attestation buckets. Every answer metered by one carries `RateLimit-Policy`, `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds); a `429` adds `Retry-After` (seconds). - **Caps, no `Retry-After`** — the daily intake cap and the daily order cap on `POST /v1/orders` (UTC day), the per-recipient guard on unfinished orders to one `@username`, and the cap on live campaigns. These `429`s carry no `Retry-After`, but they do carry the `RateLimit-*` headers of the per-minute bucket the request passed (often with `RateLimit-Remaining` above zero): branch on `Retry-After`, never on `RateLimit-Remaining`. Back off; the daily intake and order caps clear at the next UTC midnight. - **The daily budget of ineligible-recipient refusals** on `POST /v1/orders` — its `429` carries `Retry-After` and `error.retry_after`, both the seconds until 00:00 UTC, when the budget resets, plus the `RateLimit-*` headers of the order bucket it passed. `error.retry_after` is what sets it apart from the other `429`s. While the budget's places are held only by your own checks still running, the create answers a short `429` instead: `Retry-After` of a few seconds and no `error.retry_after` — retry after `Retry-After`. - **The giveaway quote budget shared by all tenants** — its `429` carries `Retry-After` (seconds until the shared budget reopens) and the `RateLimit-*` headers of your own quote bucket, never figures for the shared budget. - **Edge throttle** — a coarse per-IP throttle in front of the API answers the same envelope with `Retry-After: 1` and no `RateLimit-*` headers.
- `503`: A required source was temporarily unavailable (`unavailable`): the price source, recipient eligibility that could not be verified right now, the payment check a cancel runs first, or (order create, rarely) no fulfilment capacity assigned to your tenant right now. The `message` is generic (`internal error`), so it does not say which: treat every `unavailable` as **retryable** — reuse the same `Idempotency-Key` and try again shortly. An app `503 unavailable` creates and cancels nothing and charges nothing. If `503 unavailable` on order create persists, contact support with the `X-Request-ID`. The edge's own `502`, `503` and `504` (the service restarting or timing out) answer the same envelope with `unavailable`, and may follow a request that did land: retry with the same `Idempotency-Key`, and an order create that landed is replayed, never duplicated. On the campaign, gift and giveaway routes a `503` may also be a gift catalog that cannot be read right now (`gift_catalog_unavailable` — retry later) or an option that is not enabled for your tenant yet (`prize_type_unavailable`, `partner_conditions_unavailable`, `antibot_enforce_unavailable`, `autopost_unavailable`, `series_unavailable` — do not retry, ask support); the `code` says which.

## Changes

- **2026-10-31** `9f589c4dd26b`: 124 warning, 46 info
  - added the new `antibot_enforce_unavailable` enum value to the `error/code` response property for the response status `400`
  - added the new `antibot_enforce_unavailable` enum value to the `error/code` response property for the response status `401`
  - added the new `antibot_enforce_unavailable` enum value to the `error/code` response property for the response status `429`
  - added the new `antibot_enforce_unavailable` enum value to the `error/code` response property for the response status `503`
  - …166 more
- **2026-09-28** `6ebdc05ab41d`: 1 breaking, 2 info
  - the `query` request parameter `payment_currency` became required
  - the `currency` response's property default value `ton` was removed for the status `200`
  - added the required property `quotes/items/fee/oneOf[#/components/schemas/FeeBreakdown]/kind` to the response with the `200` status

[Operation history](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/changes/v1/pricing/batch/get.md)

---

[API](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api.md) - [All operations](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mystars/apis/mystars-faas-fulfilment-api/revisions/b6cdc8aff8c2?raw)
