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

Method editOrderWs

ts/src/pro/cryptocom.ts:1119–1128  ·  view source on GitHub ↗

* @method * @name cryptocom#editOrderWs * @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 * @para

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

Source from the content-addressed store, hash-verified

1117 * @returns {object} an [order structure]{@link https://docs.ccxt.com/?id=order-structure}
1118 */
1119 async editOrderWs (id: string, symbol: string, type: OrderType, side: OrderSide, amount: Num = undefined, price: Num = undefined, params = {}): Promise<Order> {
1120 await this.loadMarkets ();
1121 params = this.editOrderRequest (id, symbol, amount, price, params);
1122 const request: Dict = {
1123 'method': 'private/amend-order',
1124 'params': params,
1125 };
1126 const messageHash = this.nonce ();
1127 return await this.watchPrivateRequest (messageHash, request);
1128 }
1129
1130 handleOrder (client: Client, message) {
1131 //

Callers

nothing calls this directly

Calls 4

editOrderRequestMethod · 0.95
nonceMethod · 0.95
watchPrivateRequestMethod · 0.95
loadMarketsMethod · 0.45

Tested by

no test coverage detected