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

Method cancelOrderRequest

js/src/pacifica.js:1726–1748  ·  view source on GitHub ↗
(id, symbol = undefined, params = {})

Source from the content-addressed store, hash-verified

1724 return this.safeOrder({ 'id': id, 'status': status, 'info': response, 'symbol': symbol });
1725 }
1726 cancelOrderRequest(id, symbol = undefined, params = {}) {
1727 const market = this.market(symbol);
1728 const isStopOrder = this.safeBool2(params, 'trigger', 'stop', false);
1729 let operationType = undefined;
1730 if (isStopOrder) {
1731 operationType = 'cancel_stop_order';
1732 }
1733 else {
1734 operationType = 'cancel_order';
1735 }
1736 const clientOrderId = this.safeString(params, 'clientOrderId');
1737 const sigPayload = {
1738 'symbol': market['id'],
1739 };
1740 if (clientOrderId !== undefined) {
1741 sigPayload['client_order_id'] = clientOrderId;
1742 }
1743 else {
1744 sigPayload['order_id'] = this.parseToInt(id);
1745 }
1746 const request = this.postActionRequest(operationType, sigPayload, params);
1747 return request;
1748 }
1749 /**
1750 * @method
1751 * @name pacifica#editOrder

Callers 3

cancelOrdersRequestMethod · 0.95
cancelOrderMethod · 0.95
cancelOrderWsMethod · 0.95

Calls 5

postActionRequestMethod · 0.95
marketMethod · 0.45
safeBool2Method · 0.45
safeStringMethod · 0.45
parseToIntMethod · 0.45

Tested by

no test coverage detected