Class: IB::Messages::Outgoing::RequestRealTimeBars
- Defined in:
- lib/ib/messages/outgoing/bar_requests.rb
Instance Method Summary collapse
Instance Method Details
#encode ⇒ Object
55 56 57 58 59 60 61 62 63 |
# File 'lib/ib/messages/outgoing/bar_requests.rb', line 55 def encode data_type, , contract = parse @data [super, contract.serialize_long, , data_type.to_s.upcase, @data[:use_rth]] end |
#parse(data) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/ib/messages/outgoing/bar_requests.rb', line 47 def parse data data_type, , contract = super data size = data[:bar_size] || data[:size] = size.to_i [data_type, , contract] end |