Class: IB::Datatypes::Order

Inherits:
AbstractDatum show all
Defined in:
lib/ib-ruby/datatypes.rb

Constant Summary collapse

Origin_Customer =

Constants used in Order objects. Drawn from Order.java

0
Origin_Firm =
1
Opt_Unknown =
'?'
Opt_Broker_Dealer =
'b'
Opt_Customer =
'c'
Opt_Firm =
'f'
Opt_Isemm =
'm'
Opt_Farmm =
'n'
Opt_Specialist =
'y'
OCA_Cancel_with_block =
1
OCA_Reduce_with_block =
2
OCA_Reduce_non_block =
3
Box_Auction_Match =

Box orders only:

1
Box_Auction_Improvement =
2
Box_Auction_Transparent =
3
Volatility_Type_Daily =

Volatility orders only:

1
Volatility_Type_Annual =
2
Volatility_Ref_Price_Average =
1
Volatility_Ref_Price_BidOrAsk =
2
Max_value =

I don’t know why IB uses a very large number as the default for certain fields

99999999

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractDatum

#initialize

Constructor Details

This class inherits a constructor from IB::Datatypes::AbstractDatum

Instance Attribute Details

#accountObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def 
  @account
end

#actionObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def action
  @action
end

#all_or_noneObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def all_or_none
  @all_or_none
end

#auction_strategyObject

Box_* constants above



112
113
114
# File 'lib/ib-ruby/datatypes.rb', line 112

def auction_strategy
  @auction_strategy
end

#aux_priceObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def aux_price
  @aux_price
end

#block_orderObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def block_order
  @block_order
end

#client_idObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def client_id
  @client_id
end

#continuous_updateObject

Returns the value of attribute continuous_update.



122
123
124
# File 'lib/ib-ruby/datatypes.rb', line 122

def continuous_update
  @continuous_update
end

#deltaObject

Box_* constants above



112
113
114
# File 'lib/ib-ruby/datatypes.rb', line 112

def delta
  @delta
end

#delta_neutral_aux_priceObject

Returns the value of attribute delta_neutral_aux_price.



122
123
124
# File 'lib/ib-ruby/datatypes.rb', line 122

def delta_neutral_aux_price
  @delta_neutral_aux_price
end

#delta_neutral_order_typeObject

Returns the value of attribute delta_neutral_order_type.



122
123
124
# File 'lib/ib-ruby/datatypes.rb', line 122

def delta_neutral_order_type
  @delta_neutral_order_type
end

#designated_locationObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def designated_location
  @designated_location
end

#discretionary_amountObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def discretionary_amount
  @discretionary_amount
end

#display_sizeObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def display_size
  @display_size
end

#etrade_onlyObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def etrade_only
  @etrade_only
end

#fa_groupObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def fa_group
  @fa_group
end

#fa_methodObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def fa_method
  @fa_method
end

#fa_percentageObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def fa_percentage
  @fa_percentage
end

#fa_profileObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def fa_profile
  @fa_profile
end

#firm_quote_onlyObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def firm_quote_only
  @firm_quote_only
end

#good_after_timeObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def good_after_time
  @good_after_time
end

#good_till_dateObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def good_till_date
  @good_till_date
end

#hiddenObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def hidden
  @hidden
end

#idObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def id
  @id
end

#ignore_rthObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def ignore_rth
  @ignore_rth
end

#limit_priceObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def limit_price
  @limit_price
end

#min_quantityObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def min_quantity
  @min_quantity
end

#nbbo_price_capObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def nbbo_price_cap
  @nbbo_price_cap
end

#oca_groupObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def oca_group
  @oca_group
end

#oca_typeObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def oca_type
  @oca_type
end

#open_closeObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def open_close
  @open_close
end

#order_refObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def order_ref
  @order_ref
end

#order_typeObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def order_type
  @order_type
end

#originObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def origin
  @origin
end

#override_percentage_constraintsObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def override_percentage_constraints
  @override_percentage_constraints
end

#parent_idObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def parent_id
  @parent_id
end

#percent_offsetObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def percent_offset
  @percent_offset
end

#perm_idObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def perm_id
  @perm_id
end

#primary_exchangeObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def primary_exchange
  @primary_exchange
end

#reference_price_typeObject

Returns the value of attribute reference_price_type.



122
123
124
# File 'lib/ib-ruby/datatypes.rb', line 122

def reference_price_type
  @reference_price_type
end

#rth_onlyObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def rth_only
  @rth_only
end

#rule_80aObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def rule_80a
  @rule_80a
end

#settling_firmObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def settling_firm
  @settling_firm
end

#shares_allocationObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def shares_allocation
  @shares_allocation
end

#short_sale_slotObject

No idea what the fa_* attributes are for, nor many of the others.



101
102
103
# File 'lib/ib-ruby/datatypes.rb', line 101

def short_sale_slot
  @short_sale_slot
end

#starting_priceObject

Box_* constants above



112
113
114
# File 'lib/ib-ruby/datatypes.rb', line 112

def starting_price
  @starting_price
end

#stock_range_lowerObject

Box_* constants above



112
113
114
# File 'lib/ib-ruby/datatypes.rb', line 112

def stock_range_lower
  @stock_range_lower
end

#stock_range_upperObject

Box_* constants above



112
113
114
# File 'lib/ib-ruby/datatypes.rb', line 112

def stock_range_upper
  @stock_range_upper
end

#stock_ref_priceObject

Box_* constants above



112
113
114
# File 'lib/ib-ruby/datatypes.rb', line 112

def stock_ref_price
  @stock_ref_price
end

#sweep_to_fillObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def sweep_to_fill
  @sweep_to_fill
end

#tifObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def tif
  @tif
end

#total_quantityObject

Main order fields



79
80
81
# File 'lib/ib-ruby/datatypes.rb', line 79

def total_quantity
  @total_quantity
end

#transmitObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def transmit
  @transmit
end

#trigger_methodObject

Extended order fields



83
84
85
# File 'lib/ib-ruby/datatypes.rb', line 83

def trigger_method
  @trigger_method
end

#volatilityObject

Returns the value of attribute volatility.



122
123
124
# File 'lib/ib-ruby/datatypes.rb', line 122

def volatility
  @volatility
end

#volatility_typeObject

Returns the value of attribute volatility_type.



122
123
124
# File 'lib/ib-ruby/datatypes.rb', line 122

def volatility_type
  @volatility_type
end

Instance Method Details

#initObject



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/ib-ruby/datatypes.rb', line 130

def init
  super

  @open_close = "0"
  @origin = Origin_Customer
  @transmit = true
  @primary_exchange = ''
  @designated_location = ''
  @min_quantity = Max_value
  @percent_offset = Max_value
  @nbba_price_cap = Max_value
  @starting_price = Max_value
  @stock_ref_price = Max_value
  @delta = Max_value
  @delta_neutral_order_type = ''
  @delta_neutral_aux_price = Max_value
  @reference_price_type = Max_value
end