Cancel an open order by ID (64 hexadecmial characters).

        :param order_id: Order ID.
        :type order_id: str | unicode
        :return: True if the order was cancelled successfully.
        :rtype: bool
193070
def cancel_order(self, order_id):
        
        self._log('cancel order {}'.format(order_id))
        result = self._rest_client.post(
            endpoint='/cancel_order',
            payload={'id': order_id}
        )
        return result == 'true'
1259752
def batchcancel_order(self, order_ids: list):
        
        assert isinstance(order_ids, list)
        params = {'order-ids': order_ids}
        path = f'/v1/order/orders/batchcancel'

        def _wrapper(_func):
            @wraps(_func)
            def handle():
                _func(api_key_post(params, path))

            return handle

        return _wrapper
297470
def delete_orderrun(self, orderrun_id):
        
        rc = DKReturnCode()
        if orderrun_id == 'good':
            rc.set(rc.DK_SUCCESS, None, None)
        else:
            rc.set(rc.DK_FAIL, 'ServingDeleteV2: unable to delete OrderRun')
        return rc
797440
def get_order_info(self, order_id, _async=False):
        
        params = {}
        path = f'/v1/order/orders/{order_id}'
        return api_key_get(params, path, _async=_async)
1294056
@Override
  public boolean cancelOrder(String orderId) throws IOException {
    CurrencyPair cp =
        (CurrencyPair)
            exchange
                .getExchangeSpecification()
                .getExchangeSpecificParameters()
                .get(TheRockExchange.CURRENCY_PAIR);
    if (cp == null) {
      throw new ExchangeException("Provide TheRockCancelOrderParams with orderId and currencyPair");
    }

    return cancelOrder(cp, orderId);
  }
407758
@Override
  public boolean cancelOrder(String orderId) throws IOException {

    String[] pairAndId = orderId.split(":");

    mercadoBitcoinCancelOrder(pairAndId[0], pairAndId[1]);

    return true;
  }
1206055
def order_executed(self, orderDict):
        '''  '''
        for orderId, order in orderDict.items():
            if order.security in self.__trakers.keys():
                self.__trakers[order.security].orderExecuted(orderId)
154644
def follow_request_reject(self, id):
        
        id = self.__unpack_id(id)
        url = '/api/v1/follow_requests/{0}/reject'.format(str(id))
        self.__api_request('POST', url)
661783
def get_order_matchresults(self, order_id, _async=False):
        
        params = {}
        path = f'/v1/order/orders/{order_id}/matchresults'
        return api_key_get(params, path, _async=_async)
1114094
def refund_id=(refund_id)
      if refund_id.nil?
        fail ArgumentError, "refund_id cannot be nil"
      end

      if refund_id.to_s.length < 1
        fail ArgumentError, "invalid value for 'refund_id', the character length must be great than or equal to 1."
      end

      @refund_id = refund_id
    end
575469
def cancel_invoice(self, invoice_id):
        
        return self._create_put_request(
            resource=INVOICES,
            billomat_id=invoice_id,
            command=CANCEL,
        )
837487
def cancelOrder(self, order: Order) -> Trade:
        
        self.client.cancelOrder(order.orderId)
        now = datetime.datetime.now(datetime.timezone.utc)
        key = self.wrapper.orderKey(
            order.clientId, order.orderId, order.permId)
        trade = self.wrapper.trades.get(key)
        if trade:
            if not trade.isDone():
                status = trade.orderStatus.status
                if (status == OrderStatus.PendingSubmit and not order.transmit
                        or status == OrderStatus.Inactive):
                    newStatus = OrderStatus.Cancelled
                else:
                    newStatus = OrderStatus.PendingCancel
                logEntry = TradeLogEntry(now, newStatus, '')
                trade.log.append(logEntry)
                trade.orderStatus.status = newStatus
                self._logger.info(f'cancelOrder: {trade}')
                trade.cancelEvent.emit(trade)
                trade.statusEvent.emit(trade)
                self.cancelOrderEvent.emit(trade)
                self.orderStatusEvent.emit(trade)
                if newStatus == OrderStatus.Cancelled:
                    trade.cancelledEvent.emit(trade)
        else:
            self._logger.error(f'cancelOrder: Unknown orderId {order.orderId}')
        return trade
1030488
public function trigger( $order_id ) {
		$order = wc_get_order( $order_id );
		if ( ! $order || ! $this->is_enabled() ) {
			return;
		}
		$reason = get_post_meta( $order->id, '_hametwoo_cancel_reason', true );
		if ( ! $reason ) {
			// Don't send with no reason.
			return;
		}
		$this->object = $order;
		$this->recipient = $this->object->billing_email;
		// Is html?
		foreach ( [
			'order_number' => $order->get_order_number(),
		    'order_date'   => date_i18n( get_option( 'date_format' ) ),
		] as $find => $result ) {
			$this->find[ $find ] = "{{$find}}";
			$this->replace[ $find ] = $result;
		}
		$this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
	}
1009812
public function cancelOrder(int $orderId, bool $mapping = false)
    {
        $options = ['form_params' => ['id' => $orderId]];
        $response = $this->sendRequest(Api::POST, $this->getApiUrn(['order', 'delete']), $options);

        if ($mapping) {
            $response = $this->deserializeItem($response, Order::class);
        }

        return $response;
    }
1085815
def cancel_id(cls, id):
        
        conn = Qubole.agent()
        data = {"status": "kill"}
        return conn.put(cls.element_path(id), data)
860217
def id(self, id):
        

        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")
        if len(id) > 255:
            raise ValueError("Invalid value for `id`, length must be less than `255`")

        self._id = id
950062
def cancelall(self):
        
        if self.orders:
            return self.bitshares.cancel(
                [o["id"] for o in self.orders],
                account=self.account
            )