@classmethod
def broadcast_tx(cls, tx_hex):
    """Broadcasts a transaction to the blockchain.

        :param tx_hex: A signed transaction in hex form.
        :type tx_hex: ``str``
        :raises ConnectionError: If all API services fail.
        """
    success = None
    for api_call in cls.BROADCAST_TX_MAIN:
        try:
            success = api_call(tx_hex)
            if not success:
                continue
            return
        except cls.IGNORED_ERRORS:
            pass
    if success is False:
        raise ConnectionError(
            'Transaction broadcast failed, or Unspents were already used.')
    raise ConnectionError('All APIs are unreachable.')
