Request Market Depth

View as MarkdownOpen in Claude

Important: Please note that the languages use different method names for requesting market depth.

The C# and Visual Basic APIs use reqMarketDepth().

The Python, Java, and C++ APIs use reqMktDepth().

EClient.reqMarketDepth (

tickerId: int. Request identifier used to track data.

contract: Contract. The Contract for which the depth is being requested.

numRows: int. The number of rows on each side of the order book.

isSmartDepth: bool. Flag indicates that this is a Smart-routed market depth request. Supplying true will return data identical to the TWS Book Trader while False returns direct routed data similar to the TWS Market Depth tool.

mktDepthOptions: List. Internal use only. Leave an empty array or None type.
)

Requests the contract’s market depth (order book).

1self.reqMktDepth(2001, contract, 5, False, [])