Class: IbRubyProxy::Client::Ib::Contract
- Inherits:
-
Struct
- Object
- Struct
- IbRubyProxy::Client::Ib::Contract
- Defined in:
- lib/ib_ruby_proxy/client/ib/contract.rb
Instance Attribute Summary collapse
-
#combo_legs ⇒ Object
Returns the value of attribute combo_legs.
-
#combo_legs_descrip ⇒ Object
Returns the value of attribute combo_legs_descrip.
-
#conid ⇒ Object
Returns the value of attribute conid.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#delta_neutral_contract ⇒ Object
Returns the value of attribute delta_neutral_contract.
-
#exchange ⇒ Object
Returns the value of attribute exchange.
-
#include_expired ⇒ Object
Returns the value of attribute include_expired.
-
#last_trade_date_or_contract_month ⇒ Object
Returns the value of attribute last_trade_date_or_contract_month.
-
#local_symbol ⇒ Object
Returns the value of attribute local_symbol.
-
#multiplier ⇒ Object
Returns the value of attribute multiplier.
-
#primary_exch ⇒ Object
Returns the value of attribute primary_exch.
-
#right ⇒ Object
Returns the value of attribute right.
-
#sec_id ⇒ Object
Returns the value of attribute sec_id.
-
#sec_id_type ⇒ Object
Returns the value of attribute sec_id_type.
-
#sec_type ⇒ Object
Returns the value of attribute sec_type.
-
#strike ⇒ Object
Returns the value of attribute strike.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#trading_class ⇒ Object
Returns the value of attribute trading_class.
Instance Method Summary collapse
-
#initialize(conid: 0, symbol: nil, sec_type: nil, last_trade_date_or_contract_month: nil, strike: 0, right: nil, multiplier: nil, exchange: nil, primary_exch: nil, currency: nil, local_symbol: nil, trading_class: nil, sec_id_type: nil, sec_id: nil, delta_neutral_contract: nil, include_expired: false, combo_legs_descrip: nil, combo_legs: nil) ⇒ Contract
constructor
A new instance of Contract.
- #to_ib ⇒ Object
Constructor Details
#initialize(conid: 0, symbol: nil, sec_type: nil, last_trade_date_or_contract_month: nil, strike: 0, right: nil, multiplier: nil, exchange: nil, primary_exch: nil, currency: nil, local_symbol: nil, trading_class: nil, sec_id_type: nil, sec_id: nil, delta_neutral_contract: nil, include_expired: false, combo_legs_descrip: nil, combo_legs: nil) ⇒ Contract
Returns a new instance of Contract.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 9 def initialize(conid: 0, symbol: nil, sec_type: nil, last_trade_date_or_contract_month: nil, strike: 0, right: nil, multiplier: nil, exchange: nil, primary_exch: nil, currency: nil, local_symbol: nil, trading_class: nil, sec_id_type: nil, sec_id: nil, delta_neutral_contract: nil, include_expired: false, combo_legs_descrip: nil, combo_legs: nil) self.conid = conid self.symbol = symbol self.sec_type = sec_type self.last_trade_date_or_contract_month = last_trade_date_or_contract_month self.strike = strike self.right = right self.multiplier = multiplier self.exchange = exchange self.primary_exch = primary_exch self.currency = currency self.local_symbol = local_symbol self.trading_class = trading_class self.sec_id_type = sec_id_type self.sec_id = sec_id self.delta_neutral_contract = delta_neutral_contract self.include_expired = include_expired self.combo_legs_descrip = combo_legs_descrip self.combo_legs = combo_legs end |
Instance Attribute Details
#combo_legs ⇒ Object
Returns the value of attribute combo_legs
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def combo_legs @combo_legs end |
#combo_legs_descrip ⇒ Object
Returns the value of attribute combo_legs_descrip
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def combo_legs_descrip @combo_legs_descrip end |
#conid ⇒ Object
Returns the value of attribute conid
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def conid @conid end |
#currency ⇒ Object
Returns the value of attribute currency
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def currency @currency end |
#delta_neutral_contract ⇒ Object
Returns the value of attribute delta_neutral_contract
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def delta_neutral_contract @delta_neutral_contract end |
#exchange ⇒ Object
Returns the value of attribute exchange
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def exchange @exchange end |
#include_expired ⇒ Object
Returns the value of attribute include_expired
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def include_expired @include_expired end |
#last_trade_date_or_contract_month ⇒ Object
Returns the value of attribute last_trade_date_or_contract_month
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def last_trade_date_or_contract_month @last_trade_date_or_contract_month end |
#local_symbol ⇒ Object
Returns the value of attribute local_symbol
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def local_symbol @local_symbol end |
#multiplier ⇒ Object
Returns the value of attribute multiplier
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def multiplier @multiplier end |
#primary_exch ⇒ Object
Returns the value of attribute primary_exch
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def primary_exch @primary_exch end |
#right ⇒ Object
Returns the value of attribute right
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def right @right end |
#sec_id ⇒ Object
Returns the value of attribute sec_id
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def sec_id @sec_id end |
#sec_id_type ⇒ Object
Returns the value of attribute sec_id_type
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def sec_id_type @sec_id_type end |
#sec_type ⇒ Object
Returns the value of attribute sec_type
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def sec_type @sec_type end |
#strike ⇒ Object
Returns the value of attribute strike
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def strike @strike end |
#symbol ⇒ Object
Returns the value of attribute symbol
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def symbol @symbol end |
#trading_class ⇒ Object
Returns the value of attribute trading_class
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 8 def trading_class @trading_class end |
Instance Method Details
#to_ib ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/ib_ruby_proxy/client/ib/contract.rb', line 30 def to_ib ib_object = Java::ComIbClient::Contract.new ib_object.conid(conid).to_java ib_object.symbol(symbol).to_java ib_object.secType(sec_type).to_java ib_object.lastTradeDateOrContractMonth(last_trade_date_or_contract_month).to_java ib_object.strike(strike).to_java ib_object.right(right).to_java ib_object.multiplier(multiplier).to_java ib_object.exchange(exchange).to_java ib_object.primaryExch(primary_exch).to_java ib_object.currency(currency).to_java ib_object.localSymbol(local_symbol).to_java ib_object.tradingClass(trading_class).to_java ib_object.secIdType(sec_id_type).to_java ib_object.secId(sec_id).to_java ib_object.deltaNeutralContract(delta_neutral_contract).to_java ib_object.includeExpired(include_expired).to_java ib_object.comboLegsDescrip(combo_legs_descrip).to_java ib_object.comboLegs(combo_legs).to_java ib_object end |