def get_unspent_outputs(addresses, confirmations=None, limit=None, api_code=None):
if isinstance(addresses, basestring):<EOL><INDENT>resource = '<STR_LIT>' + addresses<EOL><DEDENT>else:<EOL><INDENT>resource = '<STR_LIT>' + '<STR_LIT:|>'.join(addresses)<EOL><DEDENT>if confirmations is not None:<EOL><INDENT>resource += '<STR_LIT>' + str(confirmations)<EOL><DEDENT>if limit is not None:<EOL><INDENT>resource += '<STR_LIT>' + str(limit)<EOL><DEDENT>if api_code is not None:<EOL><INDENT>resource += '<STR_LIT>' + api_code<EOL><DEDENT>response = util.call_api(resource)<EOL>json_response = json.loads(response)<EOL>return [UnspentOutput(o) for o in json_response['<STR_LIT>']]<EOL>
Get unspent outputs for a single address.

    :param tuple addresses: addresses(xpub or base58) to look up
    :param int confirmations: minimum confirmations to include (optional)
    :param int limit: limit number of unspent outputs to fetch (optional)
    :param str api_code: Blockchain.info API code (optional)
    :return: an array of :class:`UnspentOutput` objects