Live Market Data
Users may request market data using get_market_data_snapshot() to retrieve available market data.
The request currently supports tickPrice, tickSize, tickString, tickGeneric, tickNews, and tickOptionCompution data.
get_market_data_snapshot(
contract: Contract Object. Contract to retrieve market data for.
generic_tick_list: String. String containing comma-separate values to determine addition data to retrieve.
Default: Automatically sends an empty string, returning only the basic data such as Last, Bid, and Ask. See Available Tick Types for more details.
snapshot: Boolean. Determine if a single snapshot should be returned or if data should be continuously updated until the timeout threshold has been reached.
Default: Set to True, returning a snapshot of data as soon as possible.
timeout: Integer. Uses default timeout value passed to TWSSyncClass.
)
Data returned by get_market_data_snapshot() is delivered as a json dictionary object, separating data into “price” and “size” tags. Values are then returned as the affiliated tick types alongside any price or attribute data.
Response Object
{
{TickType}: Integer, Float String. The value of the tag. Can include price values (Float), Size values (Decimal), or direct information (string).
}

