IB/Tws Generic Tick Types, Tick Values

張貼者:2011年2月8日 下午6:38Wei-Xiuang Wang   [ 已更新 2011年2月8日 下午7:05 ]

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:

Integer ID Value

Tick Type

Resulting Tick Value (see list below)

100

Option Volume (currently for stocks)

29, 30

101

Option Open Interest (currently for stocks)

27, 28

104

Historical Volatility (currently for stocks)

23

106

Option Implied Volatility (currently for stocks)

24

162

Index Future Premium

31

165

Miscellaneous Stats

15, 16, 17, 18, 19, 20, 21

221

Mark Price (used in TWS P&L computations)

37

225

Auction values (volume, price and imbalance)

34, 35, 36

236

Shortable (see “Tick Values” for more information)

46

Tick Values

The Resulting Tick Values are:

Tick Values

Description

0

BID_SIZE

1

BID

2

ASK

3

ASK_SIZE

4

LAST

5

LAST_SIZE

6

HIGH

7

LOW

8

VOLUME

9

CLOSE

10

BID_OPTION_COMPUTATION

11

ASK_OPTION_COMPUTATION

12

LAST_OPTION_COMPUTATION

13

MODEL_OPTION

14

OPEN


Tick Values

Description

15

LOW_13_WEEK

16

HIGH_13_WEEK

17

LOW_26_WEEK

18

HIGH_26_WEEK

19

LOW_52_WEEK

20

HIGH_52_WEEK

21

AVG_VOLUME

23

OPTION_HISTORICAL_VOL

24

OPTION_IMPLIED_VOL

27

OPTION_CALL_OPEN_INTEREST

28

OPTION_PUT_OPEN_INTEREST

29

OPTION_CALL_VOLUME

30

OPTION_PUT_VOLUME

31

INDEX_FUTURE_PREMIUM

34

AUCTION_VOLUME

35

AUCTION_PRICE

36

AUCTION_IMBALANCE

37

MARK_PRICE

46

SHORTABLE

47

FUNDAMENTAL_RATIOS

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).

TAG Values for FUNDAMENTAL_RATIOS tickType

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.

TAG

Description

NPRICE

Closing Price
This is the closing price for the issue from the day it last traded. It is also referred to as the Current Price. Note that some issues may not trade every day, and therefore it is possible for this price to come from a date prior to the last business day.

Three_Year_TTM_
Growth

3 year trailing twelve months growth.

TTM_over_TTM

Trailing twelve months over trailing twelve months.

NHIG

High Price
This price is the highest price the stock traded at in the last 12 months. This could be an intra-day high.

NLOW

Low Price
This price is the lowest price the stock traded at in the last 12 months. This could be an intra-day low.

PDATE

Pricing date
The pricing date is the date at which the issue was last priced.

VOL10DAVG

Volume
This is the daily average of the cumulative trading volume for the last ten days.

MKTCAP

Market capitalization
This value is calculated by multiplying the current Price by the current number of shares outstanding.

TTMEPSXCLX

EPS excluding extraordinary items
This is the Adjusted Income Available to Common Stockholders for the trailing twelve months divided by the trailing twelve month Diluted Weighted Average Shares Outstanding.

AEPSNORM

EPS Normalized
This is the Normalized Income Available to Common Stockholders for the most recent annual period divided by the same period's Diluted Weighted Average Shares Outstanding.

TTMREVPS

Revenue/share
This value is the trailing twelve month Total Revenue divided by the Average Diluted Shares Outstanding for the trailing twelve months.

Note:   Most banks and insurance companies do not report revenues when they announce their preliminary quarterly financial results in the press. When this happens, the trailing twelve month values will not be available (NA).

QBVPS

Book value (Common Equity) per share
This is defined as the Common Shareholder's Equity divided by the Shares Outstanding at the end of the most recent interim period. Book Value is the Total Shareholder's Equity minus Preferred Stock and Redeemable Preferred Stock.

QTANBVPS

Book value (tangible) per share
This is the interim Tangible Book Value divided by the Shares Outstanding at the end of the most recent interim period. Tangible Book Value is the Book Value minus Goodwill and Intangible Assets for the same period.

QCSHPS

Cash per share
This is the Total Cash plus Short Term Investments divided by the Shares Outstanding at the end of the most recent interim period.

Note:   This does NOT include cash equivalents that may be reported under long term assets.

TTMCFSHR

Cash Flow per share
This value is the trailing twelve month Cash Flow divided by the trailing twelve month Average Shares Outstanding. Cash Flow is defined as the sum of Income After Taxes minus Preferred Dividends and General Partner Distributions plus Depreciation, Depletion and Amortization.

TTMDIVSHR

Dividends per share
This is the sum of the Cash Dividends per share paid to common stockholders during the last trailing twelve month period.

IAD

Dividend rate
This value is the total of the expected dividend payments over the next twelve months. It is generally the most recent cash dividend paid or declared multiplied by the dividend payment frequency, plus any recurring extra dividends.

PEEXCLXOR

P/E excluding extraordinary items
This ratio is calculated by dividing the current Price by the sum of the Diluted Earnings Per Share from continuing operations BEFORE Extraordinary Items and Accounting Changes over the last four interim periods.

APENORM

P/E Normalized
This is the Current Price divided by the latest annual Normalized Earnings Per Share value.

TMPR2REV

Price to sales
This is the current Price divided by the Sales Per Share for the trailing twelve months. If there is a preliminary earnings announcement for an interim period that has recently ended, the revenue (sales) values from this announcement will be used in calculating the trailing twelve month revenue per share. NOTE: Most Banks and Finance companies do not report revenues when they announce their preliminary interim financial results in the press. When this happens, the trailing twelve month values will not be available (NA) until the complete interim filing is released.

PR2TANBK

Price to Tangible Book
This is the Current Price divided by the latest annual Tangible Book Value Per Share. Tangible Book Value Per Share is defined as Book Value minus Goodwill and Intangible Assets divided by the Shares Outstanding at the end of the fiscal period.

TTMPRCFPS

Price to Cash Flow per share
This is the current Price divided by Cash Flow Per Share for the trailing twelve months. Cash Flow is defined as Income After Taxes minus Preferred Dividends and General Partner Distributions plus Depreciation, Depletion and Amortization.

PRICE2BK

Price to Book
This is the Current Price divided by the latest interim period Book Value Per Share.

QCURRATIO

Current ratio
This is the ratio of Total Current Assets for the most recent interim period divided by Total Current Liabilities for the same period. NOTE: This item is Not Available (NA) for Banks, Insurance companies and other companies that do not distinguish between current and long term assets and liabilities.

QQUICKRATI

Quick ratio
Also known as the Acid Test Ratio, this ratio is defined as Cash plus Short Term Investments plus Accounts Receivable for the most recent interim period divided by the Total Current Liabilities for the same period. NOTE: This item is Not Available (NA) for Banks, Insurance companies and other companies that do not distinguish between current and long term assets and liabilities.

QLTD2EQ

LT debt/equity
This ratio is the Total Long Term Debt for the most recent interim period divided by Total Shareholder Equity for the same period.

QTOTD2EQ

Total debt/total equity
This ratio is Total Debt for the most recent interim period divided by Total Shareholder Equity for the same period. NOTE: This is Not Meaningful (NM) for banks.

TTMPAYRAT

Payout ratio
This ratio is the percentage of the Primary/Basic Earnings Per Share Excluding Extraordinary Items paid to common stockholders in the form of cash dividends during the trailing twelve months.

TTMREV

Revenue
This is the sum of all revenue (sales) reported for all operating divisions for the most recent TTM period. NOTE: Most banks and Insurance companies do not report revenues when they announce their preliminary quarterly financial results in the press. When this happens, the quarterly value will not be available (NA).

TTMEBITD

EBITD
Earnings Before Interest, Taxes, Depreciation and Amortization (EBITDA) is EBIT for the trailing twelve months plus the same period's Depreciation and Amortization expenses (from the Statement of Cash Flows). NOTE: This item is only available for Industrial and Utility companies.

TTMEBT

Earnings before taxes
Also known as Pretax Income and Earnings Before Taxes, this is Total Revenue for the most recent TTM period minus Total Expenses plus Non-operating Income (Expenses) for the same period.

TTMNIAC

Net Income available to common
This is the trailing twelve month dollar amount accruing to common shareholders for dividends and retained earnings. Income Available to Common Shareholders is calculated as trailing twelve month Income After Taxes plus Minority Interest and Equity in Affiliates plus Preferred Dividends, General Partner Distributions and US GAAP Adjustments. NOTE: Any adjustment that is negative (ie. Preferred Stock Dividends) would be subtracted from Income After Taxes.

AEBTNORM

Earnings before taxes Normalized
This is the Income Before Tax number excluding the impact of all unusual/one-time/special charges items for the most recent annual period.

ANIACNORM

Net Income Available to Common, Normalized
This is the annual dollar amount accruing to common shareholders for dividends and retained earnings excluding the impact of all unusual/one-time/special charges items.

TTMGROSMGN

Gross Margin
This value measures the percent of revenue left after paying all direct production expenses. It is calculated as the trailing 12 months Total Revenue minus the trailing 12 months Cost of Goods Sold divided by the trailing 12 months Total Revenue and multiplied by 100. NOTE: This item is only available for Industrial and Utility companies.

TTMNPMGN

Net Profit Margin %
Also known as Return on Sales, this value is the Income After Taxes for the trailing twelve months divided by Total Revenue for the same period and is expressed as a percentage. NOTE: Most Banks and Finance companies do not report revenues when they announce their preliminary quarterly financial results in the press. When this happens, the trailing twelve month value will not be available (NA).

TTMOPMGN

Operating margin
This value measures the percent of revenues remaining after paying all operating expenses. It is calculated as the trailing 12 months Operating Income divided by the trailing 12 months Total Revenue, multiplied by 100. Operating Income is defined as Total Revenue minus Total Operating Expenses.

APTMGNPCT

Pretax margin
This value represents Income Before Taxes for the most recent fiscal year expressed as a percent of Total Revenue for the most recent fiscal year.

TTMROAPCT

Return on average assets
This value is the Income After Taxes for the trailing twelve months divided by the Average Total Assets,expressed as a percentage. Average Total Assets is calculated by adding the Total Assets for the 5 most recent quarters and dividing by 5.

TTMROEPCT

Return on average equity
This value is the Income Available to Common Stockholders for the trailing twelve months divided by the Average Common Equity and is expressed as a percentage. Average Common Equity is calculated by adding the Common Equity for the 5 most recent quarters and dividing by 5.

TTMROIPCT

Return on investment
This value is the trailing twelve month Income After Taxes divided by the average Total Long Term Debt, Other Long Term Liabilities and Shareholders Equity, expressed as a percentage.

REVCHNGYR

Revenue Change %
This value is calculated as the most recent interim period Sales minus the Sales for the same interim period 1 year ago divided by the Sales for the same interim period one year ago, multiplied by 100.

TTMREVCHG

Revenue Change %
This is the percent change in the trailing twelve month Sales as compared to the same trailing twelve month period one year ago. It is calculated as the trailing twelve month Sales minus the trailing twelve month Sales one year ago divided by the trailing twelve month Sales one year ago, multiplied by 100.

REVTRENDGR

Revenue growth rate
The Five Year Revenue Growth Rate is the annual compounded growth rate of Revenues over the last 5 years.

EPSCHNGYR

EPS Change %
This value is calculated as the most recent interim period EPS minus the EPS for the same interim period 1 year ago divided by the EPS for the same interim period one year ago, multiplied by 100. NOTE: EPS must be positive for both periods. If either EPS value is negative, the result in Not Meaningful (NM).

TTMEPSCHG

EPS Change %
This is the percent change in the trailing twelve month EPS as compared to the same trailing twelve month period one year ago. It is calculated as the trailing twelve month EPS minus the trailing twelve month EPS one year ago divided by the trailing twelve month EPS one year ago, multiplied by 100. NOTE: If either value has a negative value, the resulting value will be Not Meaningful (NM).

EPSTRENDGR

EPS growth rate
This growth rate is the compound annual growth rate of Earnings Per Share Excluding Extraordinary Items and Discontinued Operations over the last 5 years. NOTE: If the value for either the most recent year or the oldest year is zero or negative, the growth rate cannot be calculated and a 'NA' (Not Available) code will be used.

DIVGRPCT

Growth rate % - dividend
The Dividend Growth Rate is the compound annual growth rate in dividends per share. DIVGR% is calculated for 3 years whenever 4 years of dividends are available.


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

註解