edit a trade order https://docs.pacifica.fi/api-documentation/api/rest-api/orders/edit-order :param str id: edit order id :param str symbol: unified symbol of the market to edit an order in :param str type: 'market' or 'limit' WARN is not usable! :p
(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={})
| 1668 | return request |
| 1669 | |
| 1670 | def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}): |
| 1671 | """ |
| 1672 | edit a trade order |
| 1673 | |
| 1674 | https://docs.pacifica.fi/api-documentation/api/rest-api/orders/edit-order |
| 1675 | |
| 1676 | :param str id: edit order id |
| 1677 | :param str symbol: unified symbol of the market to edit an order in |
| 1678 | :param str type: 'market' or 'limit' WARN is not usable! |
| 1679 | :param str side: 'buy' or 'sell' WARN is not usable! |
| 1680 | :param float amount: how much of currency you want to trade in units of base currency |
| 1681 | :param float price: the price at which the order is to be fulfilled, in units of the quote currency |
| 1682 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1683 | :param str [params.clientOrderId]: client order id,(optional uuid v4 e.g.: f47ac10b-58cc-4372-a567-0e02b2c3d479) |
| 1684 | :param int [params.expiryWindow]: time to live in milliseconds |
| 1685 | :returns dict: an `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 1686 | """ |
| 1687 | self.load_markets() |
| 1688 | self.initialize_client() |
| 1689 | market = self.market(symbol) |
| 1690 | request = self.edit_order_request(id, symbol, type, side, amount, price, market, params) |
| 1691 | params = self.omit(params, ['expiryWindow', 'clientOrderId']) |
| 1692 | response = self.privatePostOrdersEdit(self.extend(request, params)) |
| 1693 | # |
| 1694 | # { |
| 1695 | # 'data': { |
| 1696 | # "order_id": 123498765 |
| 1697 | # } |
| 1698 | # } |
| 1699 | # |
| 1700 | data = self.safe_dict(response, 'data', {}) |
| 1701 | orderId = self.safe_string(data, 'order_id') |
| 1702 | return self.safe_order({'id': orderId, 'info': response, 'symbol': symbol}) |
| 1703 | |
| 1704 | def edit_order_request(self, id: str, symbol: str, type: str, side: str, amount: Num, price: Num, market: Market, params={}): |
| 1705 | if amount is None: |
nothing calls this directly
no test coverage detected