取消合约订单(单个取消，多个取消没有实现处理)

@param orderId
@param symbol
@param contract
@return
@throws IOException
190632
public OkCoinTradeResult futuresCancelOrder(long orderId, String symbol, FuturesContract contract)
      throws IOException {

    OkCoinTradeResult tradeResult =
        okCoin.futuresCancelOrder(
            apikey, String.valueOf(orderId), symbol, contract.getName(), signatureCreator());
    return returnOrThrow(tradeResult);
  }
939685
private String getApiId(Contract contract) {
        return getApiId(contract.getApiOrgId(), contract.getApiId(), contract.getApiVersion());
    }
527252
public OkCoinTradeResult futuresTrade(
      String symbol,
      String type,
      String price,
      String amount,
      FuturesContract contract,
      int matchPrice,
      int leverRate)
      throws IOException {

    OkCoinTradeResult tradeResult =
        okCoin.futuresTrade(
            apikey,
            symbol,
            contract.getName(),
            type,
            price,
            amount,
            matchPrice,
            leverRate,
            signatureCreator());
    return returnOrThrow(tradeResult);
  }
407758
@Override
  public boolean cancelOrder(String orderId) throws IOException {

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

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

    return true;
  }
281241
public OvhPaymentMethods order_orderId_paymentMethods_GET(Long orderId) throws IOException {
		String qPath = "/me/order/{orderId}/paymentMethods";
		StringBuilder sb = path(qPath, orderId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhPaymentMethods.class);
	}
981008
public static List<LimitOrder> createOrders(
      CurrencyPair currencyPair, Order.OrderType orderType, BitcoindeOrder[] orders) {

    List<LimitOrder> limitOrders = new ArrayList<>();
    for (BitcoindeOrder order : orders) {
      limitOrders.add(createOrder(currencyPair, order, orderType, null, null));
    }
    return limitOrders;
  }
1052974
def open_orders(self, symbol=None):
        """"""
        api = "order"
        query = {'ordStatus.isTerminated': False }
        if symbol != None:
            query['symbol'] =symbol
        orders = self._curl_bitmex(
            api=api,
            query={'filter': json.dumps(query)},
            verb="GET"
        )
        return orders
484480
public ArrayList<Long> agreements_GET(OvhAgreementStateEnum agreed, Long contractId) throws IOException {
		String qPath = "/me/agreements";
		StringBuilder sb = path(qPath);
		query(sb, "agreed", agreed);
		query(sb, "contractId", contractId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, t2);
	}
743135
public AbucoinsOrder[] getAbucoinsOrders(AbucoinsOrderRequest request) throws IOException {
    AbucoinsOrder.Status status = null;
    String productID = null;
    if (request != null) {
      status = request.getStatus();
      productID = request.getProductID();
    }

    if (status != null) {
      switch (status) {
        default:
        case open:
        case done:
          break;

        case pending:
        case rejected:
          throw new IllegalArgumentException(
              "/orders only accepts status of 'open' or 'done' not " + status);
      }
    }

    AbucoinsOrders retVal = null;
    if (status == null) {
      if (productID == null)
        retVal =
            abucoinsAuthenticated.getOrders(
                exchange.getExchangeSpecification().getApiKey(),
                signatureCreator,
                exchange.getExchangeSpecification().getPassword(),
                timestamp());
      else
        retVal =
            abucoinsAuthenticated.getOrdersByProductID(
                productID,
                exchange.getExchangeSpecification().getApiKey(),
                signatureCreator,
                exchange.getExchangeSpecification().getPassword(),
                timestamp());
    } else {
      if (productID == null)
        retVal =
            abucoinsAuthenticated.getOrdersByStatus(
                status.name(),
                exchange.getExchangeSpecification().getApiKey(),
                signatureCreator,
                exchange.getExchangeSpecification().getPassword(),
                timestamp());
      else
        retVal =
            abucoinsAuthenticated.getOrdersByStatusAndProductID(
                status.name(),
                productID,
                exchange.getExchangeSpecification().getApiKey(),
                signatureCreator,
                exchange.getExchangeSpecification().getPassword(),
                timestamp());
    }

    if (retVal.getOrders().length == 1 && retVal.getOrders()[0].getMessage() != null)
      throw new ExchangeException(retVal.getOrders()[0].getMessage());

    return retVal.getOrders();
  }
1244469
public OvhOrderStatusEnum order_orderId_status_GET(Long orderId) throws IOException {
		String qPath = "/me/order/{orderId}/status";
		StringBuilder sb = path(qPath, orderId);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhOrderStatusEnum.class);
	}
172438
@Requires("kind != null")
  @Ensures({
    "result != null",
    "!result.contains(null)"
  })
  List<ClassContractHandle> getClassHandles(ContractKind kind) {
    ArrayList<ClassContractHandle> matched =
        new ArrayList<ClassContractHandle>();
    for (ClassContractHandle h : classHandles) {
      if (kind.equals(h.getKind())) {
        matched.add(h);
      }
    }
    return matched;
  }
1036472
@SuppressWarnings("rawtypes")
	public void setContractClasses(Class[] contractClasses) throws InvalidContractException {
		contracts.clear();
		for (int i = 0; i < contractClasses.length; i++) {
			contracts.add(new ContractHolder(contractClasses[i]));
		}
		onCreate();
	}
259217
public OvhOrder order_orderId_debt_pay_POST(Long orderId) throws IOException {
		String qPath = "/me/order/{orderId}/debt/pay";
		StringBuilder sb = path(qPath, orderId);
		String resp = exec(qPath, "POST", sb.toString(), null);
		return convertTo(resp, OvhOrder.class);
	}
453266
public OkCoinBatchTradeResult cancelUpToThreeOrders(Set<Long> orderIds, String symbol)
      throws IOException {
    String ids =
        orderIds.stream().map(Object::toString).collect(Collectors.joining(BATCH_DELIMITER));
    return okCoin.cancelOrders(apikey, ids, symbol, signatureCreator());
  }
1346748
@Override
    public AgreementToken createPayPalAgreementTokenForCurrentOrder(boolean performCheckoutOnReturn) throws PaymentException {
        PaymentRequestDTO paymentRequestDTO = getPaymentRequestForCurrentOrder();

        // Create Agreement Token
        String agreementDescription = constructAgreementDescription(paymentRequestDTO);
        Payer payer = constructPayer(paymentRequestDTO);
        Plan plan = constructPlan(paymentRequestDTO, performCheckoutOnReturn);
        AgreementToken agreementToken = new AgreementToken(agreementDescription, payer, plan);
        return createAgreementToken(agreementToken, paymentRequestDTO);
    }
410656
public OkCoinOrderResult getOrderHistory(
      String symbol, String status, String currentPage, String pageLength) throws IOException {

    OkCoinOrderResult orderResult =
        okCoin.getOrderHistory(apikey, symbol, status, currentPage, pageLength, signatureCreator());
    return returnOrThrow(orderResult);
  }
803604
def whatIfOrder(self, contract: Contract, order: Order) -> OrderState:
        
        return self._run(self.whatIfOrderAsync(contract, order))