'generated source for method reqMktData'

@synchronized(mlock)
def reqMktData(self, tickerId, contract, genericTickList, snapshot):

    if (not self.m_connected):
        self.error(EClientErrors.NO_VALID_ID, EClientErrors.NOT_CONNECTED, '')
        return
    if ((self.m_serverVersion < self.MIN_SERVER_VER_SNAPSHOT_MKT_DATA) and snapshot):
        self.error(tickerId, EClientErrors.UPDATE_TWS, '        It    does    not    support    snapshot    market    data    requests.')
        return
    if (self.m_serverVersion < self.MIN_SERVER_VER_UNDER_COMP):
        if (contract.m_underComp is not None):
            self.error(tickerId, EClientErrors.UPDATE_TWS, '        It    does    not    support    delta-neutral    orders.')
            return
    if (self.m_serverVersion < self.MIN_SERVER_VER_REQ_MKT_DATA_CONID):
        if (contract.m_conId > 0):
            self.error(tickerId, EClientErrors.UPDATE_TWS, '        It    does    not    support    conId    parameter.')
            return
    if (self.m_serverVersion < self.MIN_SERVER_VER_TRADING_CLASS):
        if (not self.IsEmpty(contract.m_tradingClass)):
            self.error(tickerId, EClientErrors.UPDATE_TWS, '        It    does    not    support    tradingClass    parameter    in    reqMarketData.')
            return
    VERSION = 10
    try:
        self.send(self.REQ_MKT_DATA)
        self.send(VERSION)
        self.send(tickerId)
        if (self.m_serverVersion >= self.MIN_SERVER_VER_REQ_MKT_DATA_CONID):
            self.send(contract.m_conId)
        self.send(contract.m_symbol)
        self.send(contract.m_secType)
        self.send(contract.m_expiry)
        self.send(contract.m_strike)
        self.send(contract.m_right)
        if (self.m_serverVersion >= 15):
            self.send(contract.m_multiplier)
        self.send(contract.m_exchange)
        if (self.m_serverVersion >= 14):
            self.send(contract.m_primaryExch)
        self.send(contract.m_currency)
        if (self.m_serverVersion >= 2):
            self.send(contract.m_localSymbol)
        if (self.m_serverVersion >= self.MIN_SERVER_VER_TRADING_CLASS):
            self.send(contract.m_tradingClass)
        if ((self.m_serverVersion >= 8) and (self.BAG_SEC_TYPE.lower() == contract.m_secType.lower())):
            if (contract.m_comboLegs is None):
                self.send(0)
            else:
                self.send(len(contract.m_comboLegs))
                i = 0
                while (i < len(contract.m_comboLegs)):
                    comboLeg = contract.m_comboLegs[i]
                    self.send(comboLeg.m_conId)
                    self.send(comboLeg.m_ratio)
                    self.send(comboLeg.m_action)
                    self.send(comboLeg.m_exchange)
                    i += 1
        if (self.m_serverVersion >= self.MIN_SERVER_VER_UNDER_COMP):
            if (contract.m_underComp is not None):
                underComp = contract.m_underComp
                self.send(True)
                self.send(underComp.m_conId)
                self.send(underComp.m_delta)
                self.send(underComp.m_price)
            else:
                self.send(False)
        if (self.m_serverVersion >= 31):
            self.send(genericTickList)
        if (self.m_serverVersion >= self.MIN_SERVER_VER_SNAPSHOT_MKT_DATA):
            self.send(snapshot)
    except Exception as e:
        self.error(tickerId, EClientErrors.FAIL_SEND_REQMKT, str(e))
        self.close()
