Quotes from Thinkorswim via DDE

Quotes from Thinkorswim via DDE

Overview

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

Quote tables are designed for getting data for stocks, futures, and currency pairs. Use option tables for options.

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_SCHEMATABLE_NAMELOAD_CODEIS_HISTORY
rtdQuoteListTOS
rtdQuotesTOSSELECT Code AS Symbol FROM rtd.QuoteListTOS
rtdQuoteDayHistoryTOSSELECT Code AS Symbol FROM rtd.QuoteListTOS
rtdQuoteTickHistoryTOSSELECT Code AS Symbol FROM rtd.QuoteListTOS1

MySQL, MariaDB, and PostgreSQL:

TABLE_SCHEMATABLE_NAMELOAD_CODEIS_HISTORY
rtdquote_list_tos
rtdquotes_tosSELECT CODE AS SYMBOL FROM rtd.quote_list_tos
rtdquote_day_history_tosSELECT CODE AS SYMBOL FROM rtd.quote_list_tos
rtdquote_tick_history_tosSELECT CODE AS SYMBOL FROM rtd.quote_list_tos1

Oracle Database, IBM DB2, and NuoDB:

TABLE_SCHEMATABLE_NAMELOAD_CODEIS_HISTORY
RTDQUOTE_LIST_TOS
RTDQUOTES_TOSSELECT CODE AS SYMBOL FROM RTD.QUOTE_LIST_TOS
RTDQUOTE_DAY_HISTORY_TOSSELECT CODE AS SYMBOL FROM RTD.QUOTE_LIST_TOS
RTDQUOTE_TICK_HISTORY_TOSSELECT CODE AS SYMBOL FROM RTD.QUOTE_LIST_TOS1

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

Task Table Examples

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

Code
AAPL
GOOG

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

CODE
AAPL
GOOG

Primary Key Columns

Microsoft SQL Server and Microsoft SQL Server Compact:

TABLE_SCHEMATABLE_NAMECOLUMN_NAMERTD_FORMULACOMMENT
rtdQuotesTOSSymbolPK
rtdQuoteDayHistoryTOSSymbolPK
rtdQuoteDayHistoryTOSDate=Date()PK
rtdQuoteTickHistoryTOSIDPK, IDENTITY

MySQL, MariaDB, and PostgreSQL:

TABLE_SCHEMATABLE_NAMECOLUMN_NAMERTD_FORMULACOMMENT
rtdquotes_tosSYMBOLPK
rtdquote_day_history_tosSYMBOLPK
rtdquote_day_history_tosDATE=Date()PK
rtdquote_tick_history_tosIDPK, IDENTITY

Oracle Database, IBM DB2, and NuoDB:

TABLE_SCHEMATABLE_NAMECOLUMN_NAMERTD_FORMULACOMMENT
RTDQUOTES_TOSSYMBOLPK
RTDQUOTE_DAY_HISTORY_TOSSYMBOLPK
RTDQUOTE_DAY_HISTORY_TOSDATE=Date()PK
RTDQUOTE_TICK_HISTORY_TOSIDPK, IDENTITY

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

rtd.QuotesTOS

The table contains the last data values of stocks, futures, and currency pairs from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
SymbolPK
DateTime=DateTime()
Date=Date()
Time=Time()
Description=TOS|DESCRIPTION![Symbol]
Last=TOS|LAST![Symbol]
Change=TOS|NET_CHANGE![Symbol]
PercentChange=TOS|PERCENT_CHANGE![Symbol]
LastSize=TOS|LAST_SIZE![Symbol]
LastX=TOS|LX![Symbol]
Mark=TOS|MARK![Symbol]
MarkChange=TOS|MARK_CHANGE![Symbol]
MarkPercentChange=TOS|MARK_PERCENT_CHANGE![Symbol]
Bid=TOS|BID![Symbol]
Ask=TOS|ASK![Symbol]
BidSize=TOS|BID_SIZE![Symbol]
AskSize=TOS|ASK_SIZE![Symbol]
BidAskSize=TOS|BA_SIZE![Symbol]
BidX=TOS|BX![Symbol]
AskX=TOS|AX![Symbol]
StrengthMeter=TOS|STRENGTH_METER![Symbol]
Open=TOS|OPEN![Symbol]
High=TOS|HIGH![Symbol]
Low=TOS|LOW![Symbol]
Close=TOS|CLOSE![Symbol]
Volume=TOS|VOLUME![Symbol]
OpenInt=TOS|OPEN_INT![Symbol]
ImpliedVol=TOS|IMPL_VOL![Symbol]
VolIndex=TOS|VOL_INDEX![Symbol]
FrontVol=TOS|FRONT_VOL![Symbol]
BackVol=TOS|BACK_VOL![Symbol]
WeightedBackVol=TOS|WEIGHTED_BACK_VOL![Symbol]
VolDiff=TOS|VOL_DIFF![Symbol]
PutCallRatio=TOS|PUT_CALL_RATIO![Symbol]
CallVolumeIndex=TOS|CALL_VOLUME_INDEX![Symbol]
PutVolumeIndex=TOS|PUT_VOLUME_INDEX![Symbol]
OptionVolumeIndex=TOS|OPTION_VOLUME_INDEX![Symbol]
FrontExpectedMove=TOS|FRONT_EX_MOVE![Symbol]
BackExpectedMove=TOS|BACK_EX_MOVE![Symbol]
ExpectedMoveDiff=TOS|EX_MOVE_DIFF![Symbol]
Beta=TOS|BETA![Symbol]
High52=TOS|'52HIGH'![Symbol]
Low52=TOS|'52LOW'![Symbol]
PE=TOS|PE![Symbol]
EPS=TOS|EPS![Symbol]
MarketCap=TOS|MARKET_CAP![Symbol]
Shares=TOS|SHARES![Symbol]
DividendYield=TOS|YIELD![Symbol]
DividendShare=TOS|DIV![Symbol]
LastUpdateTimeStamp

rtd.QuoteDayHistoryTOS

The table contains day data history of stocks, futures, and currency pairs from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
SymbolPK
Date=Date()PK
Time=Time()
Description=TOS|DESCRIPTION![Symbol]
Last=TOS|LAST![Symbol]
Change=TOS|NET_CHANGE![Symbol]
PercentChange=TOS|PERCENT_CHANGE![Symbol]
LastSize=TOS|LAST_SIZE![Symbol]
LastX=TOS|LX![Symbol]
Mark=TOS|MARK![Symbol]
MarkChange=TOS|MARK_CHANGE![Symbol]
MarkPercentChange=TOS|MARK_PERCENT_CHANGE![Symbol]
Bid=TOS|BID![Symbol]
Ask=TOS|ASK![Symbol]
BidSize=TOS|BID_SIZE![Symbol]
AskSize=TOS|ASK_SIZE![Symbol]
BidAskSize=TOS|BA_SIZE![Symbol]
BidX=TOS|BX![Symbol]
AskX=TOS|AX![Symbol]
StrengthMeter=TOS|STRENGTH_METER![Symbol]
Open=TOS|OPEN![Symbol]
High=TOS|HIGH![Symbol]
Low=TOS|LOW![Symbol]
Close=TOS|CLOSE![Symbol]
Volume=TOS|VOLUME![Symbol]
OpenInt=TOS|OPEN_INT![Symbol]
ImpliedVol=TOS|IMPL_VOL![Symbol]
VolIndex=TOS|VOL_INDEX![Symbol]
FrontVol=TOS|FRONT_VOL![Symbol]
BackVol=TOS|BACK_VOL![Symbol]
WeightedBackVol=TOS|WEIGHTED_BACK_VOL![Symbol]
VolDiff=TOS|VOL_DIFF![Symbol]
PutCallRatio=TOS|PUT_CALL_RATIO![Symbol]
CallVolumeIndex=TOS|CALL_VOLUME_INDEX![Symbol]
PutVolumeIndex=TOS|PUT_VOLUME_INDEX![Symbol]
OptionVolumeIndex=TOS|OPTION_VOLUME_INDEX![Symbol]
FrontExpectedMove=TOS|FRONT_EX_MOVE![Symbol]
BackExpectedMove=TOS|BACK_EX_MOVE![Symbol]
ExpectedMoveDiff=TOS|EX_MOVE_DIFF![Symbol]
Beta=TOS|BETA![Symbol]
High52=TOS|'52HIGH'![Symbol]
Low52=TOS|'52LOW'![Symbol]
PE=TOS|PE![Symbol]
EPS=TOS|EPS![Symbol]
MarketCap=TOS|MARKET_CAP![Symbol]
Shares=TOS|SHARES![Symbol]
DividendYield=TOS|YIELD![Symbol]
DividendShare=TOS|DIV![Symbol]
LastUpdateTimeStamp

rtd.QuoteTickHistoryTOS

The table contains tick data history of stocks, futures, and currency pairs from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
IDPK, IDENTITY
Symbol
DateTime=DateTime()
Date=Date()
Time=Time()
Description=TOS|DESCRIPTION![Symbol]
Last=TOS|LAST![Symbol]
Change=TOS|NET_CHANGE![Symbol]
PercentChange=TOS|PERCENT_CHANGE![Symbol]
LastSize=TOS|LAST_SIZE![Symbol]
LastX=TOS|LX![Symbol]
Mark=TOS|MARK![Symbol]
MarkChange=TOS|MARK_CHANGE![Symbol]
MarkPercentChange=TOS|MARK_PERCENT_CHANGE![Symbol]
Bid=TOS|BID![Symbol]
Ask=TOS|ASK![Symbol]
BidSize=TOS|BID_SIZE![Symbol]
AskSize=TOS|ASK_SIZE![Symbol]
BidAskSize=TOS|BA_SIZE![Symbol]
BidX=TOS|BX![Symbol]
AskX=TOS|AX![Symbol]
StrengthMeter=TOS|STRENGTH_METER![Symbol]
Open=TOS|OPEN![Symbol]
High=TOS|HIGH![Symbol]
Low=TOS|LOW![Symbol]
Close=TOS|CLOSE![Symbol]
Volume=TOS|VOLUME![Symbol]
OpenInt=TOS|OPEN_INT![Symbol]
ImpliedVol=TOS|IMPL_VOL![Symbol]
VolIndex=TOS|VOL_INDEX![Symbol]
FrontVol=TOS|FRONT_VOL![Symbol]
BackVol=TOS|BACK_VOL![Symbol]
WeightedBackVol=TOS|WEIGHTED_BACK_VOL![Symbol]
VolDiff=TOS|VOL_DIFF![Symbol]
PutCallRatio=TOS|PUT_CALL_RATIO![Symbol]
CallVolumeIndex=TOS|CALL_VOLUME_INDEX![Symbol]
PutVolumeIndex=TOS|PUT_VOLUME_INDEX![Symbol]
OptionVolumeIndex=TOS|OPTION_VOLUME_INDEX![Symbol]
FrontExpectedMove=TOS|FRONT_EX_MOVE![Symbol]
BackExpectedMove=TOS|BACK_EX_MOVE![Symbol]
ExpectedMoveDiff=TOS|EX_MOVE_DIFF![Symbol]
Beta=TOS|BETA![Symbol]
High52=TOS|'52HIGH'![Symbol]
Low52=TOS|'52LOW'![Symbol]
PE=TOS|PE![Symbol]
EPS=TOS|EPS![Symbol]
MarketCap=TOS|MARKET_CAP![Symbol]
Shares=TOS|SHARES![Symbol]
DividendYield=TOS|YIELD![Symbol]
DividendShare=TOS|DIV![Symbol]

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

rtd.quotes_tos

The table contains the last data values of stocks, futures, and currency pairs from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
SYMBOLPK
DATETIME=DateTime()
DATE=Date()
TIME=Time()
DESCRIPTION=TOS|DESCRIPTION![SYMBOL]
LAST=TOS|LAST![SYMBOL]
CHANGE=TOS|NET_CHANGE![SYMBOL]
PERCENT_CHANGE=TOS|PERCENT_CHANGE![SYMBOL]
LAST_SIZE=TOS|LAST_SIZE![SYMBOL]
LAST_X=TOS|LX![SYMBOL]
MARK=TOS|MARK![SYMBOL]
MARK_CHANGE=TOS|MARK_CHANGE![SYMBOL]
MARK_PERCENT_CHANGE=TOS|MARK_PERCENT_CHANGE![SYMBOL]
BID=TOS|BID![SYMBOL]
ASK=TOS|ASK![SYMBOL]
BID_SIZE=TOS|BID_SIZE![SYMBOL]
ASK_SIZE=TOS|ASK_SIZE![SYMBOL]
BID_ASK_SIZE=TOS|BA_SIZE![SYMBOL]
BID_X=TOS|BX![SYMBOL]
ASK_X=TOS|AX![SYMBOL]
STRENGTH_METER=TOS|STRENGTH_METER![SYMBOL]
OPEN=TOS|OPEN![SYMBOL]
HIGH=TOS|HIGH![SYMBOL]
LOW=TOS|LOW![SYMBOL]
CLOSE=TOS|CLOSE![SYMBOL]
VOLUME=TOS|VOLUME![SYMBOL]
OPEN_INT=TOS|OPEN_INT![SYMBOL]
IMPLIED_VOL=TOS|IMPL_VOL![SYMBOL]
VOL_INDEX=TOS|VOL_INDEX![SYMBOL]
FRONT_VOL=TOS|FRONT_VOL![SYMBOL]
BACK_VOL=TOS|BACK_VOL![SYMBOL]
WEIGHTED_BACK_VOL=TOS|WEIGHTED_BACK_VOL![SYMBOL]
VOL_DIFF=TOS|VOL_DIFF![SYMBOL]
PUT_CALL_RATIO=TOS|PUT_CALL_RATIO![SYMBOL]
CALL_VOLUME_INDEX=TOS|CALL_VOLUME_INDEX![SYMBOL]
PUT_VOLUME_INDEX=TOS|PUT_VOLUME_INDEX![SYMBOL]
OPTION_VOLUME_INDEX=TOS|OPTION_VOLUME_INDEX![SYMBOL]
FRONT_EXPECTED_MOVE=TOS|FRONT_EX_MOVE![SYMBOL]
BACK_EXPECTED_MOVE=TOS|BACK_EX_MOVE![SYMBOL]
EXPECTED_MOVE_DIFF=TOS|EX_MOVE_DIFF![SYMBOL]
BETA=TOS|BETA![SYMBOL]
HIGH52=TOS|'52HIGH'![SYMBOL]
LOW52=TOS|'52LOW'![SYMBOL]
PE=TOS|PE![SYMBOL]
EPS=TOS|EPS![SYMBOL]
MARKET_CAP=TOS|MARKET_CAP![SYMBOL]
SHARES=TOS|SHARES![SYMBOL]
DIVIDEND_YIELD=TOS|YIELD![SYMBOL]
DIVIDEND_SHARE=TOS|DIV![SYMBOL]
LAST_UPDATE_TIMESTAMP

rtd.quote_day_history_tos

The table contains day data history of stocks, futures, and currency pairs from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
SYMBOLPK
DATE=Date()PK
TIME=Time()
DESCRIPTION=TOS|DESCRIPTION![SYMBOL]
LAST=TOS|LAST![SYMBOL]
CHANGE=TOS|NET_CHANGE![SYMBOL]
PERCENT_CHANGE=TOS|PERCENT_CHANGE![SYMBOL]
LAST_SIZE=TOS|LAST_SIZE![SYMBOL]
LAST_X=TOS|LX![SYMBOL]
MARK=TOS|MARK![SYMBOL]
MARK_CHANGE=TOS|MARK_CHANGE![SYMBOL]
MARK_PERCENT_CHANGE=TOS|MARK_PERCENT_CHANGE![SYMBOL]
BID=TOS|BID![SYMBOL]
ASK=TOS|ASK![SYMBOL]
BID_SIZE=TOS|BID_SIZE![SYMBOL]
ASK_SIZE=TOS|ASK_SIZE![SYMBOL]
BID_ASK_SIZE=TOS|BA_SIZE![SYMBOL]
BID_X=TOS|BX![SYMBOL]
ASK_X=TOS|AX![SYMBOL]
STRENGTH_METER=TOS|STRENGTH_METER![SYMBOL]
OPEN=TOS|OPEN![SYMBOL]
HIGH=TOS|HIGH![SYMBOL]
LOW=TOS|LOW![SYMBOL]
CLOSE=TOS|CLOSE![SYMBOL]
VOLUME=TOS|VOLUME![SYMBOL]
OPEN_INT=TOS|OPEN_INT![SYMBOL]
IMPLIED_VOL=TOS|IMPL_VOL![SYMBOL]
VOL_INDEX=TOS|VOL_INDEX![SYMBOL]
FRONT_VOL=TOS|FRONT_VOL![SYMBOL]
BACK_VOL=TOS|BACK_VOL![SYMBOL]
WEIGHTED_BACK_VOL=TOS|WEIGHTED_BACK_VOL![SYMBOL]
VOL_DIFF=TOS|VOL_DIFF![SYMBOL]
PUT_CALL_RATIO=TOS|PUT_CALL_RATIO![SYMBOL]
CALL_VOLUME_INDEX=TOS|CALL_VOLUME_INDEX![SYMBOL]
PUT_VOLUME_INDEX=TOS|PUT_VOLUME_INDEX![SYMBOL]
OPTION_VOLUME_INDEX=TOS|OPTION_VOLUME_INDEX![SYMBOL]
FRONT_EXPECTED_MOVE=TOS|FRONT_EX_MOVE![SYMBOL]
BACK_EXPECTED_MOVE=TOS|BACK_EX_MOVE![SYMBOL]
EXPECTED_MOVE_DIFF=TOS|EX_MOVE_DIFF![SYMBOL]
BETA=TOS|BETA![SYMBOL]
HIGH52=TOS|'52HIGH'![SYMBOL]
LOW52=TOS|'52LOW'![SYMBOL]
PE=TOS|PE![SYMBOL]
EPS=TOS|EPS![SYMBOL]
MARKET_CAP=TOS|MARKET_CAP![SYMBOL]
SHARES=TOS|SHARES![SYMBOL]
DIVIDEND_YIELD=TOS|YIELD![SYMBOL]
DIVIDEND_SHARE=TOS|DIV![SYMBOL]
LAST_UPDATE_TIMESTAMP

rtd.quote_tick_history_tos

The table contains tick data history of stocks, futures, and currency pairs from Thinkorswim thinkDesktop.

COLUMN_NAMERTD_FORMULACOMMENT
IDPK, IDENTITY
SYMBOL
DATETIME=DateTime()
DATE=Date()
TIME=Time()
DESCRIPTION=TOS|DESCRIPTION![SYMBOL]
LAST=TOS|LAST![SYMBOL]
CHANGE=TOS|NET_CHANGE![SYMBOL]
PERCENT_CHANGE=TOS|PERCENT_CHANGE![SYMBOL]
LAST_SIZE=TOS|LAST_SIZE![SYMBOL]
LAST_X=TOS|LX![SYMBOL]
MARK=TOS|MARK![SYMBOL]
MARK_CHANGE=TOS|MARK_CHANGE![SYMBOL]
MARK_PERCENT_CHANGE=TOS|MARK_PERCENT_CHANGE![SYMBOL]
BID=TOS|BID![SYMBOL]
ASK=TOS|ASK![SYMBOL]
BID_SIZE=TOS|BID_SIZE![SYMBOL]
ASK_SIZE=TOS|ASK_SIZE![SYMBOL]
BID_ASK_SIZE=TOS|BA_SIZE![SYMBOL]
BID_X=TOS|BX![SYMBOL]
ASK_X=TOS|AX![SYMBOL]
STRENGTH_METER=TOS|STRENGTH_METER![SYMBOL]
OPEN=TOS|OPEN![SYMBOL]
HIGH=TOS|HIGH![SYMBOL]
LOW=TOS|LOW![SYMBOL]
CLOSE=TOS|CLOSE![SYMBOL]
VOLUME=TOS|VOLUME![SYMBOL]
OPEN_INT=TOS|OPEN_INT![SYMBOL]
IMPLIED_VOL=TOS|IMPL_VOL![SYMBOL]
VOL_INDEX=TOS|VOL_INDEX![SYMBOL]
FRONT_VOL=TOS|FRONT_VOL![SYMBOL]
BACK_VOL=TOS|BACK_VOL![SYMBOL]
WEIGHTED_BACK_VOL=TOS|WEIGHTED_BACK_VOL![SYMBOL]
VOL_DIFF=TOS|VOL_DIFF![SYMBOL]
PUT_CALL_RATIO=TOS|PUT_CALL_RATIO![SYMBOL]
CALL_VOLUME_INDEX=TOS|CALL_VOLUME_INDEX![SYMBOL]
PUT_VOLUME_INDEX=TOS|PUT_VOLUME_INDEX![SYMBOL]
OPTION_VOLUME_INDEX=TOS|OPTION_VOLUME_INDEX![SYMBOL]
FRONT_EXPECTED_MOVE=TOS|FRONT_EX_MOVE![SYMBOL]
BACK_EXPECTED_MOVE=TOS|BACK_EX_MOVE![SYMBOL]
EXPECTED_MOVE_DIFF=TOS|EX_MOVE_DIFF![SYMBOL]
BETA=TOS|BETA![SYMBOL]
HIGH52=TOS|'52HIGH'![SYMBOL]
LOW52=TOS|'52LOW'![SYMBOL]
PE=TOS|PE![SYMBOL]
EPS=TOS|EPS![SYMBOL]
MARKET_CAP=TOS|MARKET_CAP![SYMBOL]
SHARES=TOS|SHARES![SYMBOL]
DIVIDEND_YIELD=TOS|YIELD![SYMBOL]
DIVIDEND_SHARE=TOS|DIV![SYMBOL]