Giveaways

Quote a giveaway

Changed on

The price of funding a giveaway at your wholesale terms: amount in currency (and its USD value) for winner_count prize slots. The quote applies the same bounds a create applies, so a quoted giveaway is a creatable one. A gift prize names its gift_id (one gift per winner). usdt_ton answers 422 currency_not_available while USDT funding is not offered (as a campaign does).

get/v1/giveaways/quote

Request

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

Query parameters

prize_type'stars' | 'premium' | 'gift' required

stars (Stars per winner), premium (Premium months per winner) or gift (one star gift per winner).

prize_quantity_per_winnerinteger required

Stars per winner (50–1,000,000), Premium months per winner (3, 6 or 12 today), or 1 for a gift — the bounds of CreateGiveawayRequest, with the same 400 refusals.

winner_countinteger required
currency'ton' | 'usdt_ton'
gift_idstring

The star gift, for prize_type=gift.

Response

The quote.

prize_type'stars' | 'premium' | 'gift' required

stars (Stars per winner), premium (Premium months per winner) or gift (one star gift per winner).

prize_quantity_per_winnerinteger required
winner_countinteger required
slotsinteger required

Prize slots funded.

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.

amountstring required

The total to fund, decimal string in currency.

amount_usdstring required

Changes