Access thinkorswim Option Data through DDE

Access thinkorswim Option Data through DDE

Overview

The RTD database templates include predefined tables for retrieving real-time data from thinkorswim desktop.

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

Both DDE and RTD formulas can be utilized, with RTD being the preferred method. Note that thinkorswim desktop may crash if more than 200,000 topics are requested.

DDE formulas can be converted to RTD using the patches available in the database template folders.

Data is retrieved from the thinkorswim desktop DDE server, which requires administrative privileges to run RTD DB.

Disable unnecessary columns to minimize server overhead.

The DDE server does not provide an actual data time field.
The datetime, date, and time fields are updated using local system time adjusted to the table's configured time zone (Eastern Standard Time).

Real-Time Data Tables

Table Configurations

table_schematable_nameload_codeis_history
rtdtos_option_list
rtdtos_last_option_dataSELECT code FROM rtd.tos_option_list
rtdtos_historical_option_dataSELECT code FROM rtd.tos_option_list
rtdtos_option_data_ticksSELECT code FROM rtd.tos_option_list1

* Use the table name links to navigate to their descriptions.

Task Table Examples

tos_option_list:

code
.AAPL260116C200
.AAPL260116C300
.AAPL260116P200
.AAPL260116P300

Primary Key Columns

table_schematable_namecolumn_namertd_formulacomment
rtdtos_last_option_datacodePK
rtdtos_historical_option_datacodePK
rtdtos_historical_option_datadate=Date()PK
rtdtos_option_data_ticksidPK, IDENTITY

Real-Time Data Formulas

tos_last_option_data

This table contains the most recent values of option data from thinkorswim desktop.

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

tos_historical_option_data

This table stores daily historical records of option data from thinkorswim desktop.

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

tos_option_data_ticks

This table stores tick-level history of option data from thinkorswim desktop.

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!'
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]'

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.