
|
QT Streaming API - Version 1.000
|

|
INTRODUCTION
This document describes how to connect, request, retrieve and send data from QuoteTracker ™ using a Streaming API
PLEASE NOTE: QuoteTracker must be registered for it to accept incoming API connections. You can register here.
If you are a TD AMERITRADE client or a commercial product developer, you would want to use TD AMERITRADE API instead. You can email apidev@tdameritrade.com to request access.
SAMPLE APPLICATIONS
The following sample applications are made available as is. They were written by other QuoteTracker users. We have not done extensive testing to verify the functionality, though we did test to see if the basic operations are OK.
They do not necessarily cover all aspects of the API, but should be sufficient to get the idea of how things work. We have sample applications available for the following development environments:
NOTATION
It will be necessary to occasionally indicate specific binary values during the documentation of the API.
Binary value N will be shown as {N} where N is a HEX number. For example, a binary 255 will be represented as {FF}.
All numbers not in {} are base 10 unless otherwise noted. Hex numbers will be preceded with an x.
For example, 255 decimal will be shown as xFF in the documentation.
When numbers are sent or returned in XML format, they are always in ASCII, not Binary.
For example, to send 10 as part of an XML value, you would send {31}{30}
CONNECTION
The QT Server accepts standard TCP/IP connections on 127.0.0.1 IP address. The connect port used is 16240, unless otherwise set by the end-user.
Data will be accepted and transmitted, as per the protocol below, along this connection.
SESSIONS
A QT 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 a client requests data for something that is already requested, the secondary request will be ignored. If an unrecognized or an invalid request is made, an error will be returned.
MESSAGES
All messages sent TO QT Server are in XML Format.
All messages sent FROM QT Server start with a Record ID and Record Length.
The rest of the message will be either Binary or XML data.
Which format is used is determined by the Record ID.
The Record length is for the full record, including the Record ID and RecordLength Fields. Least significant byte first (45 dec will be 2D00).
Any record that the client application does not recognize should be ignored by skipping the number of bytes specified by the Record Length
Example of a Binary record where the Record ID starts with X  |
| Record ID | 2 bytes |
| Record Length | 4 bytes |
| Field ID | 2 bytes |
| Field Value | Determined by the Field ID |
| Field ID | |
| Field Value | |
| (more fields) | |
| ........ | |
|
Example of a Binary record for all other Record IDs  |
| Record ID | 2 bytes |
| Record Length | 2 bytes |
| Field ID | 2 bytes |
| Field Value | Determined by the Field ID |
| Field ID | |
| Field Value | |
| (more fields) | |
| ........ | |
|
Example of a XML record where the Record ID starts with X:
| Record ID | 2 bytes |
| Record Length | 4 bytes |
| XML | Variable Length |
Example of a XML record for all other Record IDs:
| Record ID | 2 bytes |
| Record Length | 2 bytes |
| XML | Variable Length |
|
|
NOTE: The fields returned in the record are in no particular order.
|
|
INBOUND MESSAGES (Client Application to QT Server)
QuoteTracker accepts the following requests:
| LOGIN | - Login to QT |
| RECDESC | - request descriptions of Record and Field IDs returned used by QT |
| ENUMSOURCES | - request a list of available data sources of a particular type |
| STREAMER | - Specify the QT streamer to get the data from |
| L1QUOTES | - Subscribe, Unsubscribe, or Snapshot Level I quotes |
| FUND | - (NOT IMPLEMENTED) - Snapshot Fundamental Data |
| NEWS | - Subscribe, Unsubscribe, or Snapshot News (QT Ver 3.5.8 and above) |
| GETHISTORY | - Request Historical Intraday data |
| HTTPAPI | - Issue one of the HTTP API commands from within the streaming API |
| TRADEAPI | - Trading API command |
| PING | - PING request for checking that the server is still there |
Line Feeds in requests are ignored. All requests must be terminated by a byte 255 (0xFF)
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:
| ERROR | - ID=ER (ASCII): Any Errors |
| LOGIN | - ID=LO (ASCII): Login Response |
| OK | - ID=OK (ASCII): Command acknowledgement. Returned in response to a message from the Client App. |
| STATUS | - ID=ST (ASCII): Status messages passed through from subscribed streamer if specific streamer is specified. |
| FIELD DESCRIPTION | - ID=DE (ASCII): Field Descriptions |
| ENUMERATE SOURCES | - ID=ES (ASCII): Enumerate Sources |
| LEVEL I FULL QUOTE | - ID=S1 (ASCII): Snapshot/Initial Quote |
| LEVEL I UPDATE QUOTE | - ID=L1 (ASCII): Update Quote |
| HISTORY TICK | - ID=HT (ASCII): Historical TICK data record |
| HISTORY OHLC | - ID=HO (ASCII): Historical OHLC data record |
| HISTORY END | - ID=HE (ASCII): Historical End of Data record |
| FUND DATA | - (NOT IMPLEMENTED) - ID=FD (ASCII): Snapshot |
| NEWS HEADLINE | - ID=NI (ASCII): One news headline record (QT Ver 3.5.8 and above) |
| NEWS STORY | - ID=XS (ASCII): One news story record (QT Ver 3.6.0b and above) |
| HTTP API Response | - ID=XX (ASCII): The result from the HTTP API command |
| PONG | - ID=PO (ASCII): Response to a PING |
NOTE: There is no terminating character on the records since the record length is always sent
INBOUND MESSAGE DESCRIPTIONS (Client Application to QT Server)
 |
Logging on (LOGIN) |
 |
|
| Field Name | Field Description |
| AppAPIVer | Client Application API Version – The highest version of the QT API that the application supports. |
| AppName | The name of the program accessing the API |
| AppID | (optional) Application ID - provided by QuoteTracker |
| AppAuth | (optional) Application Authorization string - provided by QuoteTracker |
| AppVer | The Version of the program accessing the API |
You must login immidiately after connecting to the socket. None of the commands will work until login is processed except RECDESC.
NOTE: AppID and AppAuth are for commercial software developers only.
These fields are needed for 3rd party applications to be able to access certain parts of the API.
For example, to be able to request the quotes in other than PASSIVE mode.
Please contact sales@quotetracker.com if you are a commercial software developer and are interested in gaining full access to the API.
EXAMPLE:
| |
<LOGIN>
<AppName>Widget Trader Pro</AppName>
<AppVer>1.0.0</AppVer>
</LOGIN>
{FF}
|
|
 |
API Record Description (RECDESC) |
 |
|
| Field Name | Field Description |
| ReqType | Request Type (SNAPshot is the only option) |
Used to request the record descriptions of all records currently used by the API. Use this request immidiately after connecting, before logging in.
Knowing the record descriptions will allow you to be able to skip new field types that may be added in future QT releases without knowing explicitly how to process them.
EXAMPLE:
| |
<RECDESC>
<ReqType>SNAP</ReqType>
</RECDESC>
{FF}
|
Result Data is returned as DE records.
|
 |
Enumerate Data Sources (ENUMSOURCES) |
 |
|
| Field Name | Field Description |
| SourceType | Source Type being Queried (L1, TRADE, SNAPNEWS, STRNEWS) |
Used to get a list of all available data sources of a particular type. The result can then be used with the STREAMER command.
EXAMPLE:
| |
<ENUMSOURCES>
<SourceType>L1</SourceType>
</ENUMSOURCES>
{FF}
|
Result Data is returned as ES records.
|
 |
Streamer Specification (STREAMER) |
 |
|
| Field Name | Field Description |
| L1SITE | PASSIVE (default), MAIN or the SDF file name |
| L1REFRESH | Refresh frequency if selecting SDF that is for an auto-refreshing site |
Used to specify where the subsequent data requests will get the data from. Valid options are:
| |
| | PASSIVE | - | QT will return whatever data it gets from datafeeds already selected (if any) |
| |
| MAIN | - | Same as PASSIVE, but QT will also subscribe/unsubscribe the given symbols with the datafeed selected on the main QT portfolio (available with AUTH Login only |
| |
| SDF/MKD Name | - | Same as PASSIVE, but QT will also subscribe/unsubscribe the given symbols with the specified datafeed (User must have login info already specified in QuoteTracker |
EXAMPLE:
| |
<STREAMER>
<L1SITE>amstr.sdf</L1SITE>
</STREAMER>
{FF}
|
|
 |
Level I quotes (L1QUOTES) |
 |
|
| Field Name | Field Description |
| ReqType | Request Type (SUB, UNSUB, LIST, UNSUBALL or SNAP) |
| SYMBOLS | One or more comma, space or tab separated symbols being requested |
Use this command to subscribe/unsubscribe/request Level I quotes.
If using SNAP as the request type, QT will return a full quote on every symbol being requested and thats it.
If using SUB (Subscribe) as the request type, QT will return a full quote on every symbol being requested,
then will send updates on the symbols as new data comes in.
LIST request works same as SUB, except that you just specify the final list of symbols that you want subscribed and QuoteTracker will SUB/UNSUBscribe as needed based on existing subscriptions. Any symbols that were previously subscribed that are not in the LIST request will be unsubscribed
Updates will continue to be sent until you unsubscribe from the symbols by calling the L1QUOTES command with UNSUBALL or UNSUB and the symbols to be unsubscribed.
You can have multiple symbols within each SYMBOLS tag and multiple SYMBOLS tags per request
NOTE: If the symbol has a comma or space in it, surround it with single quotes. If it has a single quote in it, surround in double quotes.
EXAMPLE:
| |
<L1QUOTES>
<ReqType>SUB</ReqType>
<Symbols>DELL,IBM,MSFT</Symbols>
<Symbols>’NT,T’ INTC</Symbols>
</L1QUOTES>
{FF}
|
ALSO NOTE: By default, all requests are in PASSIVE mode. In other words, if you subscribe to a symbol, you will only get updates
on that symbol if you have it actively streaming in one of the portfolios in QuoteTracker. The subscription will NOT be passed through
to the underlying datafeed if its not already subscribed to it. For ACTIVE subscriptions, you have to first call
the STREAMER command to specify the streamer to be used for the quotes.
ACTIVE requests are only available to commercial software developers and require that the LOGIN command send an
AppID and AppAuth strings, which would be provided by QuoteTracker, L.P. upon request.
|
 |
NEWS Data request (NEWS) |
 |
|
| Field Name | Field Description |
| ReqType | Request Type (SUB, UNSUB, LIST,UNSUBALL, SNAP, or STORY) |
| SYMBOLS | One or more comma, space or tab separated symbols being requested |
| FROM | From Date/Time (Optional - for SNAP request type only) |
| TO | To Date/Time (Optional - for SNAP request type only) |
Use this command to subscribe/unsubscribe/request News Data.
If using SUB as the request type, QT will send News Headlines as they come in from that point forward.
It will NOT return headlines that are already in QT. To get those, issue the news request with SNAP request type.
If using SNAP as the request type, QT will return every news story for the requested criteria (Symbol, FROM, TO).
LIST request works same as SUB, except that you just specify the final list of symbols that you want subscribed and QuoteTracker will SUB/UNSUBscribe as needed based on existing subscriptions. Any symbols that were previously subscribed that are not in the LIST request will be unsubscribed
If symbols are not specified, then news on any symbols will be returned
Updates will continue to be sent until you unsubscribe from the symbols by calling the NEWS command with UNSUBALL or UNSUB and the symbols to be unsubscribed.
You can have multiple symbols within each SYMBOLS tag and multiple SYMBOLS tags per request
NOTE: If the symbol has a comma or space in it, surround it with single quotes. If it has a single quote in it, surround in double quotes.
EXAMPLE:
| |
<NEWS>
<ReqType>SUB</ReqType>
<Symbols>DELL,IBM,MSFT</Symbols>
<Symbols>’NT,T’ INTC</Symbols>
</NEWS>
{FF}
|
or
| |
<NEWS>
<ReqType>SNAP</ReqType>
<Symbols>DELL,IBM,MSFT</Symbols>
<Symbols>’NT,T’ INTC</Symbols>
<FROM>2004/09/07 09:30:00</FROM>
<TO>2004/09/07 16:05:00</TO>
</NEWS>
{FF}
|
or
| |
<NEWS>
<ReqType>STORY</ReqType>
<ID>OX:06ze:20050414</ID>
</NEWS>
{FF}
|
News headlines will be returned in NI records.
News Stories will be returned in XS records.
|
 |
Request Historical Intraday Data(GETHISTORY) |
 |
|
| Field Name | Field Description |
| SYMBOL | The symbol for which the Backfill is being requested |
| REQTYPE | Request Type - TICK or OHLC |
| FREQ | Used with OHLC request type - the frequency for the OHLC data |
| FROM | From Date/Time |
| TO | To Date/Time |
| RTH | YES/NO (Default NO) - Regular Trading hours (if NO, then ALL data). This is based on the default timeframe for the symbol. Have to use the GUI to change. (Ver >= 3.6.3C) |
| PASSTHROUGH | YES/NO - Whether or not the backfill request should be passed through to the currently selected backfill server (READ NOTE BELOW (Ver >= 3.6.5E) |
Use this command to request backfill (historical data) on a symbol.
If RequestType is TICK, all data in the specified FROM/TO time range will be returned exactly as QuoteTracker has it.
If REQTYPE is a OHLC, then QuoteTracker will consolidate the data into OHLC records, each being X minutes where X is the FREQ.
FREQUENCY: If just a number, then its in minutes, or xD for x Days (3D for example)or 1W, 1M, 1Y.
The D, W, M, and Y frequency types are for END OF DAY data ONLY.
Frequency specified in Days can be used for any number of days. For Week Month or Year, you can only use 1W, 1M, 1Y
If FROM is not specified, all data up to the TO time will be returned. If TO is not specified, all data from FROM to current time will be returned. IF neither FROM or TO are specified, All data will be returned.
Though multiple date/time formats are supported, its best to specify Date/Time as YYYY/MM/DD HH:MM:SS (24 hour clock)
EXAMPLE:
| |
<GetHistory>
<ReqType>TICK</ReqType>
<Symbol>DELL</Symbol>
<FROM>2004/09/07 09:30:00</FROM>
<TO>2004/09/07 16:05:00</TO>
</GetHistory>
{FF}
|
Data will be returned in HT, HO, and HE records.
NOTE: If PASSTHROUGH=YES, then things work a bit differently. The only tag that needs to be specified is the SYMBOL.
All this does is trigger the backfill with whatever backfill datafeed is currently selected in QuoteTracker.
You will get 2 XN messages notifying you when Backfill on the symbol is started, and when it is done:
EXAMPLE:
| |
<NOTIFY>
<BACKFILL>
<ACTION>START</ACTION>
<Symbol>DELL</Symbol>
</BACKFILL>
</NOTIFY>
|
...
| |
<NOTIFY>
<BACKFILL>
<ACTION>DONE</ACTION>
<Symbol>DELL</Symbol>
</BACKFILL>
</NOTIFY>
|
...
| |
<NOTIFY>
<BACKHFILL>
<ACTION>DONE</ACTION>
<Symbol>DELL</Symbol>
</BACKHFILL>
</NOTIFY>
|
NOTE: BACKHFILL tag for Historical Backfill vs BACKFILL for Intraday
Once you receive the DONE notification for the symbol, you would then issue the regular GETHISTORY command with PASSTHROUGH value of NO.
|
 |
Issue one of the HTTP API commands from within the streaming API (HTTPAPI) |
 |
|
| Field Name | Field Description |
| COMMAND | The HTTP API command that you want to call |
| PARAMLIST | The parameter list for that command, exactly the same as what you would put between the parenthesis in the HTTP API command |
Use this command to issue one of the HTTP API commands from within the Streaming API
EXAMPLES:
| |
<HTTPAPI>
<COMMAND>AddStocksToPort</COMMAND>
<PARAMLIST>CURRENT,DELL,INTC,MSFT</PARAMLIST>
</HTTPAPI>
{FF}
|
This will call the AddStocksToPort HTTP command to add DELL, INTC, and MSFT to the current portfolio.
| |
<HTTPAPI>
<COMMAND>SetLinkedSymbol</COMMAND>
<PARAMLIST>DELL</PARAMLIST>
</HTTPAPI>
{FF}
|
This will call the SetLinkedSymbol HTTP command to set DELL as the currently linked symbol.
HTTP API commands always have a response. The response will be returned in XH record.
|
 |
Request to PING the server (PING) |
 |
No mandetory parameters. If you do pass it something, then the PO message will just echo it back in the response
EXAMPLE:
| |
<PING>Some Data</PING>
{FF}
|
Will receive a response of:
PO{0D}{00}Some Data
OUTBOUND MESSAGE DESCRIPTIONS (QT Server to Client Application)
NOTE: The examples below will not show Record ID or Record Length for simplicity, even though they are sent with every message.
 |
ERROR ID=ER (ASCII) |
 |
|
Result returned in XML:
| Field Name | Field Description |
| ErrorCode | Numeric error Code |
| ErrorDesc | Verbose Description of the error |
EXAMPLE:
| |
<ERROR>
<ErrorCode>1</ErrorCode>
<ErrorDesc>Bad XML Request</ErrorDesc>
</ERROR>
|
|
 |
LOGIN ID=LO (ASCII) |
 |
|
| Field Name | Field Description |
| Status | OK or FAILED |
| StatusCode |
0 - Login is OK
1 – Invalid Password
2 – Invalid Application Auth
3 – User not Registered |
| StatusDesc | Verbose Description of the reason for failure |
| ProgVer | QuoteTracker Program Version (Numeric, 3 decimal) |
| ProgVerText | QuoteTracker Program Version Text |
EXAMPLE:
| |
<LOGIN>
<Status>OK</Status>
<StatusCode>0</StatusCode>
<ProgVer>3.511</ProgVer>
<ProgVerText>3.5.1a</ProgVerText>
</LOGIN>
|
or
| |
<LOGIN>
<Status>FAILED</Status>
<StatusCode>1</StatusCode>
<StatusDesc>Invalid Password</StatusDesc>
<ProgVer>3.511</ProgVer>
<ProgVerText>3.5.1a</ProgVerText>
</LOGIN>
|
|
 |
OK ID=OK (ASCII) |
 |
|
Result returned in XML. QuoteTracker echos back whatever command is being acknowledged.
|
 |
STATUS Message ID=ST (ASCII) |
 |
|
Result returned in XML:
| Free form status text from any connected streamer(s) |
EXAMPLE:
| |
<STATUS>CONNECT</STATUS>
or
<STATUS>STOPSTART</STATUS>
|
|
 |
FIELD Descriptions ID=DE (ASCII) |
 |
|
Result returned in XML
| Field Name | Field Description |
| FIELD | The name of the field being described |
| Each Field can have 2 or 3 parameters: |
| ID | Numeric ID of the field |
| Type | The data type of the field (Text,Char,Int,Float) |
| Size | Number of bytes used by the data of the field (NOT Including the Field ID) |
EXAMPLE:
| |
<FIELDS>
<FIELD ID=1 Type=Text>Symbol</FIELD>
<FIELD ID=2 Type=Float Size=8>Bid</FIELD>
<FIELD ID=3 Type=Float Size=8>Ask</FIELD>
.....(more fields)....
</FIELDS>
|
|
 |
Enumerate Sources Result ID=ES (ASCII) |
 |
|
Result returned in XML
| Field Name | Field Description |
| FILENAME | The file name of the source configuration |
| NAME | Full text name of the source |
| SHORTNAME | Short name of the source |
| SITEID | SITE ID used to reference the source |
EXAMPLE:
| |
<SOURCES>
<SOURCETYPE>L1</SOURCETYPE>
<SOURCE>
<FILENAME>AMSTR.SDF</FILENAME>
<NAME>TD Ameritrade - Streamer (Customers Only)</NAME>
<SHORTNAME>Ameritrade</SHORTNAME>
<SITEID>AMTRADE</SITEID>
</SOURCE>
<SOURCE>
<FILENAME>MBT.SDF</FILENAME>
<NAME>MB Trading Real-Time STREAMING (Customers Only)</NAME>
<SHORTNAME>MB Trading</SHORTNAME>
<SITEID>MBT</SITEID>
</SOURCE>
</SOURCES>
|
|
 |
LEVEL I FULL QUOTE ID=S1 (ASCII) |
 |
|
Result returned in BINARY:
| Field ID | Field Name | Format/Field Description |
| 1 | Symbol | Text, null(x00) terminated |
| 2 | Bid | Float (8 bytes) |
| 3 | Ask | Float (8 bytes) |
| 4 | Last | Float (8 bytes) |
| 5 | Change | Float (8 bytes) |
| 6 | Volume | Int (8 bytes) |
| 7 | Open | Float (8 bytes) |
| 8 | Prev Close | Float (8 bytes) |
| 9 | Bid Size | Int (4 bytes) |
| 10 | Ask Size | Int (4 bytes) |
| 11 | Last Size | Int (4 bytes) |
| 12 | High | Float (8 bytes) |
| 13 | Low | Float (8 bytes) |
| 14 | Tick | Char (1 byte) |
| 15 | Date/Time | Text (14 bytes) |
| 16 | 52-Week High | Float (8 bytes) |
| 17 | 52-Week Low | Float (8 bytes) |
| 18 | Company Name | Text, null (x00) terminated |
| 19 | Prev Volume | Int (8 bytes) |
| 20 | # Trades | Int (4 bytes) |
| 21 | Avg Trade Size | Int (4 bytes) |
| 22 | Average Volume | Int (8 bytes) |
| 23 | Dividend | Float (8 bytes) |
| 24 | Earnings | Float (8 bytes) |
| 25 | Exchange | Text, null (x00) terminated |
| 26 | Market Cap | Text, null (x00) terminated |
| 27 | PE | Float (8 bytes) |
| 28 | Open Interest | Int (4 bytes) |
| 29 | UPC | Char (1 byte) |
| 30 | Yield | Float (8 bytes) |
NOTE: The fields that are returned may change. Do NOT assume a field will be returned. Also, datatypes may change in the future, though will try to keep things backward compatible. You should check the results of RECDESC request for correct real-time data descriptors.
|
 |
LEVEL I UPDATE QUOTE ID=L1 (ASCII) |
 |
|
Result returned in BINARY. The fields returned in this message are SYMBOL plus any field whose value has changed from previous quote. Possible fields are the same as in LEVEL I FULL QUOTE.
NOTE: The fields that are returned may change. Do NOT assume a field will be returned. Also, datatypes may change in the future, though will try to keep things backward compatible. You should check the results of RECDESC request for correct real-time data descriptors.
|
 |
HISTORY TICK RECORD ID=HT (ASCII) |
 |
|
Result returned in BINARY:
| Field ID | Field Name | Format/Field Description |
| 1 | Symbol | Text, null(x00) terminated |
| 2 | Bid | Float (8 bytes) |
| 3 | Ask | Float (8 bytes) |
| 4 | Last | Float (8 bytes) |
| 6 | Volume | Int (8 bytes) |
| 15 | Date/Time | Text (14 bytes) |
NOTE: Once all records for a given Historical Data request are sent, a HE record will be sent with just the symbol and no other fields.
|
 |
HISTORY OHLC RECORD ID=HO (ASCII) |
 |
|
Result returned in BINARY:
| Field ID | Field Name | Format/Field Description |
| 1 | Symbol | Text, null(x00) terminated |
| 7 | Open | Float (8 bytes) |
| 12 | High | Float (8 bytes) |
| 13 | Low | Float (8 bytes) |
| 31 | Close | Float (8 bytes) |
| 6 | Volume | Int (8 bytes) - Cumulative Volume at the end of the given time period |
| 15 | Date/Time | Text (14 bytes) |
NOTE 1: The consolidated record will be for data starting at the specified time. In other words, If 5 minute OHLC data was requested, the record with 9:30 timestamp will represent quotes with timestamps from 9:30 to 9:35, not including 9:35.
NOTE 2: Once all records for a given backfill request are sent, a HE record will be sent with just the symbol and no other fields.
|
 |
HISTORY END RECORD ID=HE (ASCII) |
 |
|
This record is sent to indicate the end of data sent for a GetHistory request. Result returned in BINARY:
| Field ID | Field Name | Format/Field Description |
| 1 | Symbol | Text, null(x00) terminated |
|
 |
NEWS Headline Record ID=NI (ASCII) |
 |
|
Result returned in BINARY:
| Field ID | Field Name | Format/Field Description |
| 15 | Headline Time | Text (14 bytes) |
| 32 | News Retrieved Time | Text (14 bytes) |
| 33 | News Headline | Text, null(x00) terminated |
| 34 | News URL | Text, null(x00) terminated |
| 37 | Story ID | Text, null(x00) terminated |
| 35 | News Source | Text, null(x00) terminated |
| 1 | Symbol | Text, null(x00) terminated. If more than one symbol, this field will be repeated |
| 36 | FLAG | Text, null(x00) terminated. Only sent if needed. Will have RUMOR or HOT as a value |
NOTE: Each record will have either the URL or Story ID in it. If URL, then you can just use that URL to get the news story.
If the Story ID is returned, then you will need to call the NEWS command with STORY request type to get the content of the story
|
 |
NEWS Story Record ID=XS (ASCII) |
 |
|
Result returned in XML
| Field Name | Field Description |
| ID | The Story ID of the requested story |
| STORY | The content of the requested story (may be HTML) |
EXAMPLE:
| |
<NEWSSTORY>
<ID>OX:06ze:20050414</ID>
<STORY>
News Story Content here. May be HTML.
</STORY>
</NEWSSTORY>
|
|
 |
HTTP API Response ID=XH (ASCII) |
 |
|
The result from the HTTP API command returned in XML
| Field Name | Field Description |
| ID | The Story ID of the requested story |
| STORY | The content of the requested story (may be HTML) |
EXAMPLE:
| |
<HTTPAPI>
<COMMAND>SETLINKEDSYMBOL</COMMAND>
<PARAMLIST>DELL</PARAMLIST>
<RETURN>OK</RETURN>
</HTTPAPI>
|
or
| |
<HTTPAPI>
<COMMAND>GETTIMEFRAME</COMMAND>
<PARAMLIST>/ESU5</PARAMLIST>
<RETURN>
<TIMEFRAME>
<SYMBOL>/ESU5</SYMBOL>
<ID>-USFUT</ID>
<NAME>CME Globex</NAME>
<TIMEFROM>15:30</TIMEFROM>
<TIMETO>15:15</TIMETO>
<ROLLOVER>15:30</ROLLOVER>
<LUNCHFROM>16:30</LUNCHFROM>
<LUNCHTO>17:00</LUNCHTO>
<LOCALTOEASTERN>01:00</LOCALTOEASTERN>
<SYSTEMTOEASTERN>01:00:08</SYSTEMTOEASTERN>
<DAYOFWEEK>XXXXX--</DAYOFWEEK>
</TIMEFRAME>
</RETURN>
</HTTPAPI>
|
|
 |
PONG Response record ID=PO (ASCII) |
 |
|
Result returned in BINARY
Response will contain exactly what was sent in the PING command just echoed back
|
|
|

|

|
|
|
|