|
TD AMERITRADE NOTE:
If you are using QuoteTracker API for Trading through TD AMERITRADE and are a high volume trader, you may benefit from connecting to TD AMERITRADE API directly. (You can continue to use QT API if you wish)
In order to do that, please email
TD AMERITRADE API Support
and indicate approximate trade volume per day and the development environment that you are using.
|
|
NOTE: QT VERSION 3.5.9H has a major change.
NOTIFICATION Message was changed to code XN, All records with Record ID starting with X will have a 4 byte record length.
INTRODUCTION
This document describes how to login, place trades, and receive transaction, position and account information with brokers supported for QuoteTracker ™ Integrated Trading using QuoteTracker ™ Trading API
PLEASE NOTE: QuoteTracker must be registered for it to accept incoming API connections. You can
register here.
If you are a
commercial product developer, please
contact us about the development and we will provide a registration code for testing purposes.
"Commercial Product" refers to something that will be marketed to the general public. Not for personal or internal use.
BASIC PROTOCOL & NOTATION
The trading API is a subset of QuoteTracker Streaming API, so please refer to the
Streaming API Documentation for basic protocol notation and connection information
TRADING SESSIONS
Once you are connected and
logged into the Streaming API session, you can
START multiple trading sessions.
Each trading session can be with a different broker, or same broker but different account.
When starting the trade session, you have to specify the broker configuration file to use and the User ID, Password (and Account Number if needed) for the account that should be logged in.
The account in question does NOT have to be pre-defined in QuoteTracker.
INBOUND MESSAGES (Client Application to QT Server)
All messages, commands, transactions, etc. sent from the client application
TO QT Server should be in XML Format.
All Trade API commands will be inside of TRADEAPI top level tag, with an ACTION tag inside it.
All other tags will depend on the value of the ACTION tag.
QuoteTracker accepts the following top level ACTION commands:
| START | - Starts a new trading session |
| STOP | - Stops an existing trading session |
| SEND | - Sends a command to QuoteTracker (NEWORDER, CANCEL, etc) |
OUTBOUND MESSAGES (QT Server to Application)
QT will return various types of data records both to requests outlined in Inbound Messages as well as
unrequested notification messages, such as Shutdown, disconnect, and other status messages.
The following is a list of all messages returned:
| OK | - ID=OK (ASCII): Session START/STOP acknowledgement. |
| NOTIFICATION | - ID=XN (ASCII): Notification - all results, errors (from broker or parsing), etc. |
| ERROR | - ID=ER (ASCII): Any Errors |