edit a trade order, gate currently only supports the modification of the price or amount fields https://www.gate.io/docs/developers/apiv4/ws/en/#order-amend https://www.gate.io/docs/developers/futures/ws/en/#order-amend :param str id: order id :param str sy
(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={})
| 270 | return self.parse_order(res, market) |
| 271 | |
| 272 | async def edit_order_ws(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}): |
| 273 | """ |
| 274 | edit a trade order, gate currently only supports the modification of the price or amount fields |
| 275 | |
| 276 | https://www.gate.io/docs/developers/apiv4/ws/en/#order-amend |
| 277 | https://www.gate.io/docs/developers/futures/ws/en/#order-amend |
| 278 | |
| 279 | :param str id: order id |
| 280 | :param str symbol: unified symbol of the market to create an order in |
| 281 | :param str type: 'market' or 'limit' |
| 282 | :param str side: 'buy' or 'sell' |
| 283 | :param float amount: how much of the currency you want to trade in units of the base currency |
| 284 | :param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders |
| 285 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 286 | :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 287 | """ |
| 288 | await self.load_markets() |
| 289 | market = self.market(symbol) |
| 290 | extendedRequest = self.edit_order_request(id, symbol, type, side, amount, price, params) |
| 291 | messageType = self.get_type_by_market(market) |
| 292 | channel = messageType + '.order_amend' |
| 293 | url = self.get_url_by_market(market) |
| 294 | await self.authenticate(url, messageType) |
| 295 | rawOrder = await self.request_private(url, extendedRequest, channel) |
| 296 | return self.parse_order(rawOrder, market) |
| 297 | |
| 298 | async def fetch_order_ws(self, id: str, symbol: Str = None, params={}): |
| 299 | """ |
nothing calls this directly
no test coverage detected