Option Data from Thinkorswim 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 can 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 can 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_SCHEMA | TABLE_NAME | LOAD_CODE | IS_HISTORY |
---|---|---|---|
rtd | OptionListTOS | ||
rtd | OptionsTOS | SELECT Code FROM rtd.OptionListTOS | |
rtd | OptionDayHistoryTOS | SELECT Code FROM rtd.OptionListTOS | |
rtd | OptionTickHistoryTOS | SELECT Code FROM rtd.OptionListTOS | 1 |
MySQL, MariaDB, and PostgreSQL:
TABLE_SCHEMA | TABLE_NAME | LOAD_CODE | IS_HISTORY |
---|---|---|---|
rtd | option_list_tos | ||
rtd | options_tos | SELECT CODE FROM rtd.option_list_tos | |
rtd | option_day_history_tos | SELECT CODE FROM rtd.option_list_tos | |
rtd | option_tick_history_tos | SELECT CODE FROM rtd.option_list_tos | 1 |
Oracle Database, IBM DB2, and NuoDB:
TABLE_SCHEMA | TABLE_NAME | LOAD_CODE | IS_HISTORY |
---|---|---|---|
RTD | OPTION_LIST_TOS | ||
RTD | OPTIONS_TOS | SELECT CODE FROM RTD.OPTION_LIST_TOS | |
RTD | OPTION_DAY_HISTORY_TOS | SELECT CODE FROM RTD.OPTION_LIST_TOS | |
RTD | OPTION_TICK_HISTORY_TOS | SELECT CODE FROM RTD.OPTION_LIST_TOS | 1 |
* 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_SCHEMA | TABLE_NAME | COLUMN_NAME | RTD_FORMULA | COMMENT |
---|---|---|---|---|
rtd | OptionsTOS | Code | PK | |
rtd | OptionDayHistoryTOS | Code | PK | |
rtd | OptionDayHistoryTOS | Date | =Date() | PK |
rtd | OptionTickHistoryTOS | ID | PK, IDENTITY |
MySQL, MariaDB, and PostgreSQL:
TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | RTD_FORMULA | COMMENT |
---|---|---|---|---|
rtd | options_tos | CODE | PK | |
rtd | option_day_history_tos | CODE | PK | |
rtd | option_day_history_tos | DATE | =Date() | PK |
rtd | option_tick_history_tos | ID | PK, IDENTITY |
Oracle Database, IBM DB2, and NuoDB:
TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | RTD_FORMULA | COMMENT |
---|---|---|---|---|
RTD | OPTIONS_TOS | CODE | PK | |
RTD | OPTION_DAY_HISTORY_TOS | CODE | PK | |
RTD | OPTION_DAY_HISTORY_TOS | DATE | =Date() | PK |
RTD | OPTION_TICK_HISTORY_TOS | ID | PK, 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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
Code | PK | |
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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
Code | PK | |
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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
ID | PK, 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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
CODE | PK | |
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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
CODE | PK | |
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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
ID | PK, 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]' |