get_stars_revenue_stats()¶
- async Client.get_stars_revenue_stats()¶
Get Telegram Stars revenue statistics and monetization status for a channel or bot.
Usable by Users Bots- Parameters:
chat_id (
int|str, optional) – Unique identifier (int) or username (str) of the target channel or bot. Defaults to None (the current account / “me”).dark (
bool, optional) – Pass True if the revenue graph should be styled for dark theme. Defaults to False.ton (
bool, optional) – Pass True to retrieve TON revenue statistics instead of Stars. Defaults to False.
- Returns:
StarsRevenueStats– On success, the stars revenue stats object is returned.
Example
# Get revenue stats for a channel stats = await app.get_stars_revenue_stats(chat_id="my_channel") print(f"Current Balance: {stats.status.current_balance} Stars") print(f"Available Balance: {stats.status.available_balance} Stars") print(f"Overall Revenue: {stats.status.overall_revenue} Stars") print(f"USD Exchange Rate: ${stats.usd_rate} per star") print(f"Withdrawal Enabled: {stats.status.withdrawal_enabled}")