QuoteTracker Server - API

Print this Topic  Top of Page  Introduction 

QuoteTracker has built in API servers that respond to a certain set of commands so that external programs can extract information from it while it is running.  The servers are bound to address 127.0.0.1 (local computer) only - this way any information that is received from QuoteTracker does not fall under the "redistribution" heading and we avoid legal troubles from data providers or from the exchanges.  The use of these servers do require a certain level of programming skills to be used directly. There are several third party applications currently available that make use of the servers that allow you to use them without the need of programming knowledge. Please see our website for latest updates.

 

There are two types of servers:

HTTP, where although simpler to use, returns data in snapshot mode, i.e. the data is as of the time the request is made and does not update/refresh itself until a subsequent request is made.

Socket (Streaming), a more robust server with more options and data available, is in streaming mode, i.e. will automatically stream requested updates without subsequent requests.

 

You can activate the Servers on the Misc. tab of the Preferences screen.

 

HTTP Server:

 

The HTTP server monitors port 16239 by default.  The port number is selectable in Preferences and must be specified in the function used.

 

The function calling format is:

http://127.0.0.1:PortNum/Req?FunctionName(Param1,Param2,Param2,etc.)

(where PortNum is the port number (default 16239 see above).

 

The function names and parameters are described on our website at http://www.quotetracker.com/help/qtserver.shtml.  They are not detailed here to insure that you will always see the latest/updated functions available.

 

Each call will return text. The first line of the text is the status line.  It starts with either OK or Error and may contain the error message or additional information.  The lines that follow the first one are specific to the function call used.

 

Streaming Server:

 

The Streaming server accepts standard TCP/IP connections and uses port 16240 to connect by default.  The port number is selectable in Preferences.

 

A Server session begins with a login request.  A response will be sent indicating if the login is accepted or rejected.  If accepted, then subsequent requests for data and other commands will be parsed. If rejected, the server will terminate the connection. A session is assumed to end once the connection is closed.  If an unrecognized or an invalid request is made, an error will be returned.  All messages sent to the Server are in XML Format.  All messages sent from the server start with a Record ID and Record Length. The rest of the message will be either Binary or XML data. The format used is determined by the Record ID.

 

Specific details to connect, request, retrieve and send data are described on our website at http://www.quotetracker.com/help/QTStreamingAPI.shtml.  They are not detailed here to insure that you will always see the latest/updated functions available.

 

Trading API:

 

There is also a Trading API as a subset of the Streaming API which allows you to login, place trades, and receive transaction, position and account information with brokers supported through Integrated Trading.  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.

 

Specific details for the Trading API are described on our website at http://www.quotetracker.com/help/QTTradingAPI.shtml.  They are not detailed here to insure that you will always see the latest/updated functions available.

 

NOTE: QuoteTracker must be running to get data to be used by the server.  You can use any program such as Excel that will accept input the form of a web address. For other ways to export data from QuoteTracker, please see the section on Raw Data (Time & Sales) and Intraday Charts.