payments.StarsRevenueStats

class pyrogram.raw.types.payments.StarsRevenueStats

Star revenue statistics, see here » for more info.

Constructor of StarsRevenueStats.

Details:
  • Layer: 227

  • ID: 6C207376

Parameters:
  • revenue_graph (StatsGraph) – Star revenue graph (number of earned stars)

  • status (StarsRevenueStatus) – Current balance, current withdrawable balance and overall earned Telegram Stars

  • usd_rate (float 64-bit) – Current conversion rate of Telegram Stars to USD

  • top_hours_graph (StatsGraph, optional) – For ad revenue statistics, ad impressions graph

Functions:

This object can be returned by 1 function.

payments.GetStarsRevenueStats

Get Telegram Star revenue statistics ».

TL Schema

payments.starsRevenueStats#6c207376
flags:#
top_hours_graph:flags.0?StatsGraph
revenue_graph:StatsGraph
status:StarsRevenueStatus
usd_rate:double

= payments.StarsRevenueStats

Parameter Tree

StarsRevenueStats
├── top_hours_graph → StatsGraph (optional)
│ ├── StatsGraphAsync
│ │ └── token → string
│ ├── StatsGraphError
│ │ └── error → string
│ └── StatsGraph
│ ├── json → DataJSON
│ │ └── DataJSON
│ │ └── data → string
│ └── zoom_token → string (optional)
├── revenue_graph → StatsGraph
│ ├── StatsGraphAsync
│ │ └── token → string
│ ├── StatsGraphError
│ │ └── error → string
│ └── StatsGraph
│ ├── json → DataJSON
│ │ └── DataJSON
│ │ └── data → string
│ └── zoom_token → string (optional)
├── status → StarsRevenueStatus
│ └── StarsRevenueStatus
│ ├── withdrawal_enabled → true (optional)
│ ├── current_balance → StarsAmount
│ │ ├── StarsAmount
│ │ │ ├── amount → long
│ │ │ └── nanos → int
│ │ └── StarsTonAmount
│ │ └── amount → long
│ ├── available_balance → StarsAmount
│ │ ├── StarsAmount
│ │ │ ├── amount → long
│ │ │ └── nanos → int
│ │ └── StarsTonAmount
│ │ └── amount → long
│ ├── overall_revenue → StarsAmount
│ │ ├── StarsAmount
│ │ │ ├── amount → long
│ │ │ └── nanos → int
│ │ └── StarsTonAmount
│ │ └── amount → long
│ └── next_withdrawal_at → int (optional)
└── usd_rate → double

Example

StarsRevenueStats(
    revenue_graph=StatsGraphAsync(token="text"),
    status=StarsRevenueStatus(
        current_balance=StarsAmount(
            amount=0,
            nanos=0
        ),
        available_balance=StarsAmount(
            amount=0,
            nanos=0
        ),
        overall_revenue=StarsAmount(
            amount=0,
            nanos=0
        )
    ),
    usd_rate=0.0,
)