Class: IB::IncomingMessages::ExecutionData
- Inherits:
-
AbstractMessage
- Object
- ExtremelyAbstractMessage
- AbstractMessage
- IB::IncomingMessages::ExecutionData
- Defined in:
- lib/ib-ruby/messages.rb
Instance Attribute Summary collapse
-
#contract ⇒ Object
Returns the value of attribute contract.
-
#execution ⇒ Object
Returns the value of attribute execution.
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 ⇒ Object
Returns the value of attribute contract.
1246 1247 1248 |
# File 'lib/ib-ruby/messages.rb', line 1246 def contract @contract end |
#execution ⇒ Object
Returns the value of attribute execution.
1246 1247 1248 |
# File 'lib/ib-ruby/messages.rb', line 1246 def execution @execution end |
Class Method Details
.message_id ⇒ Object
1248 1249 1250 |
# File 'lib/ib-ruby/messages.rb', line 1248 def self. 11 end |
Instance Method Details
#load ⇒ Object
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 |
# File 'lib/ib-ruby/messages.rb', line 1252 def load @contract = Datatypes::Contract.new @execution = Datatypes::Execution.new autoload([:version, :int], [:order_id, :int]) @contract.symbol = @socket.read_string @contract.sec_type = @socket.read_string @contract.expiry = @socket.read_string @contract.strike = @socket.read_decimal @contract.right = @socket.read_string @contract.currency = @socket.read_string @contract.local_symbol = @socket.read_string if @data[:version] >= 2 @execution.order_id = @data[:order_id] @execution.exec_id = @socket.read_string @execution.time = @socket.read_string @execution.account_number = @socket.read_string @execution.exchange = @socket.read_string @execution.side = @socket.read_string @execution.shares = @socket.read_int @execution.price = @socket.read_decimal @execution.perm_id = @socket.read_int if @data[:version] >= 2 @execution.client_id = @socket.read_int if @data[:version] >= 3 @execution.liquidation = @socket.read_int if @data[:version] >= 4 end |