Option Data from Thinkorswim thinkDesktop via DDE

Option Data from Thinkorswim thinkDesktop via DDE

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, the default formulas use the tos.rtd server, not DDE.
You may change RTD formulas to DDE using the patches from the database folders.

The data are updated from the thinkDesktop DDE server that requires administrator privileges for running RealTimeToDB.

You may disable unusable columns to reduce the server overhead.

The DDE 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=TOS|DESCRIPTION!'[Code]'
Last=TOS|LAST!'[Code]'
Change=TOS|NET_CHANGE!'[Code]'
PercentChange=TOS|PERCENT_CHANGE!'[Code]'
LastSize=TOS|LAST_SIZE!'[Code]'
LastX=TOS|LX!'[Code]'
Mark=TOS|MARK!'[Code]'
MarkChange=TOS|MARK_CHANGE!'[Code]'
MarkPercentChange=TOS|MARK_PERCENT_CHANGE!'[Code]'
Bid=TOS|BID!'[Code]'
Ask=TOS|ASK!'[Code]'
BidSize=TOS|BID_SIZE!'[Code]'
AskSize=TOS|ASK_SIZE!'[Code]'
BidAskSize=TOS|BA_SIZE!'[Code]'
BidX=TOS|BX!'[Code]'
AskX=TOS|AX!'[Code]'
Open=TOS|OPEN!'[Code]'
High=TOS|HIGH!'[Code]'
Low=TOS|LOW!'[Code]'
Close=TOS|Close!'[Code]'
Volume=TOS|VOLUME!'[Code]'
OpenInt=TOS|OPEN_INT!'[Code]'
ImpliedVol=TOS|IMPL_VOL!'[Code]'
Delta=TOS|DELTA!'[Code]'
Gamma=TOS|GAMMA!'[Code]'
Theta=TOS|THETA!'[Code]'
Vega=TOS|VEGA!'[Code]'
Rho=TOS|RHO!'[Code]'
Extrinsic=TOS|EXTRINSIC!'[Code]'
Intrinsic=TOS|INTRINSIC!'[Code]'
ProbabilityITM=TOS|PROB_OF_EXPIRING!'[Code]'
ProbabilityOTM=TOS|PROB_OTM!'[Code]'
ProbabilityTouch=TOS|PROB_OF_TOUCHING!'[Code]'
CoveredReturn=TOS|COVERED_RETURN!'[Code]'
MaxCoveredReturn=TOS|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=TOS|DESCRIPTION!'[Code]'
Last=TOS|LAST!'[Code]'
Change=TOS|NET_CHANGE!'[Code]'
PercentChange=TOS|PERCENT_CHANGE!'[Code]'
LastSize=TOS|LAST_SIZE!'[Code]'
LastX=TOS|LX!'[Code]'
Mark=TOS|MARK!'[Code]'
MarkChange=TOS|MARK_CHANGE!'[Code]'
MarkPercentChange=TOS|MARK_PERCENT_CHANGE!'[Code]'
Bid=TOS|BID!'[Code]'
Ask=TOS|ASK!'[Code]'
BidSize=TOS|BID_SIZE!'[Code]'
AskSize=TOS|ASK_SIZE!'[Code]'
BidAskSize=TOS|BA_SIZE!'[Code]'
BidX=TOS|BX!'[Code]'
AskX=TOS|AX!'[Code]'
Open=TOS|OPEN!'[Code]'
High=TOS|HIGH!'[Code]'
Low=TOS|LOW!'[Code]'
Close=TOS|Close!'[Code]'
Volume=TOS|VOLUME!'[Code]'
OpenInt=TOS|OPEN_INT!'[Code]'
ImpliedVol=TOS|IMPL_VOL!'[Code]'
Delta=TOS|DELTA!'[Code]'
Gamma=TOS|GAMMA!'[Code]'
Theta=TOS|THETA!'[Code]'
Vega=TOS|VEGA!'[Code]'
Rho=TOS|RHO!'[Code]'
Extrinsic=TOS|EXTRINSIC!'[Code]'
Intrinsic=TOS|INTRINSIC!'[Code]'
ProbabilityITM=TOS|PROB_OF_EXPIRING!'[Code]'
ProbabilityOTM=TOS|PROB_OTM!'[Code]'
ProbabilityTouch=TOS|PROB_OF_TOUCHING!'[Code]'
CoveredReturn=TOS|COVERED_RETURN!'[Code]'
MaxCoveredReturn=TOS|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=TOS|DESCRIPTION!'[Code]'
Last=TOS|LAST!'[Code]'
Change=TOS|NET_CHANGE!'[Code]'
PercentChange=TOS|PERCENT_CHANGE!'[Code]'
LastSize=TOS|LAST_SIZE!'[Code]'
LastX=TOS|LX!'[Code]'
Mark=TOS|MARK!'[Code]'
MarkChange=TOS|MARK_CHANGE!'[Code]'
MarkPercentChange=TOS|MARK_PERCENT_CHANGE!'[Code]'
Bid=TOS|BID!'[Code]'
Ask=TOS|ASK!'[Code]'
BidSize=TOS|BID_SIZE!'[Code]'
AskSize=TOS|ASK_SIZE!'[Code]'
BidAskSize=TOS|BA_SIZE!'[Code]'
BidX=TOS|BX!'[Code]'
AskX=TOS|AX!'[Code]'
Open=TOS|OPEN!'[Code]'
High=TOS|HIGH!'[Code]'
Low=TOS|LOW!'[Code]'
Close=TOS|Close!'[Code]'
Volume=TOS|VOLUME!'[Code]'
OpenInt=TOS|OPEN_INT!'[Code]'
ImpliedVol=TOS|IMPL_VOL!'[Code]'
Delta=TOS|DELTA!'[Code]'
Gamma=TOS|GAMMA!'[Code]'
Theta=TOS|THETA!'[Code]'
Vega=TOS|VEGA!'[Code]'
Rho=TOS|RHO!'[Code]'
Extrinsic=TOS|EXTRINSIC!'[Code]'
Intrinsic=TOS|INTRINSIC!'[Code]'
ProbabilityITM=TOS|PROB_OF_EXPIRING!'[Code]'
ProbabilityOTM=TOS|PROB_OTM!'[Code]'
ProbabilityTouch=TOS|PROB_OF_TOUCHING!'[Code]'
CoveredReturn=TOS|COVERED_RETURN!'[Code]'
MaxCoveredReturn=TOS|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=TOS|DESCRIPTION!'[CODE]'
LAST=TOS|LAST!'[CODE]'
CHANGE=TOS|NET_CHANGE!'[CODE]'
PERCENT_CHANGE=TOS|PERCENT_CHANGE!'[CODE]'
LAST_SIZE=TOS|LAST_SIZE!'[CODE]'
LAST_X=TOS|LX!'[CODE]'
MARK=TOS|MARK!'[CODE]'
MARK_CHANGE=TOS|MARK_CHANGE!'[CODE]'
MARK_PERCENT_CHANGE=TOS|MARK_PERCENT_CHANGE!'[CODE]'
BID=TOS|BID!'[CODE]'
ASK=TOS|ASK!'[CODE]'
BID_SIZE=TOS|BID_SIZE!'[CODE]'
ASK_SIZE=TOS|ASK_SIZE!'[CODE]'
BID_ASK_SIZE=TOS|BA_SIZE!'[CODE]'
BID_X=TOS|BX!'[CODE]'
ASK_X=TOS|AX!'[CODE]'
OPEN=TOS|OPEN!'[CODE]'
HIGH=TOS|HIGH!'[CODE]'
LOW=TOS|LOW!'[CODE]'
CLOSE=TOS|Close!'[CODE]'
VOLUME=TOS|VOLUME!'[CODE]'
OPEN_INT=TOS|OPEN_INT!'[CODE]'
IMPLIED_VOL=TOS|IMPL_VOL!'[CODE]'
DELTA=TOS|DELTA!'[CODE]'
GAMMA=TOS|GAMMA!'[CODE]'
THETA=TOS|THETA!'[CODE]'
VEGA=TOS|VEGA!'[CODE]'
RHO=TOS|RHO!'[CODE]'
EXTRINSIC=TOS|EXTRINSIC!'[CODE]'
INTRINSIC=TOS|INTRINSIC!'[CODE]'
PROBABILITY_ITM=TOS|PROB_OF_EXPIRING!'[CODE]'
PROBABILITY_OTM=TOS|PROB_OTM!'[CODE]'
PROBABILITY_TOUCH=TOS|PROB_OF_TOUCHING!'[CODE]'
COVERED_RETURN=TOS|COVERED_RETURN!'[CODE]'
MAX_COVERED_RETURN=TOS|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=TOS|DESCRIPTION!'[CODE]'
LAST=TOS|LAST!'[CODE]'
CHANGE=TOS|NET_CHANGE!'[CODE]'
PERCENT_CHANGE=TOS|PERCENT_CHANGE!'[CODE]'
LAST_SIZE=TOS|LAST_SIZE!'[CODE]'
LAST_X=TOS|LX!'[CODE]'
MARK=TOS|MARK!'[CODE]'
MARK_CHANGE=TOS|MARK_CHANGE!'[CODE]'
MARK_PERCENT_CHANGE=TOS|MARK_PERCENT_CHANGE!'[CODE]'
BID=TOS|BID!'[CODE]'
ASK=TOS|ASK!'[CODE]'
BID_SIZE=TOS|BID_SIZE!'[CODE]'
ASK_SIZE=TOS|ASK_SIZE!'[CODE]'
BID_ASK_SIZE=TOS|BA_SIZE!'[CODE]'
BID_X=TOS|BX!'[CODE]'
ASK_X=TOS|AX!'[CODE]'
OPEN=TOS|OPEN!'[CODE]'
HIGH=TOS|HIGH!'[CODE]'
LOW=TOS|LOW!'[CODE]'
CLOSE=TOS|Close!'[CODE]'
VOLUME=TOS|VOLUME!'[CODE]'
OPEN_INT=TOS|OPEN_INT!'[CODE]'
IMPLIED_VOL=TOS|IMPL_VOL!'[CODE]'
DELTA=TOS|DELTA!'[CODE]'
GAMMA=TOS|GAMMA!'[CODE]'
THETA=TOS|THETA!'[CODE]'
VEGA=TOS|VEGA!'[CODE]'
RHO=TOS|RHO!'[CODE]'
EXTRINSIC=TOS|EXTRINSIC!'[CODE]'
INTRINSIC=TOS|INTRINSIC!'[CODE]'
PROBABILITY_ITM=TOS|PROB_OF_EXPIRING!'[CODE]'
PROBABILITY_OTM=TOS|PROB_OTM!'[CODE]'
PROBABILITY_TOUCH=TOS|PROB_OF_TOUCHING!'[CODE]'
COVERED_RETURN=TOS|COVERED_RETURN!'[CODE]'
MAX_COVERED_RETURN=TOS|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=TOS|DESCRIPTION!'[CODE]'
LAST=TOS|LAST!'[CODE]'
CHANGE=TOS|NET_CHANGE!'[CODE]'
PERCENT_CHANGE=TOS|PERCENT_CHANGE!'[CODE]'
LAST_SIZE=TOS|LAST_SIZE!'[CODE]'
LAST_X=TOS|LX!'[CODE]'
MARK=TOS|MARK!'[CODE]'
MARK_CHANGE=TOS|MARK_CHANGE!'[CODE]'
MARK_PERCENT_CHANGE=TOS|MARK_PERCENT_CHANGE!'[CODE]'
BID=TOS|BID!'[CODE]'
ASK=TOS|ASK!'[CODE]'
BID_SIZE=TOS|BID_SIZE!'[CODE]'
ASK_SIZE=TOS|ASK_SIZE!'[CODE]'
BID_ASK_SIZE=TOS|BA_SIZE!'[CODE]'
BID_X=TOS|BX!'[CODE]'
ASK_X=TOS|AX!'[CODE]'
OPEN=TOS|OPEN!'[CODE]'
HIGH=TOS|HIGH!'[CODE]'
LOW=TOS|LOW!'[CODE]'
CLOSE=TOS|Close!'[CODE]'
VOLUME=TOS|VOLUME!'[CODE]'
OPEN_INT=TOS|OPEN_INT!'[CODE]'
IMPLIED_VOL=TOS|IMPL_VOL!'[CODE]'
DELTA=TOS|DELTA!'[CODE]'
GAMMA=TOS|GAMMA!'[CODE]'
THETA=TOS|THETA!'[CODE]'
VEGA=TOS|VEGA!'[CODE]'
RHO=TOS|RHO!'[CODE]'
EXTRINSIC=TOS|EXTRINSIC!'[CODE]'
INTRINSIC=TOS|INTRINSIC!'[CODE]'
PROBABILITY_ITM=TOS|PROB_OF_EXPIRING!'[CODE]'
PROBABILITY_OTM=TOS|PROB_OTM!'[CODE]'
PROBABILITY_TOUCH=TOS|PROB_OF_TOUCHING!'[CODE]'
COVERED_RETURN=TOS|COVERED_RETURN!'[CODE]'
MAX_COVERED_RETURN=TOS|MAX_COVERED_RETURN!'[CODE]'