Class: Dtn::Messages::Quote::Level1

Inherits:
MessageWithSimpleParser show all
Defined in:
lib/dtn/messages/quote/level1.rb

Overview

Streaming level1 dynamic data

Constant Summary collapse

ALL_FIELDS =

fetched with Streaming::Clients::Quote.new.request.quote.all_update_fieldnames and stored this way to been able to store the returning types

{
  "_skip" => nil,
  "Symbol" => :to_s,
  "Exchange ID" => :to_i,
  "Last" => :to_f,
  "Change" => :to_f,
  "Percent Change" => :to_f,
  "Total Volume" => :to_i,
  "High" => :to_f,
  "Low" => :to_f,
  "Bid" => :to_f,
  "Ask" => :to_f,
  "Bid Size" => :to_i,
  "Ask Size" => :to_i,
  "Tick" => :to_s,
  "Range" => :to_s,
  "Open Interest" => :to_s,
  "Open" => :to_f,
  "Close" => :to_f,
  "Spread" => :to_f,
  "Settle" => :to_s,
  "Delay" => :to_s,
  "Restricted Code" => :to_s,
  "Net Asset Value" => :to_s,
  "Average Maturity" => :to_s,
  "7 Day Yield" => :to_s,
  "Extended Trading Change" => :to_s,
  "Extended Trading Difference" => :to_s,
  "Price-Earnings Ratio" => :to_s,
  "Percent Off Average Volume" => :to_s,
  "Bid Change" => :to_f,
  "Ask Change" => :to_f,
  "Change From Open" => :to_f,
  "Market Open" => :to_s,
  "Volatility" => :to_s,
  "Market Capitalization" => :to_f,
  "Fraction Display Code" => :to_s,
  "Decimal Precision" => :to_i,
  "Days to Expiration" => :to_s,
  "Previous Day Volume" => :to_i,
  "Open Range 1" => :to_s,
  "Close Range 1" => :to_s,
  "Open Range 2" => :to_s,
  "Close Range 2" => :to_s,
  "Number of Trades Today" => :to_i,
  "VWAP" => :to_f,
  "TickID" => :to_s,
  "Financial Status Indicator" => :to_s,
  "Settlement Date" => :to_s,
  "Bid Market Center" => :to_s,
  "Ask Market Center" => :to_s,
  "Available Regions" => :to_s,
  "Last Size" => :to_i,
  "Last Time" => :to_s,
  "Last Market Center" => :to_s,
  "Most Recent Trade" => :to_s,
  "Most Recent Trade Size" => :to_s,
  "Most Recent Trade Time" => :to_s,
  "Most Recent Trade Conditions" => :to_s,
  "Most Recent Trade Market Center" => :to_s,
  "Extended Trade" => :to_s,
  "Extended Trade Size" => :to_s,
  "Extended Trade Time" => :to_s,
  "Extended Trade Market Center" => :to_s,
  "Message Contents" => :to_s,
  "Ask Time" => :to_s,
  "Bid Time" => :to_s,
  "Last Date" => :to_s,
  "Extended Trade Date" => :to_s,
  "Most Recent Trade Date" => :to_s,
  "Most Recent Trade Aggressor" => :to_s,
  "Most Recent Trade Day Code" => :to_s
}.freeze
ALL_FUNDAMENTAL_FIELDS =

cached from ‘client.request.quote.fundamental_fieldnames`

{
  "_skip" => nil,
  "Symbol" => :to_s,
  "Exchange ID" => :to_i,
  "PE" => :to_f,
  "Average Volume" => :to_i,
  "52 Week High" => :to_f,
  "52 Week Low" => :to_f,
  "Calendar Year High" => :to_f,
  "Calendar Year Low" => :to_f,
  "Dividend Yield" => :to_s,
  "Dividend Amount" => :to_s,
  "Dividend Rate" => :to_s,
  "Pay Date" => :to_s,
  "Ex-dividend Date" => :to_s,
  "Current Year EPS" => :to_f,
  "Next Year EPS" => :to_f,
  "Five-year Growth Percentage" => :to_f,
  "Fiscal Year End" => :to_i,
  "Company Name" => :to_s,
  "Root Option Symbol" => :to_s,
  "Percent Held By Institutions" => :to_f,
  "Beta" => :to_f,
  "Leaps" => :to_s,
  "Current Assets" => :to_f,
  "Current Liabilities" => :to_f,
  "Balance Sheet Date" => :to_s,
  "Long-term Debt" => :to_f,
  "Common Shares Outstanding" => :to_i,
  "Split Factor 1" => :to_s,
  "Split Factor 2" => :to_s,
  "Format Code" => :to_i,
  "Precision" => :to_i,
  "SIC" => :to_i,
  "Historical Volatility" => :to_f,
  "Security Type" => :to_i,
  "Listed Market" => :to_i,
  "52 Week High Date" => :to_s,
  "52 Week Low Date" => :to_s,
  "Calendar Year High Date" => :to_s,
  "Calendar Year Low Date" => :to_s,
  "Year End Close" => :to_f,
  "Maturity Date" => :to_s,
  "Coupon Rate" => :to_s,
  "Expiration Date" => :to_s,
  "Strike Price" => :to_s,
  "NAICS" => :to_s,
  "Exchange Root" => :to_s,
  "Option Premium Multiplier" => :to_s,
  "Option Multiple Deliverable" => :to_s,
  "Session Open Time" => :to_s,
  "Session Close Time" => :to_s,
  "Base Currency" => :to_s,
  "Contract Size" => :to_s,
  "Contract Months" => :to_s,
  "Minimum Tick Size" => :to_s,
  "First Delivery Date" => :to_s,
  "FIGI" => :to_s,
  "Security SubType" => :to_s
}.freeze

Method Summary

Methods inherited from MessageWithSimpleParser

parse, #termination?

Methods inherited from Dtn::Message

#callback_name, callback_name, parse