def calculate_fee(self, symbol, type, side, amount, price, takerOrMaker='taker', params={}):
    market = self.markets[symbol]
    rate = market[takerOrMaker]
    cost = float(self.cost_to_precision(symbol, (amount * price)))
    return {'rate': rate, 'type': takerOrMaker, 'currency': market['quote'], 'cost': float(self.fee_to_precision(symbol, (rate * cost)))}
def calculate_fee(self, symbol, type, side, amount, price, takerOrMaker='taker', params={}):
    market = self.markets[symbol]
    rate = market[takerOrMaker]
    cost = float(self.cost_to_precision(symbol, (amount * price)))
    return {'rate': rate, 'type': takerOrMaker, 'currency': market['quote'], 'cost': float(self.fee_to_precision(symbol, (rate * cost)))}