Fetch accumulated user stream monthly total

Channel statistics (such as those displayed on a channels dashboard) are not accessible through any official API endpoints. If you want the historical data that Twitch provides you’ll have to manually export the CSV from the stats dashboard and process that yourself to calculate total time streamed in a month.

Alternatively, if you would like to automate things with the API and get data going forward (this wont help if you want historical data) one way would be to poll the Get Streams endpoint and make notes of when when a stream started and stopped.

Another way would be to use Stream Changed webhook and just record stream starts/stops and ignore all other changes.

From there you can just sum the time between the sets of start/stop timestamps for a given month (or any time period you like). One point to note though is that the API uses caching, so as long as ~1 minute accuracy is sufficient for your needs then you’ll be fine, but if you need more precision then that you’ll have to use other undocumented ways, or ways external to Twitch to calculate more accurately.