Thinkorswim Real Time Data in C
A lightweight COM client for accessing real-time market data from ThinkOrSwim's RTD server.
- Windows Operating System - This application uses Windows-specific COM technology
- ThinkOrSwim Desktop Application - Must be running for the RTD server to be available
- Visual Studio or LLVM Clang or MinGW GCC - For compiling the application
To compile the application:
clang -Wall -O2 -o rtd_client.exe rtd_client.c -lole32 -loleaut32 -luuid -luser32 -DUNICODE -D_UNICODE
gcc -Wall -O2 -o rtd_client.exe rtd_client.c -lole32 -loleaut32 -luuid -luser32 -DUNICODE -D_UNICODE
Command Line (Developer Command Prompt):
cl rtd_client.c /O2 /W4 /DUNICODE /D_UNICODE /link ole32.lib oleaut32.lib uuid.lib user32.lib
- Connect to ThinkOrSwim's RTD server to receive real-time market data
- Track various data topics (LAST, BID, ASK, VOLUME, etc.)
-
Start the ThinkOrSwim desktop application
-
Run the RTD client executable
Powershell: ./rtd_client Command Prompt: rtd_client
-
Enter symbol and topic.
-
At anytime press "Enter" to change symbol or exit.
LAST
- Last trade priceBID
- Current bid priceASK
- Current ask priceVOLUME
- Trading volumeLAST_SIZE
- Size of last tradeGAMMA
- Option gamma
RTD Client - Real-time Market Data Viewer
Enter stock symbol: AAPL
Enter data topic (LAST, BID, ASK, etc): LAST
[13:45:22.124] AAPL = 167.28