def parse_transaction(self, transaction, currency=None):
    id = self.safe_string(transaction, 'id')
    address = self.safe_string(transaction, 'address')
    tag = self.safe_string(transaction, 'tag')
    if (tag is not None):
        if (len(tag) < 1):
            tag = None
    txid = self.safe_value(transaction, 'txid')
    currencyId = self.safe_string(transaction, 'code')
    code = self.safe_currency_code(currencyId, currency)
    timestamp = self.safe_integer(transaction, 'timestamp')
    datetime = self.safe_string(transaction, 'datetime')
    type = self.safe_string(transaction, 'type')
    status = self.parse_transaction_status(self.safe_string(transaction, 'status'))
    amount = self.safe_number(transaction, 'amount')
    feeInfo = self.safe_value(transaction, 'fee')
    feeCost = self.safe_number(feeInfo, 'cost')
    feeCurrencyId = self.safe_string(feeInfo, 'code')
    feeCode = self.safe_currency_code(feeCurrencyId, currency)
    fee = {'cost': feeCost, 'currency': feeCode}
    return {'info': transaction, 'id': id, 'txid': txid, 'timestamp': timestamp, 'datetime': datetime, 'address': address, 'tag': tag, 'type': type, 'amount': amount, 'currency': code, 'status': status, 'updated': None, 'fee': fee}
def parse_transaction(self, transaction, currency=None):
    id = self.safe_string(transaction, 'id')
    address = self.safe_string(transaction, 'address')
    tag = self.safe_string(transaction, 'tag')
    if (tag is not None):
        if (len(tag) < 1):
            tag = None
    txid = self.safe_value(transaction, 'txid')
    currencyId = self.safe_string(transaction, 'code')
    code = self.safe_currency_code(currencyId, currency)
    timestamp = self.safe_integer(transaction, 'timestamp')
    datetime = self.safe_string(transaction, 'datetime')
    type = self.safe_string(transaction, 'type')
    status = self.parse_transaction_status(self.safe_string(transaction, 'status'))
    amount = self.safe_number(transaction, 'amount')
    feeInfo = self.safe_value(transaction, 'fee')
    feeCost = self.safe_number(feeInfo, 'cost')
    feeCurrencyId = self.safe_string(feeInfo, 'code')
    feeCode = self.safe_currency_code(feeCurrencyId, currency)
    fee = {'cost': feeCost, 'currency': feeCode}
    return {'info': transaction, 'id': id, 'txid': txid, 'timestamp': timestamp, 'datetime': datetime, 'address': address, 'tag': tag, 'type': type, 'amount': amount, 'currency': code, 'status': status, 'updated': None, 'fee': fee}