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

Method cancel_all_orders

python/ccxt/pacifica.py:1566–1597  ·  view source on GitHub ↗

cancel all open orders in a market https://docs.pacifica.fi/api-documentation/api/rest-api/orders/cancel-all-orders :param str symbol:(optional) unified market symbol of the market to cancel orders in. :param dict [params]: extra parameters specific to the exchange

(self, symbol: Str = None, params={})

Source from the content-addressed store, hash-verified

1564 return self.batch_orders_request(actions)
1565
1566 def cancel_all_orders(self, symbol: Str = None, params={}):
1567 """
1568 cancel all open orders in a market
1569
1570 https://docs.pacifica.fi/api-documentation/api/rest-api/orders/cancel-all-orders
1571
1572 :param str symbol:(optional) unified market symbol of the market to cancel orders in.
1573 :param dict [params]: extra parameters specific to the exchange API endpoint
1574 :param boolean [params.excludeReduceOnly]: whether to exclude reduce-only orders
1575 :param int [params.expiryWindow]: time to live in milliseconds
1576 :returns dict[]: a list of `order structures <https://docs.ccxt.com/?id=order-structure>`
1577 """
1578 self.load_markets()
1579 self.initialize_client()
1580 request = self.cancel_all_orders_request(symbol, params)
1581 params = self.omit(params, ['excludeReduceOnly', 'expiryWindow'])
1582 response = self.privatePostOrdersCancelAll(self.extend(request, params))
1583 #
1584 # {
1585 # success: True,
1586 # data: {
1587 # "cancelled_count": 5,
1588 # },
1589 # code: null,
1590 # error: null
1591 # }
1592 #
1593 return [
1594 self.safe_order({
1595 'info': response,
1596 }),
1597 ]
1598
1599 def cancel_all_orders_request(self, symbol: Str, params={}):
1600 operationType = 'cancel_all_orders'

Callers

nothing calls this directly

Calls 7

initialize_clientMethod · 0.95
safe_orderMethod · 0.80
load_marketsMethod · 0.45
omitMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected