Class: Dtn::Messages::Bar::Base
- Inherits:
-
MessageWithSimpleParser
- Object
- OpenStruct
- Dtn::Message
- MessageWithSimpleParser
- Dtn::Messages::Bar::Base
- Defined in:
- lib/dtn/messages/bar/base.rb
Overview
Streaming Bars data.
Direct Known Subclasses
Class Method Summary collapse
-
.fields ⇒ Object
rubocop:disable Metrics/MethodLength.
Methods inherited from MessageWithSimpleParser
Methods inherited from Dtn::Message
#callback_name, callback_name, parse
Class Method Details
.fields ⇒ Object
rubocop:disable Metrics/MethodLength
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/dtn/messages/bar/base.rb', line 10 def fields @fields ||= { request_id: :to_i, _skip: nil, symbol: :to_s, timestamp: :to_datetime, open: :to_f, high: :to_f, low: :to_f, close: :to_f, total_volume: :to_i, volume: :to_i, number_of_trades: :to_i } end |