Tornado API Library - V12.30.08

z.dbStockTicker Property

Set properties to retrieve Stock tickers.

Product Version


Property Value

Obj.dbStockTicker = Symbol | TagIndex | Format | Caption"

SymbolStock Symbols delimitedr by '+' e.g. GM+AAPL+CSCO or AAPL+QAAJN.X (QAAJO.X is the AAPL Oct06 75 Call Option). Get the Option symbols from the Yahoo Options Quote Page.
FormatReturn format of stock tickers.

0=Default csv string delimited by /r/n.

1=csv string delimited by <br>

99=Use template defined by dbStockTickerTemplate to format the returned csv string. All the EOL markers and double quote wrappers will be ignored and ticker values will replace the macros [[S]] in a row manner.

CaptionUser defined header text of ticker table delimited by ',' - SYM,LAST,CHANGE,VOL. This text will be inserted at the beginning of the returned csv text.
TagIndexIndex number delimited by ',' to specify the ticker fields to retrieve. See the TagIndex list below. Default value is - 68,42,16,70 which is (Symbol)(Last Trade)(Change)(Volume)

TagIndex and Ticker Description

  1. 1 yr Target Price
  2. 200-day Moving Average
  3. 50-day Moving Average
  4. 52-week High
  5. 52-week Low
  6. 52-week Range
  7. After Hours Change (Real-time)
  8. Ask
  9. Ask (Real-time)
  10. Ask Size
  11. Average Daily Volume
  12. Bid
  13. Bid (Real-time)
  14. Bid Size
  15. Book Value
  16. Change
  17. Change & Percent Change
  18. Change (Real-time)
  19. Change From 200-day Moving Average
  20. Change From 50-day Moving Average
  21. Change From 52-week High
  22. Change From 52-week Low
  23. Change in Percent
  24. Change Percent (Real-time)
  25. Day High
  26. Day Low
  27. Day Range
  28. Day Range (Real-time)
  29. Day Value Change
  30. Day Value Change (Real-time)
  31. Dividend Pay Date
  32. Dividend Yield
  33. Dividend/Share
  34. Earnings/Share
  35. EBITDA
  36. EPS Estimate Current Year
  37. EPS Estimate Next Quarter
  38. EPS Estimate Next Year
  39. Error Indication (returned for symbol changed / invalid)
  40. Ex-Dividend Date
  41. High Limit
  42. Last Trade (Price Only)
  43. Last Trade (Real-time) With Time
  44. Last Trade (With Time)
  45. Last Trade Date
  46. Last Trade Size
  47. Last Trade Time
  48. Low Limit
  49. Market Cap (Real-time)
  50. Market Capitalization
  51. Name
  52. Open
  53. Order Book (Real-time)
  54. P/E Ratio
  55. P/E Ratio (Real-time)
  56. PEG Ratio
  57. Percebt Change From 52-week High
  58. Percent Change From 200-day Moving Average
  59. Percent Change From 50-day Moving Average
  60. Percent Change From 52-week Low
  61. Previous Close
  62. Price/Book
  63. Price/EPS Estimate Current Year
  64. Price/EPS Estimate Next Year
  65. Price/Sales
  66. Short Ratio
  67. Stock Exchange
  68. Symbol
  69. Ticker Trend
  70. Volume


Both Stock and Option are supported. Get Option symbols (ends with .X) from YAHOO stock option pages.


This example displays all the tickers.

Obj.dbStockTicker = Symbol=GM+AAPL+CSCO | Tag = 68,42,16,70| format=1 |cap=SYM,LAST,CHANGE,VOL"
Dim Rm As New Tornado.z
Rm.dbUnit = 8
Rm.dbStockTicker = "Symbol=GM | format=1 |Tag=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70"
This example shows how to embed the function in your web page.
<script language="vb" runat="server">
Public Price, Vol as string
   Sub Page_Load(Source as Object, E as EventArgs)
      Dim Rm As New Tornado.z
      Rm.dbQP = "U=8| Nh=t"
      Rm.dbStockTicker = "Symbol=GM | Tag=42,70| cap=none| Format=99"
      Rm.dbStockTickerTemplate = "[[S:##0.000]] [[S]]"  ' can format here - space is the delimiter
      Dim ret2() As String = Split(Rm.ASPdbGetStockTicker())
      price = ret2(0)
      If IsNumeric(ret2(1)) Then
         Vol = Format(CInt(ret2(1)), "###,###") '...or format here YAHOO returns N/A or 0.00
         Vol = ret2(1)
      End if         
   End Sub
My Web Page ubder My control with My CSS and My settings<P>
GM Stock Price = <%= Price %> <br>
GM Stock Volume = <%= Vol %>

See Also

z Class | Tornado Namespace | ASPdbGetStockTicker | dbStockTickerTemplate