Class: IB::IncomingMessages::ContractData
- Inherits:
-
AbstractMessage
- Object
- ExtremelyAbstractMessage
- AbstractMessage
- IB::IncomingMessages::ContractData
- Defined in:
- lib/ib-ruby/messages.rb
Instance Attribute Summary collapse
-
#contract_details ⇒ Object
Returns the value of attribute contract_details.
Attributes inherited from AbstractMessage
Attributes inherited from ExtremelyAbstractMessage
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from AbstractMessage
Methods inherited from ExtremelyAbstractMessage
Constructor Details
This class inherits a constructor from IB::IncomingMessages::AbstractMessage
Instance Attribute Details
#contract_details ⇒ Object
Returns the value of attribute contract_details.
1212 1213 1214 |
# File 'lib/ib-ruby/messages.rb', line 1212 def contract_details @contract_details end |
Class Method Details
.message_id ⇒ Object
1214 1215 1216 |
# File 'lib/ib-ruby/messages.rb', line 1214 def self. 10 end |
Instance Method Details
#load ⇒ Object
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 |
# File 'lib/ib-ruby/messages.rb', line 1218 def load @contract_details = Datatypes::ContractDetails.new autoload([:version, :int]) @contract_details.summary.symbol = @socket.read_string @contract_details.summary.sec_type = @socket.read_string @contract_details.summary.expiry = @socket.read_string @contract_details.summary.strike = @socket.read_decimal @contract_details.summary.right = @socket.read_string @contract_details.summary.exchange = @socket.read_string @contract_details.summary.currency = @socket.read_string @contract_details.summary.local_symbol = @socket.read_string @contract_details.market_name = @socket.read_string @contract_details.trading_class = @socket.read_string @contract_details.con_id = @socket.read_int @contract_details.min_tick = @socket.read_decimal @contract_details.multiplier = @socket.read_string @contract_details.order_types = @socket.read_string @contract_details.valid_exchanges = @socket.read_string @contract_details.price_magnifier = @socket.read_int if @data[:version] >= 2 end |