def parse_transaction(self, transaction, currency=None):
    id = None
    timestamp = self.safe_integer(transaction, 'timestamp')
    currencyId = self.safe_string(transaction, 'symbol')
    code = self.safe_currency_code(currencyId, currency)
    status = self.parse_transaction_status(self.safe_string(transaction, 'status'))
    amount = self.safe_number(transaction, 'amount')
    address = self.safe_string(transaction, 'address')
    txid = self.safe_string(transaction, 'txId')
    fee = None
    feeCost = self.safe_number(transaction, 'fee')
    if (feeCost is not None):
        fee = {'cost': feeCost, 'currency': code}
    type = None
    if (('success' in transaction) or ('address' in transaction)):
        type = 'withdrawal'
    else:
        type = 'deposit'
    tag = self.safe_string(transaction, 'paymentId')
    return {'info': transaction, 'id': id, 'txid': txid, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'addressFrom': None, 'address': address, 'addressTo': address, 'tagFrom': None, 'tag': tag, 'tagTo': tag, 'type': type, 'amount': amount, 'currency': code, 'status': status, 'updated': None, 'fee': fee}
def parse_transaction(self, transaction, currency=None):
    id = None
    timestamp = self.safe_integer(transaction, 'timestamp')
    currencyId = self.safe_string(transaction, 'symbol')
    code = self.safe_currency_code(currencyId, currency)
    status = self.parse_transaction_status(self.safe_string(transaction, 'status'))
    amount = self.safe_number(transaction, 'amount')
    address = self.safe_string(transaction, 'address')
    txid = self.safe_string(transaction, 'txId')
    fee = None
    feeCost = self.safe_number(transaction, 'fee')
    if (feeCost is not None):
        fee = {'cost': feeCost, 'currency': code}
    type = None
    if (('success' in transaction) or ('address' in transaction)):
        type = 'withdrawal'
    else:
        type = 'deposit'
    tag = self.safe_string(transaction, 'paymentId')
    return {'info': transaction, 'id': id, 'txid': txid, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'addressFrom': None, 'address': address, 'addressTo': address, 'tagFrom': None, 'tag': tag, 'tagTo': tag, 'type': type, 'amount': amount, 'currency': code, 'status': status, 'updated': None, 'fee': fee}