I'm fighting with the same issue. I'd desperately need to get the margin for a basket of several orders. Simply running WHAT_IF on each leg and then adding altogether doesn't give the correct result since the margin of one position is depending also on the other positions you hold.