optional
A fast and simple c++ interface to the TD Ameritrade APIs for stock and options trading.
Note: I was informed recently the OAUTH might be broken due to an API change. I don't plan on fixing it in the near future but feel free to make a PR.
What this is.
Two main components:
-
A c++ back-end for algorithmic trading through TD Ameritrade (paper money or live trading).
- Goal is a simple interface that allows for quick backtesting and algorithm setup.
- Note: It's mostly there, although there are likely bugs, and I've continued some development offline. If you're keen on anything not here contact me and let me know.
-
A simple ncurses frontend to provide a basic terminal GUI for order placement/status, account stats, etc.
- Display list of current positions.
- Display list of current orders.
- Display balances (Cash & Sweep, Net Liq, Buying Power).
- Show option chains for a symbol.
- Note: This has largely just turned into a monitoring service for an account. The functionality is mostly in the backend.
Backend implemented as a static library. Main app links against it, as an example of how an automated trading program could do the same.
Build Requirements
- cmake
- curl development libraries
- ncurses development libraries
Building App and Unit Tests (On Linux)
- Clone and cd into
optional
.
- Make a build directory in
optional
folder: mkdir build && cd build
- Prepare build files:
cmake ../
- Build:
make
More Info
User guide (empty, tbd) is on the wiki.