Module: IB::Pegged2Primary

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

Class Method Summary collapse

Methods included from OrderPrototype

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

Class Method Details

.aliasesObject



10
11
12
# File 'lib/ib/order_prototypes/pegged.rb', line 10

def aliases
  super.merge  limit_price: :price_cap, aux_price: :offset_amount
end

.defaultsObject



6
7
8
# File 'lib/ib/order_prototypes/pegged.rb', line 6

def defaults
    super.merge order_type: 'REL' , tif: :day
end

.optionalObject



19
20
21
# File 'lib/ib/order_prototypes/pegged.rb', line 19

def optional
   super
end

.requirementsObject



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

def requirements
  super.merge aux_price: 'also aliased as :offset_amount',
limit_price: 'aliased as :price_cap'
end

.summaryObject



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

def summary
  "  Relative (a.k.a. Pegged-to-Primary) orders provide a means for traders\n  to seek a more aggressive price than the National Best Bid and Offer\n  (NBBO). By acting as liquidity providers, and placing more aggressive\n  bids and offers than the current best bids and offers, traders increase\n  their odds of filling their order. Quotes are automatically adjusted as\n  the markets move, to remain aggressive. For a buy order, your bid is\n  pegged to the NBB by a more aggressive offset, and if the NBB moves up,\n  your bid will also move up. If the NBB moves down, there will be no\n  adjustment because your bid will become even more aggressive and\n  execute. For sales, your offer is pegged to the NBO by a more\n  aggressive offset, and if the NBO moves down, your offer will also move\n  down. If the NBO moves up, there will be no adjustment because your\n  offer will become more aggressive and execute. In addition to the\n  offset, you can define an absolute cap, which works like a limit price,\n  and will prevent your order from being executed above or below a\n  specified level. \n  Supported Products:  Stocks, Options and Futures\n  ------ \n  not available on paper trading \n  HERE\nend\n"