Skip to content
twitch.apiv2.0

Reference / API groups

twitch.hypeTrain

Hype Train: the current train and the channel records.

Every method of twitch.hypeTrain, with its parameters, what it returns and the token it needs.

twitch.hypeTrain.status(params?, options?): Promise<HypeTrainStatus>

Gets the Hype Train running on a channel, if any, along with the records of the channel.

Token: user, scope channel:read:hype_train.

NameTypeDescription
broadcaster_idstringBroadcaster whose Hype Train to read. Defaults to the user making the call.

options: Request options for this call: as, token, signal, timeout, retries.

Promise<HypeTrainStatus>

Fields of HypeTrainStatus
NameTypeDescription
currentHypeTrain | nullThe train in progress, or null when none is running.
all_time_highHypeTrainRecord | nullRecord of the channel on its own trains, or null when it never had one.
shared_all_time_highHypeTrainRecord | nullRecord of the channel on shared trains, or null when it never had one.
const { current, all_time_high } = await twitch.hypeTrain.status();
if (current) console.log(`Level ${current.level}: ${current.progress} / ${current.goal}`);

Twitch reference