Cancel a trade offer.
@param TradeOffer $tradeOffer
@return bool
485437
public function cancelTrade(TradeOffer $tradeOffer)
    {
        if ($tradeOffer->isOurOffer()) {
            return $this->cancelTradeById($tradeOffer->getTradeOfferId());
        }
        return false;
    }
804176
def cancel(self, consumer_tag):
        """"""
        if not self.channel.conn:
            return
        self.channel.basic_cancel(consumer_tag)
210094
public function removeOption( $key )
	{
		if( !$this->hasOption( $key ) )
			return FALSE;
		unset( $this->options[$key] );
		return TRUE;
	}
1301836
public function destroy($removeCookie = false)
    {
        if ($this->id) {
            if ($removeCookie) {
                $this->removeCookie();
            }
            $this->handler->destroy($this->id);
            $this->handler->close();
            $this->id = '';
            $this->data = null;
            return true;
        }
        return false;
    }
1092223
def cancel(self):
        

        self.cancel_amount = self.amount - self.trade_amount
        if self.trade_amount == 0:
            # 未交易  直接订单全撤
            self._status = ORDER_STATUS.CANCEL_ALL
        else:
            # 部分交易 剩余订单全撤
            self._status = ORDER_STATUS.CANCEL_PART
611617
def cancelMarketDepth(self, contracts=None):
        
        if contracts == None:
            contracts = list(self.contracts.values())
        elif not isinstance(contracts, list):
            contracts = [contracts]

        for contract in contracts:
            tickerId = self.tickerId(self.contractString(contract))
            self.ibConn.cancelMktDepth(tickerId=tickerId)
947573
public function stop($mergeToParent = true)
    {
        $collector = end(static::$_collectors);
        if ($collector !== $this) {
            return false;
        }
        array_pop(static::$_collectors);
        $collected = $this->_driver->stop();
        $this->add($collected);

        $collector = end(static::$_collectors);
        if (!$collector) {
            return true;
        }
        $collector->add($mergeToParent ? $collected : []);
        $collector->_driver->start();
        return true;
    }
1301160
public function reverseTransaction($buyOrder) {

        try {

            $oneClickReverseInput = new oneClickReverseInput();

            $oneClickReverseInput->buyorder = $buyOrder;

            $codeReverseOneClickResponse = $this->_codeReverseOneClick(
                    array("oneClickReverseInput" => $oneClickReverseInput)
            );

            /** Validación de firma del requerimiento de respuesta enviado por Webpay */
            $xmlResponse = $this->soapClient->__getLastResponse();
            $soapValidation = new SoapValidation($xmlResponse, $this->config->getWebpayCert());
            $validationResult = $soapValidation->getValidationResult();

            if ($validationResult === TRUE) {

                $oneClickReverseOutput = $codeReverseOneClickResponse->return;
                return $oneClickReverseOutput;

            } else {

                $error["error"] = "Error validando conexi&oacute;n a Webpay (Verificar que la informaci&oacute;n del certificado sea correcta)";
                $error["detail"] = "No se pudo completar la conexi&oacute;n con Webpay";
            }

        } catch (\Exception $e) {

            $error["error"] = "Error conectando a Webpay (Verificar que la informaci&oacute;n del certificado sea correcta)";

            $replaceArray = array('<!--' => '', '-->' => '');
            $error["detail"] = str_replace(array_keys($replaceArray), array_values($replaceArray), $e->getMessage());

        }
    }
420012
public boolean removeExecutedTradeCallback(final BitfinexExecutedTradeSymbol tradeSymbol,
			final BiConsumer<BitfinexExecutedTradeSymbol, BitfinexExecutedTrade> callback) throws BitfinexClientException {

		return tradesCallbacks.removeCallback(tradeSymbol, callback);
	}
958572
def CancelarAnticipo(self, pto_emision=None, nro_orden=None, coe=None, 
                               pdf=None):
        ""
        
        # llamo al webservice:
        ret = self.client.lpgCancelarAnticipo(
                        auth={
                            'token': self.Token, 'sign': self.Sign,
                            'cuit': self.Cuit, },
                        coe=coe,
                        ptoEmision=pto_emision,
                        nroOrden=nro_orden,
                        pdf="S" if pdf else "N",
                        )

        # analizo la respusta
        ret = ret['liqConsReturn']
        self.__analizar_errores(ret)
        if 'liquidacion' in ret:
            aut = ret['autorizacion']
            liq = ret['liquidacion']
            self.AnalizarLiquidacion(aut, liq)
        # guardo el PDF si se indico archivo y vino en la respuesta:
        if pdf and 'pdf' in ret:
            open(pdf, "wb").write(ret['pdf'])
        return True
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);
  }
761170
public function cancelSettlement(CardPayments\Settlement $settlement)
    {
        $settlement->setRequiredFields(array('id'));
        $settlement->checkRequiredFields();

        $tmpSettlement = new CardPayments\Settlement(array(
             'status' => 'CANCELLED'
        ));
        $request = new Request(array(
             'method' => Request::PUT,
             'uri' => $this->prepareURI("/settlements/" . $settlement->id),
             'body' => $tmpSettlement
        ));
        $response = $this->client->processRequest($request);

        return new CardPayments\Settlement($response);
    }
702714
public function cancel()
    {
        $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/cancel/');
        $this->deserialize($data);
    }
323665
protected function cancelPurchase()
    {
        $this->controller->setMessage($this->controller->text('Payment has been canceled'), 'warning');
        $gateway_message = $this->response->getMessage();
        if (!empty($gateway_message)) {
            $this->controller->setMessage($gateway_message, 'warning');
        }
    }
68312
public function basic_cancel($consumer_tag, $nowait = false, $noreturn = false)
    {
        list($class_id, $method_id, $args) = $this->protocolWriter->basicCancel($consumer_tag, $nowait);
        $this->send_method_frame(array($class_id, $method_id), $args);

        if ($nowait || $noreturn) {
            unset($this->callbacks[$consumer_tag]);
            return $consumer_tag;
        }

        return $this->wait(array(
            $this->waitHelper->get_wait('basic.cancel_ok')
        ), false, $this->channel_rpc_timeout);
    }
1158801
public function removeOption($option = true)
    {
        if (true === $option) {
            $this->options = [];
        } elseif (is_string($option) && isset($this->options[$option])) {
            unset($this->options[$option]);
        }

        return $this;
    }
455114
public function cancel()
    {
        if ($this->id === null) {
            return false;
        }

        $key = $this->queue->generateListKey();
        $id = "$key:" . $this->id;

        // Delete the job from the current and scheduled queue, then remove the job details from Redis
        $result = $this->queue->getClient()->getRedis()->multi()
            ->zrem($key)
            ->zrem($key . '-scheduled')
            ->del($id)
            ->hset(\date('Y-m-d') . '_cancel', (string)\time(), \json_encode([
                'class' => $this->getWorkerClass(),
                'args' => $this->getArgs(),
                'priority' => (float)$this->getPriority(),
                'id' => $this->getId()
            ]))
            ->exec();

        $this->workerClass = null;
        $this->args = [];
        $this->retry = null;
        $this->priority = null;

        return $result[0] === true || $result[1] === true;
    }