Note: The Get Hype Train Events endpoint is deprecated and will be removed January 15, 2026. Use EventSub for real-time hype train events instead.
GetHypeTrainEvents
Get the broadcaster’s hype train events.
Requires: channel:read:hype_train scope
DEPRECATED: This endpoint is deprecated. Use EventSub instead.
resp, err := client.GetHypeTrainEvents(ctx, &helix.GetHypeTrainEventsParams{
BroadcasterID: "270954519",
PaginationParams: &helix.PaginationParams{
First: 20,
},
})
if err != nil {
log.Fatal(err)
}
for _, event := range resp.Data {
fmt.Printf("Event: %s (%s)\n", event.ID, event.EventType)
fmt.Printf("Hype Train Level: %d\n", event.EventData.Level)
fmt.Printf("Progress: %d / %d\n", event.EventData.Total, event.EventData.Goal)
fmt.Printf("Started: %s, Expires: %s\n", event.EventData.StartedAt, event.EventData.ExpiresAt)
}
// Paginate through more results
if resp.Pagination != nil && resp.Pagination.Cursor != "" {
resp, err = client.GetHypeTrainEvents(ctx, &helix.GetHypeTrainEventsParams{
BroadcasterID: "270954519",
PaginationParams: &helix.PaginationParams{
After: resp.Pagination.Cursor,
},
})
}
Parameters:
BroadcasterID(string): The ID of the broadcasterPaginationParams.First(int, optional): Maximum number of results (1-100)PaginationParams.After(string, optional): Cursor for forward pagination
Response Fields:
ID(string): Event IDEventType(string): Type of event (e.g.,hypetrain.progression)EventTimestamp(time.Time): When the event occurredVersion(string): Event versionEventData.ID(string): Hype train IDEventData.BroadcasterID(string): Broadcaster’s user IDEventData.Level(int): Current level of the hype trainEventData.Total(int): Total points contributedEventData.Goal(int): Points needed to reach the next levelEventData.StartedAt(time.Time): When the hype train startedEventData.ExpiresAt(time.Time): When the hype train expiresEventData.CooldownEndTime(time.Time): When a new hype train can startEventData.LastContribution(HypeTrainContribution): Most recent contributionEventData.TopContributions([]HypeTrainContribution): Top contributors
Sample Response (from Twitch docs):
{
"data": [
{
"id": "1b0AsbInCHZW2SQFQkCzqN07Ib2",
"event_type": "hypetrain.progression",
"event_timestamp": "2020-04-24T20:07:24Z",
"version": "1.0",
"event_data": {
"broadcaster_id": "270954519",
"cooldown_end_time": "2020-04-24T20:13:21.003802269Z",
"expires_at": "2020-04-24T20:12:21.003802269Z",
"goal": 1800,
"id": "70f0c7d8-ff60-4c50-b138-f3a352833b50",
"last_contribution": {
"total": 200,
"type": "BITS",
"user": "134247454"
},
"level": 2,
"started_at": "2020-04-24T20:05:47.30473127Z",
"top_contributions": [
{
"total": 600,
"type": "BITS",
"user": "134247450"
}
],
"total": 600
}
}
],
"pagination": {
"cursor": "eyJiIjpudWxsLCJhIjp7IkN1cnNvciI6IjI3MDk1NDUxOToxNTg3NzU4ODQ0OjFiMEFzYkluQ0haVzJTUUZRa0N6cU4wN0liMiJ9fQ"
}
}
GetHypeTrainStatus
Get the current hype train status for a broadcaster’s channel. Returns nil if no hype train is active.
Requires: channel:read:hype_train scope
status, err := client.GetHypeTrainStatus(ctx, "270954519")
if err != nil {
log.Fatal(err)
}
if status == nil {
fmt.Println("No active hype train")
return
}
fmt.Printf("Hype Train Level: %d\n", status.Level)
fmt.Printf("Progress: %d / %d\n", status.Total, status.Goal)
fmt.Printf("Started: %s, Expires: %s\n", status.StartedAt, status.ExpiresAt)
fmt.Printf("Last contribution: %s (%d %s)\n",
status.LastContribution.User,
status.LastContribution.Total,
status.LastContribution.Type)
fmt.Println("Top Contributors:")
for _, contrib := range status.TopContributions {
fmt.Printf(" %s: %d (%s)\n", contrib.User, contrib.Total, contrib.Type)
}
Parameters:
broadcasterID(string): The ID of the broadcaster
Response Fields:
ID(string): Hype train IDBroadcasterID(string): Broadcaster’s user IDLevel(int): Current level of the hype trainTotal(int): Total points contributed to the hype trainGoal(int): Points needed to reach the next levelTopContributions([]HypeTrainContribution): List of top contributorsLastContribution(HypeTrainContribution): Most recent contributionStartedAt(time.Time): When the hype train startedExpiresAt(time.Time): When the hype train expiresCooldownEndTime(time.Time): When a new hype train can start
HypeTrainContribution Fields:
Total(int): Contribution amountType(string): Contribution type (BITS,SUBS,OTHER)User(string): User ID of the contributor
Sample Response (based on Twitch docs):
{
"data": [
{
"id": "70f0c7d8-ff60-4c50-b138-f3a352833b50",
"broadcaster_id": "270954519",
"level": 2,
"total": 600,
"goal": 1800,
"top_contributions": [
{
"total": 600,
"type": "BITS",
"user": "134247450"
}
],
"last_contribution": {
"total": 200,
"type": "BITS",
"user": "134247454"
},
"started_at": "2020-04-24T20:05:47.30473127Z",
"expires_at": "2020-04-24T20:12:21.003802269Z",
"cooldown_end_time": "2020-04-24T20:13:21.003802269Z"
}
]
}
EventSub Alternative
For real-time hype train events, use EventSub subscriptions instead of polling the deprecated API:
channel.hype_train.begin- Hype train startschannel.hype_train.progress- Hype train level increaseschannel.hype_train.end- Hype train ends See EventSub documentation for more details.