Module: IB::Limit

Extended by:
OrderPrototype
Defined in:
lib/ib/order_prototypes/limit.rb

Class Method Summary collapse

Methods included from OrderPrototype

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

Class Method Details

.aliasesObject



11
12
13
# File 'lib/ib/order_prototypes/limit.rb', line 11

def aliases
	super.merge  limit_price: :price 
end

.defaultsObject



7
8
9
# File 'lib/ib/order_prototypes/limit.rb', line 7

def defaults
	  super.merge order_type: :limit 
end

.requirementsObject



15
16
17
# File 'lib/ib/order_prototypes/limit.rb', line 15

def requirements
	super.merge limit_price: "also aliased as :price"
end

.summaryObject



20
21
22
23
24
25
26
27
# File 'lib/ib/order_prototypes/limit.rb', line 20

def summary
	<<-HERE
	A Limit order is an order to buy or sell at a specified price or better. 
	The Limit order ensures that if the order fills, it will not fill at a price less favorable than 
	your limit price, but it does not guarantee a fill. 
	It appears in the orderbook.
	HERE
end