It's not that easy to get all current hashrate of each worker when using auto switching because workers jump coins while api call is targetted to each coin.
on
https://miningpoolhub.com/?page=account&action=balances I see balances of my each coins. So:
$uderID = 1234;
$userApiKey = 'asdasdasdasd';
foreach($coins_in_balances as $coin){
$json = getApiData('https://'.$coin.'.miningpoolhub.com/index.php?page=api&action=getuserworkers&'.$userApiKey.'=&id='.$uderID);
$dataArray = json_decode($json,true)['data'];
foreach($dataArray as $worker){
display_workers_data();
}
}