IB/Tws Generic Tick Types, Tick Values

張貼日期:Feb 09, 2011 2:38:29 AM

Generic Tick Types

For all socket-based API technologies, including the socket client library, ActiveX and Java, we provide several types of market data ticks that can be requested as a part of the market data request.

Starting with API version 9.0 (client version 30), version 6 of the REQ_MKT_DATA message is sent containing a new field that specifies the requested ticks as a list of comma-delimited integer Ids (generic tick types). Requests for these ticks will be answered if the tick type requested pertains to the contract at issue.

Note that Generic Tick Tags cannot be specified if you elect to use the Snapshot market data subscription.

The generic market data tick types are:

Tick Values

The Resulting Tick Values are:

The Shortable tick tells whether SHORT SELL orders for a contract will be accepted.  The value returned from the tickGeneric(int tickerId, int tickType, double value) method can be analyzed as follows:

if (value > 2.5) { // 3.0

   // There are at least 1000 shares available for a short sale


else if (value > 1.5) { // 2.0

   // This contract will be available for short sale if shares can be       located


   else if (value > 0.5) { // 1.0

   // Not available for short sale


   else {

   // unknown value


Note:   This feature is supported as of server version 33 (872 release of TWS).


The FUNDAMENTAL_RATIOS tickType (Tick Value 47) lets you request fundamental ratios in the form TAG=VALUE, TAG2=VALUE2, and so on. This ratios are sent using the tickGeneric() callback. The following table lists all the TAG values for FUNDAMENTAL_RATIOS.

Ref1: http://www.ibyingtou.com/php/apiUsersGuide/apiguide/api/generic_tick_types.htm

Ref2: http://www.ibyingtou.com/php/apiUsersGuide/apiguide/api/tick_values.htm#XREF_tick_values_generic_tick