(id, symbol, type, side, amount, price, market, params = {})
| 1781 | return this.safeOrder({ 'id': orderId, 'info': response, 'symbol': symbol }); |
| 1782 | } |
| 1783 | editOrderRequest(id, symbol, type, side, amount, price, market, params = {}) { |
| 1784 | if (amount === undefined) { |
| 1785 | throw new ArgumentsRequired(this.id + ' editOrder() requires an amount!'); |
| 1786 | } |
| 1787 | if (price === undefined) { |
| 1788 | throw new ArgumentsRequired(this.id + ' editOrder() requires a price'); |
| 1789 | } |
| 1790 | const operationType = 'edit_order'; |
| 1791 | const clientOrderId = this.safeString(params, 'clientOrderId'); |
| 1792 | const priceNormalized = this.priceToPrecision(symbol, price); |
| 1793 | const amountNormalized = this.amountToPrecision(symbol, amount); |
| 1794 | const sigPayload = { |
| 1795 | 'symbol': this.safeString(market, 'id'), |
| 1796 | 'price': priceNormalized, |
| 1797 | 'amount': amountNormalized, |
| 1798 | }; |
| 1799 | if ((clientOrderId === undefined) && (id === undefined)) { |
| 1800 | throw new ArgumentsRequired('this.id' + 'editOrder() requires either "id" or "clientOrderId"'); |
| 1801 | } |
| 1802 | if (clientOrderId !== undefined) { |
| 1803 | sigPayload['client_order_id'] = clientOrderId; |
| 1804 | } |
| 1805 | else { |
| 1806 | sigPayload['order_id'] = this.parseToInt(id); |
| 1807 | } |
| 1808 | const request = this.postActionRequest(operationType, sigPayload, params); |
| 1809 | return request; |
| 1810 | } |
| 1811 | /** |
| 1812 | * @method |
| 1813 | * @name pacifica#fetchFundingRateHistory |
no test coverage detected