Free, Real-Time Streaming Data from your TOS Platform [C,C++,Java,Python]
TOSDataBridge (TOSDB) is an open-source collection of resources for pulling real-time streaming data off of TDAmeritrade's ThinkOrSwim(TOS) platform, providing C, C++, Java and Python interfaces.
TOSDB uses TOS's antiquated, yet still useful, DDE feature, directly through the Windows API. The C / C++ interfaces are implemented as a shared library(DLL) that communicates with a back-end Windows Service. The Python and Java interfaces wrap this library in a more object-oriented, user-friendly format.
The core implementation is not portable, but the python interface does provides a thin virtualization layer over TCP. A user running Windows in a Virtual Machine, for instance, can expose the exact same python interface to a different host system running python3.
Be sure to know what build you need(x86 vs x64); it should match your system, all the modules you'll need, and your version of Python(if you plan on using the python wrapper), or your version of the Java Runtime(if you plan on using the java wrapper).
(Admin) C:\[...TOSDataBridge]\tosdb-setup.bat [x86|x64] [admin] [session]
Example 1: C:\TOSDataBridge\> tosdb-setup.bat x86
Example 2: C:\TOSDataBridge\> tosdb-setup.bat x64 admin
Example 3: C:\TOSDataBridge\> tosdb-setup.bat x64 admin 2
C:\[...TOSDataBridge]\python\python setup.py install
Start the service:
(Admin) C:\> SC start TOSDataBridge
(consider having the service begin automatically on startup to avoid this step in the future; see #9 in 'Installation Details' .)
TOSDB is released under the GNU General Public License(GPL); a copy (LICENSE.txt) should be included. If not, see http://www.gnu.org/licenses. The author reserves the right to issue current and/or future versions of TOSDB under other licensing agreements. Any party that wishes to use TOSDB, in whole or in part, in any way not explicitly stipulated by the GPL, is thereby required to obtain a separate license from the author. The author reserves all other rights.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
By choosing to use the software - under the broadest interpretation of the term "use" - you absolve the author of ANY and ALL responsibility, for ANY and ALL damages incurred; including, but not limited to, damages arising from the accuracy and/or timeliness of data the software does, or does not, provide.
Furthermore, TOSDB is in no way related to TDAmeritrade or affiliated parties; users of TOSDB must abide by their terms of service and are solely responsible for any violations therein.
Copyright (C) 2014 Jonathon Ogden