Module: IB::Combo

Extended by:
OrderPrototype
Defined in:
lib/ib/order_prototypes/combo.rb,
lib/ib/order_prototypes/all-in-one.rb

Overview

Combo-Orders are used for NonGuaranteed Orders only. »Normal« Option-Spreads are transmited by ordinary Limit-Orders

Class Method Summary collapse

Methods included from OrderPrototype

aliases, alternative_parameters, defaults, optional, order, parameters, requirements

Class Method Details

.aliasesObject



21
22
23
# File 'lib/ib/order_prototypes/combo.rb', line 21

def aliases
				Limit.aliases
end

.defaultsObject



9
10
11
12
13
14
# File 'lib/ib/order_prototypes/combo.rb', line 9

def defaults
	## todo implement serialisation of  key/tag Hash to camelCased-keyValue-List 
#      super.merge order_type: :limit , combo_params: { non_guaranteed: true} 
	#      for the time being, we use the array representation
super.merge order_type: :limit , combo_params: [ ['NonGuaranteed', true] ]
end

.requirementsObject



17
18
19
# File 'lib/ib/order_prototypes/combo.rb', line 17

def requirements
				Limit.requirements
end

.summaryObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/ib/order_prototypes/combo.rb', line 26

def summary
	<<-HERE
	Create combination orders. It is constructed through  options, stock and futures legs 
	(stock legs can be included if the order is routed through SmartRouting). 
	
	Although a combination/spread order is constructed of separate legs, it is executed 
	as a single transaction if it is routed directly to an exchange. For combination orders 
	that are SmartRouted, each leg may be executed separately to ensure best execution. 

	The »NonGuaranteed«-Flag is set to "false". A Pair of two securites should always be
	routed »Guaranteed«, otherwise separate orders are prefered.

	If a Bag-Order with »NonGuarateed :true« should be submitted, the Order-Type would be 
	REL+MKT, LMT+MKT, or REL+LMT 
	--------
	Products: Options, Stocks, Futures
	HERE
end