Complex Syntax
Complex Syntax provides the most flexibility that it allows users to customize all formula strings individually, where each string only represent one single parameter. There is no rule for the sequence of the appearance of each parameter.
Unlike the Simple Syntax, each field of a Complex Syntax contract is submitted separately within its own string. There is no limit to the number of fields included so long as it remains relevant to a given contract.
It should be noted this may be interspersed with the Simple Syntax, in the event an additional parameter needs to be included.
The Complex Syntax below will request the Bid price for SPY:
=RTD("Tws.TwsRtdServerCtrl",,"sym=ES", "sec=FUT", "exch=CME", "cur=USD", "exp=202212", "qt=Bid")
The mixed syntax below with request AskSize data for SPY using the simple syntax defaults along with a designated primary exchange, ARCA:
=RTD("Tws.TwsRtdServerCtrl",,"SPY", "prim=ARCA", "qt=AskSize")

