There’s no way to get historical data through the API.
If you want to get that data then you would need to keep track of it in real-time, such as by periodically polling the Get Streams endpoint and then calculating their hours streamed, viewer count, and things of that nature yourself.
For some data, such as sub count, you would need the broadcaster to grant you permissions to access their subscribers list, otherwise you would be limited to guessing sub counts based on subscription messages in chat but this results in VASTLY inaccurate sub counts which is why sites like twitchtracker which guess sub counts are not particularly useful.