private void appendCombo(final RequestBuilder builder) {
   if (SecurityType.COMBO.equals(contract.getSecurityType())) {
     builder.append(contract.getComboLegs().size());
     for (final ComboLeg comboLeg : contract.getComboLegs()) {
       builder.append(comboLeg.getContractId());
       builder.append(comboLeg.getRatio());
       builder.append(comboLeg.getOrderAction().getAbbreviation());
       builder.append(comboLeg.getExchange());
     }
   }
 }
 private void checkDeltaNeutralOrderSupport() {
   if (contract.getUnderlyingCombo() != null) {
     if (!Feature.DELTA_NEUTRAL_COMBO_ORDER.isSupportedByVersion(getServerCurrentVersion())) {
       throw new RequestException(
           ClientMessageCode.UPDATE_TWS, "It does not support delta-neutral orders.", this);
     }
   }
 }
 private void checkContractIdSupport() {
   if (contract.getId() > 0) {
     if (!Feature.MARKET_DATA_REQUEST_BY_CONTRACT_ID.isSupportedByVersion(
         getServerCurrentVersion())) {
       throw new RequestException(
           ClientMessageCode.UPDATE_TWS,
           "Market data request by contract id is not supported.",
           this);
     }
   }
 }
 private void appendUnderlyingCombo(final RequestBuilder builder) {
   if (Feature.DELTA_NEUTRAL_COMBO_ORDER.isSupportedByVersion(getServerCurrentVersion())) {
     final UnderlyingCombo underComp = contract.getUnderlyingCombo();
     if (underComp != null) {
       builder.append(true);
       builder.append(underComp.getContractId());
       builder.append(underComp.getDelta());
       builder.append(underComp.getPrice());
     } else {
       builder.append(false);
     }
   }
 }
 private void appendContract(final RequestBuilder builder) {
   if (Feature.MARKET_DATA_REQUEST_BY_CONTRACT_ID.isSupportedByVersion(
       getServerCurrentVersion())) {
     builder.append(contract.getId());
   }
   builder.append(contract.getSymbol());
   builder.append(contract.getSecurityType().getAbbreviation());
   builder.append(contract.getExpiry());
   builder.append(contract.getStrike());
   builder.append(contract.getOptionRight().getName());
   builder.append(contract.getMultiplier());
   builder.append(contract.getExchange());
   builder.append(contract.getPrimaryExchange());
   builder.append(contract.getCurrencyCode());
   builder.append(contract.getLocalSymbol());
 }