Does the API provide a way of determining how many bits a user has given to a channel?

The Super Mario Maker app,, has the ability to check a user’s subscription status to the current channel, and prioritize their levels in the queue. I can’t afford to subscribe, but I can afford to watch ads and give bits to my favorite streamers, so I suggested to the dev that he might add a feature that takes bits into account when calculating priority.

Is there a way to know how many bits someone has given to a channel? Barring that, is there a way to get which bits badge they have?

I would assume not yet, because it isn’t listed in the documentation, but you can make the function calls for the user and channel to check possibly.

There is not an API for querying that information. You can determine which bits badge a user has by checking the badges tag on PRIVMSG when that user sends a message in chat.

@badges=staff/1,bits/1000; …

I believe you can also use the PubSub to see user stats when they send bits.

The page I am referring to is here.

The example given in that page is below and you will note the line ‘total_bits_used’ - you could use that to determine total bits provided. Using the badge is only useful for a general approximation, if the user even chooses to show it, and whenever they send a message vs when bits specifically are sent.

   "type": "MESSAGE",
   "data": {
      "topic": "channel-bitsevents.44322889",
      "message": {
         "user_name": "dallas",
         "channel_name": "twitch",
         "user_id": "44322889",
         "channel_id": "12826",
         "time": "2015-12-19T16:39:57-08:00",
         "chat_message": "Omg that baneling bust was Kreygasm cheer10 cheer10 cheer100",
         "bits_used": 120,
         "total_bits_used": 620,
         "context": "cheer"
1 Like

@Larklen is correct. You can get the total amount using the PubSub topic.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.