Package ch.aonyx.broker.ib.api

Examples of ch.aonyx.broker.ib.api.RequestException


        return builder;
    }

    private void checkMarketDataTypeRequest() {
        if (!Feature.MARKET_DATA_TYPE.isSupportedByVersion(getServerCurrentVersion())) {
            throw new RequestException(ClientMessageCode.UPDATE_TWS, "It does not support marketDataType requests.",
                    this);
        }
    }
View Full Code Here


    }

    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);
            }
        }
    }
View Full Code Here

    }

    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);
            }
        }
    }
View Full Code Here

        return builder;
    }

    private void checkGlobalCancelOrderRequest() {
        if (!Feature.GLOBAL_CANCEL_ORDER_REQUEST.isSupportedByVersion(getServerCurrentVersion())) {
            throw new RequestException(ClientMessageCode.UPDATE_TWS, "It does not support globalCancel requests.", this);
        }
    }
View Full Code Here

        return builder;
    }

    private void checkCalculateOptionPrice() {
        if (!Feature.CALCULATE_OPTION_PRICE.isSupportedByVersion(getServerCurrentVersion())) {
            throw new RequestException(ClientMessageCode.UPDATE_TWS,
                    "It does not support calculate option price requests.", this);
        }
    }
View Full Code Here

        return builder;
    }

    private void checkReutersFundamentalDataSupport() {
        if (!Feature.REUTERS_FUNDAMENTAL_DATA.isSupportedByVersion(getServerCurrentVersion())) {
            throw new RequestException(ClientMessageCode.UPDATE_TWS, "It does not support fundamental data requests.",
                    this);
        }
    }
View Full Code Here

    }

    private void checkSecurityIdType() {
        if (StringUtils.isNotEmpty(contract.getSecurityId()) || (contract.getSecurityIdentifierCode() != null)) {
            if (!Feature.SECURITY_ID_TYPE.isSupportedByVersion(getServerCurrentVersion())) {
                throw new RequestException(ClientMessageCode.UPDATE_TWS,
                        "It does not support secIdType and secId parameters.", this);
            }
        }
    }
View Full Code Here

        return builder;
    }

    private void checkReutersFundamentalDataSupport() {
        if (!Feature.REUTERS_FUNDAMENTAL_DATA.isSupportedByVersion(getServerCurrentVersion())) {
            throw new RequestException(ClientMessageCode.UPDATE_TWS, "It does not support fundamental data requests.",
                    this);
        }
    }
View Full Code Here

    }

    private void checkDeltaNeutralComboOrdersSupport() {
        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);
            }
        }
    }
View Full Code Here

    }

    private void checkScaleOrderSupport() {
        if (order.getScaleSubsequentLevelSize() != Integer.MAX_VALUE) {
            if (!Feature.SCALE_ORDER.isSupportedByVersion(getServerCurrentVersion())) {
                throw new RequestException(ClientMessageCode.UPDATE_TWS,
                        "It does not support Subsequent Level Size for Scale orders.", this);
            }
        }
    }
View Full Code Here

TOP

Related Classes of ch.aonyx.broker.ib.api.RequestException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.