async def edit_order(self, id, symbol, type, side, amount=None, price=None, params={}):
    (await self.load_markets())
    market = self.market(symbol)
    request = {}
    amountRemaining = self.safe_number(params, 'amountRemaining')
    params = self.omit(params, 'amountRemaining')
    if (price is not None):
        request['price'] = self.price_to_precision(symbol, price)
    if (amount is not None):
        request['amount'] = self.amount_to_precision(symbol, amount)
    if (amountRemaining is not None):
        request['amountRemaining'] = self.amount_to_precision(symbol, amountRemaining)
    request = self.extend(request, params)
    if request:
        request['orderId'] = id
        request['market'] = market['id']
        response = (await self.privatePutOrder(self.extend(request, params)))
        return self.parse_order(response, market)
    else:
        raise ArgumentsRequired((self.id + ' editOrder() requires an amount argument, or a price argument, or non-empty params'))
async def edit_order(self, id, symbol, type, side, amount=None, price=None, params={}):
    (await self.load_markets())
    market = self.market(symbol)
    request = {}
    amountRemaining = self.safe_number(params, 'amountRemaining')
    params = self.omit(params, 'amountRemaining')
    if (price is not None):
        request['price'] = self.price_to_precision(symbol, price)
    if (amount is not None):
        request['amount'] = self.amount_to_precision(symbol, amount)
    if (amountRemaining is not None):
        request['amountRemaining'] = self.amount_to_precision(symbol, amountRemaining)
    request = self.extend(request, params)
    if request:
        request['orderId'] = id
        request['market'] = market['id']
        response = (await self.privatePutOrder(self.extend(request, params)))
        return self.parse_order(response, market)
    else:
        raise ArgumentsRequired((self.id + ' editOrder() requires an amount argument, or a price argument, or non-empty params'))