Most LTM implementations use at least one floating self IP address for handling traffic routing through LTM. Only the active LTM unit will answer for floating self IP addresses. You might be able to use the floating self IP address (or one of them if you have multiple) to ensure you’re always connecting to the active unit.
I can only add that in case if you do decide to do it in iControl it is not that difficult to determine the active unit in the HA pair. Simply call System.Failover.get_failover_state() method. If it returns 1 (or FAILOVER_STATE_ACTIVE) the unit is Active