Option Data from Thinkorswim via TOS.RTD

Option Data from Thinkorswim via TOS.RTD

Overview

The RTD database contains preconfigured tables for getting real-time data from Thinkorswim thinkDesktop.

Option tables are designed for getting data for options. Use quote tables for stocks, futures, and currency pairs.

Since RealTimeToDB 2.5, RTD functions are used by default.
To update existing DDE formulas, you can use patches from the database folders.

You can disable unusable columns to reduce the server overhead.

Note that Thinkorswim thinkDesktop can crash if more than 200 000 topics are being requested.

The RTD server does not contain an actual data time field.
The DateTime, Date, and Time fields are updated using the PC time adjusted to the table time zone (Eastern Standard Time).

Real-Time Data Tables

Table Configurations

Microsoft SQL Server and Microsoft SQL Server Compact:

TABLE_SCHEMATABLE_NAMELOAD_CODEIS_HISTORY
rtdOptionListTOS
rtdOptionsTOSSELECT Code FROM rtd.OptionListTOS
rtdOptionDayHistoryTOSSELECT Code FROM rtd.OptionListTOS
rtdOptionTickHistoryTOSSELECT Code FROM rtd.OptionListTOS1

MySQL, MariaDB, and PostgreSQL:

TABLE_SCHEMATABLE_NAMELOAD_CODEIS_HISTORY
rtdoption_list_tos
rtdoptions_tosSELECT CODE FROM rtd.option_list_tos
rtdoption_day_history_tosSELECT CODE FROM rtd.option_list_tos
rtdoption_tick_history_tosSELECT CODE FROM rtd.option_list_tos1

Oracle Database, IBM DB2, and NuoDB:

TABLE_SCHEMATABLE_NAMELOAD_CODEIS_HISTORY
RTDOPTION_LIST_TOS
RTDOPTIONS_TOSSELECT CODE FROM RTD.OPTION_LIST_TOS
RTDOPTION_DAY_HISTORY_TOSSELECT CODE FROM RTD.OPTION_LIST_TOS
RTDOPTION_TICK_HISTORY_TOSSELECT CODE FROM RTD.OPTION_LIST_TOS1

* Click on the table name to go to the table description.

Task Table Examples

rtd.OptionListTOS for Microsoft SQL Server and Microsoft SQL Server Compact:

Code
.AAPL150117C500
.AAPL150117C600
.AAPL150117P500
.AAPL150117P600

rtd.option_list_tos for MySQL, MariaDB, Oracle Database, IBM DB2, NuoDB, and PostgreSQL:

CODE
.AAPL150117C500
.AAPL150117C600
.AAPL150117P500
.AAPL150117P600

Primary Key Columns

Microsoft SQL Server and Microsoft SQL Server Compact:

TABLE_SCHEMATABLE_NAMECOLUMN_NAMERTD_FORMULACOMMENT
rtdOptionsTOSCodePK
rtdOptionDayHistoryTOSCodePK
rtdOptionDayHistoryTOSDate=Date()PK
rtdOptionTickHistoryTOSIDPK, IDENTITY

MySQL, MariaDB, and PostgreSQL:

TABLE_SCHEMATABLE_NAMECOLUMN_NAMERTD_FORMULACOMMENT
rtdoptions_tosCODEPK
rtdoption_day_history_tosCODEPK
rtdoption_day_history_tosDATE=Date()PK
rtdoption_tick_history_tosIDPK, IDENTITY

Oracle Database, IBM DB2, and NuoDB:

TABLE_SCHEMATABLE_NAMECOLUMN_NAMERTD_FORMULACOMMENT
RTDOPTIONS_TOSCODEPK
RTDOPTION_DAY_HISTORY_TOSCODEPK
RTDOPTION_DAY_HISTORY_TOSDATE=Date()PK
RTDOPTION_TICK_HISTORY_TOSIDPK, IDENTITY

Real-Time Formulas for Microsoft SQL Server and Microsoft SQL Server Compact

rtd.OptionsTOS

The table contains the last values of option data from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
CodePK
DateTime=DateTime()
Date=Date()
Time=Time()
Description=RTD("tos.rtd",,"DESCRIPTION",[Code])
Last=RTD("tos.rtd",,"LAST",[Code])
Change=RTD("tos.rtd",,"NET_CHANGE",[Code])
PercentChange=RTD("tos.rtd",,"PERCENT_CHANGE",[Code])
LastSize=RTD("tos.rtd",,"LAST_SIZE",[Code])
LastX=RTD("tos.rtd",,"LX",[Code])
Mark=RTD("tos.rtd",,"MARK",[Code])
MarkChange=RTD("tos.rtd",,"MARK_CHANGE",[Code])
MarkPercentChange=RTD("tos.rtd",,"MARK_PERCENT_CHANGE",[Code])
Bid=RTD("tos.rtd",,"BID",[Code])
Ask=RTD("tos.rtd",,"ASK",[Code])
BidSize=RTD("tos.rtd",,"BID_SIZE",[Code])
AskSize=RTD("tos.rtd",,"ASK_SIZE",[Code])
BidAskSize=RTD("tos.rtd",,"BA_SIZE",[Code])
BidX=RTD("tos.rtd",,"BX",[Code])
AskX=RTD("tos.rtd",,"AX",[Code])
Open=RTD("tos.rtd",,"OPEN",[Code])
High=RTD("tos.rtd",,"HIGH",[Code])
Low=RTD("tos.rtd",,"LOW",[Code])
Close=RTD("tos.rtd",,"CLOSE",[Code])
Volume=RTD("tos.rtd",,"VOLUME",[Code])
OpenInt=RTD("tos.rtd",,"OPEN_INT",[Code])
ImpliedVol=RTD("tos.rtd",,"IMPL_VOL",[Code])
Delta=RTD("tos.rtd",,"DELTA",[Code])
Gamma=RTD("tos.rtd",,"GAMMA",[Code])
Theta=RTD("tos.rtd",,"THETA",[Code])
Vega=RTD("tos.rtd",,"VEGA",[Code])
Rho=RTD("tos.rtd",,"RHO",[Code])
Extrinsic=RTD("tos.rtd",,"EXTRINSIC",[Code])
Intrinsic=RTD("tos.rtd",,"INTRINSIC",[Code])
ProbabilityITM=RTD("tos.rtd",,"PROB_OF_EXPIRING",[Code])
ProbabilityOTM=RTD("tos.rtd",,"PROB_OTM",[Code])
ProbabilityTouch=RTD("tos.rtd",,"PROB_OF_TOUCHING",[Code])
CoveredReturn=RTD("tos.rtd",,"COVERED_RETURN",[Code])
MaxCoveredReturn=RTD("tos.rtd",,"MAX_COVERED_RETURN",[Code])
LastUpdateTimeStamp

rtd.OptionDayHistoryTOS

The table contains day history of option data from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
CodePK
Date=Date()PK
Time=Time()
Description=RTD("tos.rtd",,"DESCRIPTION",[Code])
Last=RTD("tos.rtd",,"LAST",[Code])
Change=RTD("tos.rtd",,"NET_CHANGE",[Code])
PercentChange=RTD("tos.rtd",,"PERCENT_CHANGE",[Code])
LastSize=RTD("tos.rtd",,"LAST_SIZE",[Code])
LastX=RTD("tos.rtd",,"LX",[Code])
Mark=RTD("tos.rtd",,"MARK",[Code])
MarkChange=RTD("tos.rtd",,"MARK_CHANGE",[Code])
MarkPercentChange=RTD("tos.rtd",,"MARK_PERCENT_CHANGE",[Code])
Bid=RTD("tos.rtd",,"BID",[Code])
Ask=RTD("tos.rtd",,"ASK",[Code])
BidSize=RTD("tos.rtd",,"BID_SIZE",[Code])
AskSize=RTD("tos.rtd",,"ASK_SIZE",[Code])
BidAskSize=RTD("tos.rtd",,"BA_SIZE",[Code])
BidX=RTD("tos.rtd",,"BX",[Code])
AskX=RTD("tos.rtd",,"AX",[Code])
Open=RTD("tos.rtd",,"OPEN",[Code])
High=RTD("tos.rtd",,"HIGH",[Code])
Low=RTD("tos.rtd",,"LOW",[Code])
Close=RTD("tos.rtd",,"CLOSE",[Code])
Volume=RTD("tos.rtd",,"VOLUME",[Code])
OpenInt=RTD("tos.rtd",,"OPEN_INT",[Code])
ImpliedVol=RTD("tos.rtd",,"IMPL_VOL",[Code])
Delta=RTD("tos.rtd",,"DELTA",[Code])
Gamma=RTD("tos.rtd",,"GAMMA",[Code])
Theta=RTD("tos.rtd",,"THETA",[Code])
Vega=RTD("tos.rtd",,"VEGA",[Code])
Rho=RTD("tos.rtd",,"RHO",[Code])
Extrinsic=RTD("tos.rtd",,"EXTRINSIC",[Code])
Intrinsic=RTD("tos.rtd",,"INTRINSIC",[Code])
ProbabilityITM=RTD("tos.rtd",,"PROB_OF_EXPIRING",[Code])
ProbabilityOTM=RTD("tos.rtd",,"PROB_OTM",[Code])
ProbabilityTouch=RTD("tos.rtd",,"PROB_OF_TOUCHING",[Code])
CoveredReturn=RTD("tos.rtd",,"COVERED_RETURN",[Code])
MaxCoveredReturn=RTD("tos.rtd",,"MAX_COVERED_RETURN",[Code])
LastUpdateTimeStamp

rtd.OptionTickHistoryTOS

The table contains tick history of option data from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
IDPK, IDENTITY
Code
DateTime=DateTime()
Date=Date()
Time=Time()
Description=RTD("tos.rtd",,"DESCRIPTION",[Code])
Last=RTD("tos.rtd",,"LAST",[Code])
Change=RTD("tos.rtd",,"NET_CHANGE",[Code])
PercentChange=RTD("tos.rtd",,"PERCENT_CHANGE",[Code])
LastSize=RTD("tos.rtd",,"LAST_SIZE",[Code])
LastX=RTD("tos.rtd",,"LX",[Code])
Mark=RTD("tos.rtd",,"MARK",[Code])
MarkChange=RTD("tos.rtd",,"MARK_CHANGE",[Code])
MarkPercentChange=RTD("tos.rtd",,"MARK_PERCENT_CHANGE",[Code])
Bid=RTD("tos.rtd",,"BID",[Code])
Ask=RTD("tos.rtd",,"ASK",[Code])
BidSize=RTD("tos.rtd",,"BID_SIZE",[Code])
AskSize=RTD("tos.rtd",,"ASK_SIZE",[Code])
BidAskSize=RTD("tos.rtd",,"BA_SIZE",[Code])
BidX=RTD("tos.rtd",,"BX",[Code])
AskX=RTD("tos.rtd",,"AX",[Code])
Open=RTD("tos.rtd",,"OPEN",[Code])
High=RTD("tos.rtd",,"HIGH",[Code])
Low=RTD("tos.rtd",,"LOW",[Code])
Close=RTD("tos.rtd",,"CLOSE",[Code])
Volume=RTD("tos.rtd",,"VOLUME",[Code])
OpenInt=RTD("tos.rtd",,"OPEN_INT",[Code])
ImpliedVol=RTD("tos.rtd",,"IMPL_VOL",[Code])
Delta=RTD("tos.rtd",,"DELTA",[Code])
Gamma=RTD("tos.rtd",,"GAMMA",[Code])
Theta=RTD("tos.rtd",,"THETA",[Code])
Vega=RTD("tos.rtd",,"VEGA",[Code])
Rho=RTD("tos.rtd",,"RHO",[Code])
Extrinsic=RTD("tos.rtd",,"EXTRINSIC",[Code])
Intrinsic=RTD("tos.rtd",,"INTRINSIC",[Code])
ProbabilityITM=RTD("tos.rtd",,"PROB_OF_EXPIRING",[Code])
ProbabilityOTM=RTD("tos.rtd",,"PROB_OTM",[Code])
ProbabilityTouch=RTD("tos.rtd",,"PROB_OF_TOUCHING",[Code])
CoveredReturn=RTD("tos.rtd",,"COVERED_RETURN",[Code])
MaxCoveredReturn=RTD("tos.rtd",,"MAX_COVERED_RETURN",[Code])

Real-Time Formulas for MySQL, MariaDB, Oracle Database, IBM DB2, NuoDB, and PostgreSQL

rtd.options_tos

The table contains the last values of option data from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
CODEPK
DATETIME=DateTime()
DATE=Date()
TIME=Time()
DESCRIPTION=RTD("tos.rtd",,"DESCRIPTION",[CODE])
LAST=RTD("tos.rtd",,"LAST",[CODE])
CHANGE=RTD("tos.rtd",,"NET_CHANGE",[CODE])
PERCENT_CHANGE=RTD("tos.rtd",,"PERCENT_CHANGE",[CODE])
LAST_SIZE=RTD("tos.rtd",,"LAST_SIZE",[CODE])
LAST_X=RTD("tos.rtd",,"LX",[CODE])
MARK=RTD("tos.rtd",,"MARK",[CODE])
MARK_CHANGE=RTD("tos.rtd",,"MARK_CHANGE",[CODE])
MARK_PERCENT_CHANGE=RTD("tos.rtd",,"MARK_PERCENT_CHANGE",[CODE])
BID=RTD("tos.rtd",,"BID",[CODE])
ASK=RTD("tos.rtd",,"ASK",[CODE])
BID_SIZE=RTD("tos.rtd",,"BID_SIZE",[CODE])
ASK_SIZE=RTD("tos.rtd",,"ASK_SIZE",[CODE])
BID_ASK_SIZE=RTD("tos.rtd",,"BA_SIZE",[CODE])
BID_X=RTD("tos.rtd",,"BX",[CODE])
ASK_X=RTD("tos.rtd",,"AX",[CODE])
OPEN=RTD("tos.rtd",,"OPEN",[CODE])
HIGH=RTD("tos.rtd",,"HIGH",[CODE])
LOW=RTD("tos.rtd",,"LOW",[CODE])
CLOSE=RTD("tos.rtd",,"CLOSE",[CODE])
VOLUME=RTD("tos.rtd",,"VOLUME",[CODE])
OPEN_INT=RTD("tos.rtd",,"OPEN_INT",[CODE])
IMPLIED_VOL=RTD("tos.rtd",,"IMPL_VOL",[CODE])
DELTA=RTD("tos.rtd",,"DELTA",[CODE])
GAMMA=RTD("tos.rtd",,"GAMMA",[CODE])
THETA=RTD("tos.rtd",,"THETA",[CODE])
VEGA=RTD("tos.rtd",,"VEGA",[CODE])
RHO=RTD("tos.rtd",,"RHO",[CODE])
EXTRINSIC=RTD("tos.rtd",,"EXTRINSIC",[CODE])
INTRINSIC=RTD("tos.rtd",,"INTRINSIC",[CODE])
PROBABILITY_ITM=RTD("tos.rtd",,"PROB_OF_EXPIRING",[CODE])
PROBABILITY_OTM=RTD("tos.rtd",,"PROB_OTM",[CODE])
PROBABILITY_TOUCH=RTD("tos.rtd",,"PROB_OF_TOUCHING",[CODE])
COVERED_RETURN=RTD("tos.rtd",,"COVERED_RETURN",[CODE])
MAX_COVERED_RETURN=RTD("tos.rtd",,"MAX_COVERED_RETURN",[CODE])
LAST_UPDATE_TIMESTAMP

rtd.option_day_history_tos

The table contains day history of option data from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
CODEPK
DATE=Date()PK
TIME=Time()
DESCRIPTION=RTD("tos.rtd",,"DESCRIPTION",[CODE])
LAST=RTD("tos.rtd",,"LAST",[CODE])
CHANGE=RTD("tos.rtd",,"NET_CHANGE",[CODE])
PERCENT_CHANGE=RTD("tos.rtd",,"PERCENT_CHANGE",[CODE])
LAST_SIZE=RTD("tos.rtd",,"LAST_SIZE",[CODE])
LAST_X=RTD("tos.rtd",,"LX",[CODE])
MARK=RTD("tos.rtd",,"MARK",[CODE])
MARK_CHANGE=RTD("tos.rtd",,"MARK_CHANGE",[CODE])
MARK_PERCENT_CHANGE=RTD("tos.rtd",,"MARK_PERCENT_CHANGE",[CODE])
BID=RTD("tos.rtd",,"BID",[CODE])
ASK=RTD("tos.rtd",,"ASK",[CODE])
BID_SIZE=RTD("tos.rtd",,"BID_SIZE",[CODE])
ASK_SIZE=RTD("tos.rtd",,"ASK_SIZE",[CODE])
BID_ASK_SIZE=RTD("tos.rtd",,"BA_SIZE",[CODE])
BID_X=RTD("tos.rtd",,"BX",[CODE])
ASK_X=RTD("tos.rtd",,"AX",[CODE])
OPEN=RTD("tos.rtd",,"OPEN",[CODE])
HIGH=RTD("tos.rtd",,"HIGH",[CODE])
LOW=RTD("tos.rtd",,"LOW",[CODE])
CLOSE=RTD("tos.rtd",,"CLOSE",[CODE])
VOLUME=RTD("tos.rtd",,"VOLUME",[CODE])
OPEN_INT=RTD("tos.rtd",,"OPEN_INT",[CODE])
IMPLIED_VOL=RTD("tos.rtd",,"IMPL_VOL",[CODE])
DELTA=RTD("tos.rtd",,"DELTA",[CODE])
GAMMA=RTD("tos.rtd",,"GAMMA",[CODE])
THETA=RTD("tos.rtd",,"THETA",[CODE])
VEGA=RTD("tos.rtd",,"VEGA",[CODE])
RHO=RTD("tos.rtd",,"RHO",[CODE])
EXTRINSIC=RTD("tos.rtd",,"EXTRINSIC",[CODE])
INTRINSIC=RTD("tos.rtd",,"INTRINSIC",[CODE])
PROBABILITY_ITM=RTD("tos.rtd",,"PROB_OF_EXPIRING",[CODE])
PROBABILITY_OTM=RTD("tos.rtd",,"PROB_OTM",[CODE])
PROBABILITY_TOUCH=RTD("tos.rtd",,"PROB_OF_TOUCHING",[CODE])
COVERED_RETURN=RTD("tos.rtd",,"COVERED_RETURN",[CODE])
MAX_COVERED_RETURN=RTD("tos.rtd",,"MAX_COVERED_RETURN",[CODE])
LAST_UPDATE_TIMESTAMP

rtd.option_tick_history_tos

The table contains tick history of option data from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
IDPK, IDENTITY
CODE
DATETIME=DateTime()
DATE=Date()
TIME=Time()
DESCRIPTION=RTD("tos.rtd",,"DESCRIPTION",[CODE])
LAST=RTD("tos.rtd",,"LAST",[CODE])
CHANGE=RTD("tos.rtd",,"NET_CHANGE",[CODE])
PERCENT_CHANGE=RTD("tos.rtd",,"PERCENT_CHANGE",[CODE])
LAST_SIZE=RTD("tos.rtd",,"LAST_SIZE",[CODE])
LAST_X=RTD("tos.rtd",,"LX",[CODE])
MARK=RTD("tos.rtd",,"MARK",[CODE])
MARK_CHANGE=RTD("tos.rtd",,"MARK_CHANGE",[CODE])
MARK_PERCENT_CHANGE=RTD("tos.rtd",,"MARK_PERCENT_CHANGE",[CODE])
BID=RTD("tos.rtd",,"BID",[CODE])
ASK=RTD("tos.rtd",,"ASK",[CODE])
BID_SIZE=RTD("tos.rtd",,"BID_SIZE",[CODE])
ASK_SIZE=RTD("tos.rtd",,"ASK_SIZE",[CODE])
BID_ASK_SIZE=RTD("tos.rtd",,"BA_SIZE",[CODE])
BID_X=RTD("tos.rtd",,"BX",[CODE])
ASK_X=RTD("tos.rtd",,"AX",[CODE])
OPEN=RTD("tos.rtd",,"OPEN",[CODE])
HIGH=RTD("tos.rtd",,"HIGH",[CODE])
LOW=RTD("tos.rtd",,"LOW",[CODE])
CLOSE=RTD("tos.rtd",,"CLOSE",[CODE])
VOLUME=RTD("tos.rtd",,"VOLUME",[CODE])
OPEN_INT=RTD("tos.rtd",,"OPEN_INT",[CODE])
IMPLIED_VOL=RTD("tos.rtd",,"IMPL_VOL",[CODE])
DELTA=RTD("tos.rtd",,"DELTA",[CODE])
GAMMA=RTD("tos.rtd",,"GAMMA",[CODE])
THETA=RTD("tos.rtd",,"THETA",[CODE])
VEGA=RTD("tos.rtd",,"VEGA",[CODE])
RHO=RTD("tos.rtd",,"RHO",[CODE])
EXTRINSIC=RTD("tos.rtd",,"EXTRINSIC",[CODE])
INTRINSIC=RTD("tos.rtd",,"INTRINSIC",[CODE])
PROBABILITY_ITM=RTD("tos.rtd",,"PROB_OF_EXPIRING",[CODE])
PROBABILITY_OTM=RTD("tos.rtd",,"PROB_OTM",[CODE])
PROBABILITY_TOUCH=RTD("tos.rtd",,"PROB_OF_TOUCHING",[CODE])
COVERED_RETURN=RTD("tos.rtd",,"COVERED_RETURN",[CODE])
MAX_COVERED_RETURN=RTD("tos.rtd",,"MAX_COVERED_RETURN",[CODE])