def get_xpub(xpub, filter=None, limit=None, offset=None, api_code=None):
    """Get data for a single xpub including balance and list of relevant transactions.

    :param str xpub: address(xpub) to look up
    :param FilterType filter: the filter for transactions selection (optional)
    :param int limit: limit number of transactions to fetch (optional)
    :param int offset: number of transactions to skip when fetch (optional)
    :param str api_code: Blockchain.info API code (optional)
    :return: an instance of :class:`Xpub` class
    """

    resource = 'multiaddr?active=' + xpub
    if filter is not None:
        if isinstance(filter, FilterType):
            resource += '&filter=' + str(filter.value)
        else:
            raise ValueError('Filter must be of FilterType enum')
    if limit is not None:
        resource += '&limit=' + str(limit)
    if offset is not None:
        resource += '&offset=' + str(offset)
    if api_code is not None:
        resource += '&api_code=' + api_code
    response = util.call_api(resource)
    json_response = json.loads(response)
    return Xpub(json_response)
Get data for a single xpub including balance and list of relevant transactions.

    :param str xpub: address(xpub) to look up
    :param FilterType filter: the filter for transactions selection (optional)
    :param int limit: limit number of transactions to fetch (optional)
    :param int offset: number of transactions to skip when fetch (optional)
    :param str api_code: Blockchain.info API code (optional)
    :return: an instance of :class:`Xpub` class