I am having trouble with the Excel RTD (Real Time Data) function and hope one of you experts can help. With the Think or Swim (TOS) platform running in the background, I open Excel and in cell A1, I enter a stock symbol, say IBM. How to Install Custom Quote Columns in ThinkOrSwim This video shows how to install custom quote columns from ThinkScript code for use in sidebar watchlists, in MarketWatch Quotes screens, and StockHacker scanner results lists on the ThinkOrSwim platform.
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).
Excel For Mac Rtd Functions Think Or Swim Suit
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:
Excel For Mac Rtd Functions Think Or Swim Trunks
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 | =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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
Code | PK | |
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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
ID | PK, 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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
CODE | PK | |
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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
CODE | PK | |
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_NAME | RTD_FORMULA | COMMENT |
---|---|---|
ID | PK, 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]) |
So you are a thinkorswim customer and you want real time data in a python environment? No problem.
First, install the xlwings module. Load up your python IDE of choice.