Class: Dtn::Messages::Historical::Tick

Inherits:
MessageWithSimpleParser show all
Defined in:
lib/dtn/messages/historical/tick.rb

Overview

Price tick message abstraction.

Class Method Summary collapse

Methods inherited from MessageWithSimpleParser

parse, #termination?

Methods inherited from Dtn::Message

#callback_name, callback_name, parse

Class Method Details

.fieldsObject

rubocop:disable Metrics/MethodLength



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/dtn/messages/historical/tick.rb', line 10

def fields
  @fields ||= {
    request_id: :to_i,
    timestamp: :to_datetime,
    last: :to_f,
    last_size: :to_i,
    total_volume: :to_i,
    bid: :to_f,
    ask: :to_f,
    tick_id: :to_i,
    basis_for_last: :to_s,
    trade_market_center: :to_s,
    trade_aggressor: :to_s,
    day_code: :to_s
  }
end