MCPcopy Create free account
hub / github.com/ccxt/ccxt / editOrder

Method editOrder

ts/src/cryptocom.ts:1676–1682  ·  view source on GitHub ↗

* @method * @name cryptocom#editOrder * @description edit a trade order * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-amend-order * @param {string} id order id * @param {string} symbol unified market symbol of the order to edit * @param

(id: string, symbol: string, type: OrderType, side: OrderSide, amount: Num = undefined, price: Num = undefined, params = {})

Source from the content-addressed store, hash-verified

1674 * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
1675 */
1676 async editOrder (id: string, symbol: string, type: OrderType, side: OrderSide, amount: Num = undefined, price: Num = undefined, params = {}) {
1677 await this.loadMarkets ();
1678 const request = this.editOrderRequest (id, symbol, (amount as number), price, params);
1679 const response = await this.v1PrivatePostPrivateAmendOrder (request);
1680 const result = this.safeDict (response, 'result', {});
1681 return this.parseOrder (result as Dict);
1682 }
1683
1684 editOrderRequest (id: string, symbol: string, amount: number, price: Num = undefined, params = {}) {
1685 const request: Dict = {};

Callers

nothing calls this directly

Calls 5

editOrderRequestMethod · 0.95
parseOrderMethod · 0.95
loadMarketsMethod · 0.45
safeDictMethod · 0.45

Tested by

no test coverage detected