'generated source for method reqMktDepth'

@synchronized(mlock)
def reqMktDepth(self, tickerId, contract, numRows):

    if (not self.m_connected):
        self.notConnected()
        return
    if (self.m_serverVersion < 6):
        self.error(EClientErrors.NO_VALID_ID, EClientErrors.UPDATE_TWS.code(), EClientErrors.UPDATE_TWS.msg())
        return
    if (self.m_serverVersion < self.MIN_SERVER_VER_TRADING_CLASS):
        if ((not self.IsEmpty(contract.m_tradingClass)) or (contract.m_conId > 0)):
            self.error(tickerId, EClientErrors.UPDATE_TWS, '        It    does    not    support    conId    and    tradingClass    parameters    in    reqMktDepth.')
            return
    VERSION = 4
    try:
        self.send(self.REQ_MKT_DEPTH)
        self.send(VERSION)
        self.send(tickerId)
        if (self.m_serverVersion >= self.MIN_SERVER_VER_TRADING_CLASS):
            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)
        self.send(contract.m_currency)
        self.send(contract.m_localSymbol)
        if (self.m_serverVersion >= self.MIN_SERVER_VER_TRADING_CLASS):
            self.send(contract.m_tradingClass)
        if (self.m_serverVersion >= 19):
            self.send(numRows)
    except Exception as e:
        self.error(tickerId, EClientErrors.FAIL_SEND_REQMKTDEPTH, str(e))
        self.close()
