ib-ruby 0.5.9 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY +4 -0
- data/VERSION +1 -1
- data/bin/depth_of_market +1 -1
- data/bin/global_cancel +1 -2
- data/bin/list_orders +23 -0
- data/bin/place_order +1 -2
- data/lib/ib-ruby/messages/incoming.rb +109 -98
- data/lib/ib-ruby/models/contract/bag.rb +32 -0
- data/lib/ib-ruby/models/contract/option.rb +11 -6
- data/lib/ib-ruby/models/contract.rb +36 -14
- data/lib/ib-ruby/models/order.rb +8 -5
- data/lib/ib-ruby/symbols/futures.rb +2 -6
- data/lib/ib-ruby.rb +0 -4
- metadata +5 -2
data/HISTORY
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.10
|
data/bin/depth_of_market
CHANGED
@@ -15,7 +15,7 @@ require 'ib-ruby'
|
|
15
15
|
# corresponds to what symbol ourselves, because the ticks don't include any other
|
16
16
|
# identifying information. The choice of ticker ids is, as far as I can tell, arbitrary.
|
17
17
|
@market = {123 => IB::Symbols::Stocks[:wfc],
|
18
|
-
456 => IB::Symbols::Futures[:
|
18
|
+
456 => IB::Symbols::Futures[:es],
|
19
19
|
789 => IB::Symbols::Forex[:gbpusd]
|
20
20
|
}
|
21
21
|
|
data/bin/global_cancel
CHANGED
@@ -14,8 +14,7 @@ require 'ib-ruby'
|
|
14
14
|
# First, connect to IB TWS.
|
15
15
|
ib = IB::Connection.new
|
16
16
|
|
17
|
-
# Subscribe to TWS alerts/errors and
|
18
|
-
# that TWS sends in response to account data request
|
17
|
+
# Subscribe to TWS alerts/errors and order-related messages
|
19
18
|
ib.subscribe(:Alert, :OpenOrder, :OrderStatus) { |msg| puts msg.to_human }
|
20
19
|
|
21
20
|
ib.send_message :RequestGlobalCancel
|
data/bin/list_orders
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This script connects to IB API, subscribes to account info and prints out
|
4
|
+
# messages received from IB (update every 3 minute or so)
|
5
|
+
|
6
|
+
require 'pathname'
|
7
|
+
LIB_DIR = (Pathname.new(__FILE__).dirname + '../lib/').realpath.to_s
|
8
|
+
$LOAD_PATH.unshift LIB_DIR unless $LOAD_PATH.include?(LIB_DIR)
|
9
|
+
|
10
|
+
require 'rubygems'
|
11
|
+
require 'bundler/setup'
|
12
|
+
require 'ib-ruby'
|
13
|
+
|
14
|
+
# First, connect to IB TWS.
|
15
|
+
ib = IB::Connection.new :client_id => 0
|
16
|
+
|
17
|
+
# Subscribe to TWS alerts/errors and order-related messages
|
18
|
+
ib.subscribe(:Alert, :OpenOrder, :OrderStatus) { |msg| puts msg.to_human }
|
19
|
+
|
20
|
+
ib.send_message :RequestAllOpenOrders
|
21
|
+
|
22
|
+
puts "\n******** Press <Enter> to cancel... *********\n\n"
|
23
|
+
gets
|
data/bin/place_order
CHANGED
@@ -14,8 +14,7 @@ require 'ib-ruby'
|
|
14
14
|
# First, connect to IB TWS.
|
15
15
|
ib = IB::Connection.new
|
16
16
|
|
17
|
-
# Subscribe to TWS alerts/errors and
|
18
|
-
# that TWS sends in response to account data request
|
17
|
+
# Subscribe to TWS alerts/errors and order-related messages
|
19
18
|
ib.subscribe(:Alert, :OpenOrder, :OrderStatus) { |msg| puts msg.to_human }
|
20
19
|
|
21
20
|
wfc = IB::Symbols::Stocks[:wfc]
|
@@ -108,7 +108,14 @@ module IB
|
|
108
108
|
[:parent_id, :int],
|
109
109
|
[:last_fill_price, :decimal],
|
110
110
|
[:client_id, :int],
|
111
|
-
[:why_held, :string]
|
111
|
+
[:why_held, :string] do
|
112
|
+
"<OrderStatus: #{@data[:status]} filled: #{@data[:filled]}/#{@data[:remaining]+@data[:filled]}" +
|
113
|
+
" @ last/avg: #{@data[:last_fill_price]}/#{@data[:average_fill_price]}" +
|
114
|
+
(@data[:parent_id] > 0 ? "parent_id: #{@data[:parent_id]}" : "") +
|
115
|
+
(@data[:why_held] != "" ? "why_held: #{@data[:why_held]}" : "") +
|
116
|
+
" id/perm: #{@data[:id]}/#{@data[:perm_id]}>"
|
117
|
+
end
|
118
|
+
|
112
119
|
|
113
120
|
AccountValue = def_message(6, [:key, :string],
|
114
121
|
[:value, :string],
|
@@ -364,15 +371,15 @@ module IB
|
|
364
371
|
|
365
372
|
@order = Models::Order.new :id => @socket.read_int
|
366
373
|
|
367
|
-
@contract = Models::Contract.
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
374
|
+
@contract = Models::Contract.build :con_id => @socket.read_string,
|
375
|
+
:symbol => @socket.read_string,
|
376
|
+
:sec_type => @socket.read_string,
|
377
|
+
:expiry => @socket.read_string,
|
378
|
+
:strike => @socket.read_decimal,
|
379
|
+
:right => @socket.read_string,
|
380
|
+
:exchange => @socket.read_string,
|
381
|
+
:currency => @socket.read_string,
|
382
|
+
:local_symbol => @socket.read_string
|
376
383
|
|
377
384
|
@order.action = @socket.read_string
|
378
385
|
@order.total_quantity = @socket.read_int
|
@@ -474,6 +481,10 @@ module IB
|
|
474
481
|
@order.commission_currency = @socket.read_string
|
475
482
|
@order.warning_text = @socket.read_string
|
476
483
|
end
|
484
|
+
|
485
|
+
def to_human
|
486
|
+
"<OpenOrder: #{@contract.to_human} #{@order.to_human}>"
|
487
|
+
end
|
477
488
|
end # OpenOrder
|
478
489
|
|
479
490
|
class PortfolioValue < AbstractMessage
|
@@ -484,16 +495,16 @@ module IB
|
|
484
495
|
def load
|
485
496
|
super
|
486
497
|
|
487
|
-
@contract = Models::Contract.
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
498
|
+
@contract = Models::Contract.build :con_id => @socket.read_int,
|
499
|
+
:symbol => @socket.read_string,
|
500
|
+
:sec_type => @socket.read_string,
|
501
|
+
:expiry => @socket.read_string,
|
502
|
+
:strike => @socket.read_decimal,
|
503
|
+
:right => @socket.read_string,
|
504
|
+
:multiplier => @socket.read_string,
|
505
|
+
:primary_exchange => @socket.read_string,
|
506
|
+
:currency => @socket.read_string,
|
507
|
+
:local_symbol => @socket.read_string
|
497
508
|
load_map [:position, :int],
|
498
509
|
[:market_price, :decimal],
|
499
510
|
[:market_value, :decimal],
|
@@ -521,34 +532,34 @@ module IB
|
|
521
532
|
load_map [:id, :int] # request id
|
522
533
|
|
523
534
|
@contract =
|
524
|
-
Models::Contract.
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
535
|
+
Models::Contract.build :symbol => @socket.read_string,
|
536
|
+
:sec_type => @socket.read_string,
|
537
|
+
:expiry => @socket.read_string,
|
538
|
+
:strike => @socket.read_decimal,
|
539
|
+
:right => @socket.read_string,
|
540
|
+
:exchange => @socket.read_string,
|
541
|
+
:currency => @socket.read_string,
|
542
|
+
:local_symbol => @socket.read_string,
|
543
|
+
|
544
|
+
:market_name => @socket.read_string,
|
545
|
+
:trading_class => @socket.read_string,
|
546
|
+
:con_id => @socket.read_int,
|
547
|
+
:min_tick => @socket.read_decimal,
|
548
|
+
:multiplier => @socket.read_string,
|
549
|
+
:order_types => @socket.read_string,
|
550
|
+
:valid_exchanges => @socket.read_string,
|
551
|
+
:price_magnifier => @socket.read_int,
|
552
|
+
|
553
|
+
:under_con_id => @socket.read_int,
|
554
|
+
:long_name => @socket.read_string,
|
555
|
+
:primary_exchange => @socket.read_string,
|
556
|
+
:contract_month => @socket.read_string,
|
557
|
+
:industry => @socket.read_string,
|
558
|
+
:category => @socket.read_string,
|
559
|
+
:subcategory => @socket.read_string,
|
560
|
+
:time_zone => @socket.read_string,
|
561
|
+
:trading_hours => @socket.read_string,
|
562
|
+
:liquid_hours => @socket.read_string
|
552
563
|
end
|
553
564
|
end # ContractData
|
554
565
|
ContractDetails = ContractData
|
@@ -564,15 +575,15 @@ module IB
|
|
564
575
|
[:order_id, :int]
|
565
576
|
|
566
577
|
@contract =
|
567
|
-
Models::Contract.
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
578
|
+
Models::Contract.build :con_id => @socket.read_int,
|
579
|
+
:symbol => @socket.read_string,
|
580
|
+
:sec_type => @socket.read_string,
|
581
|
+
:expiry => @socket.read_string,
|
582
|
+
:strike => @socket.read_decimal,
|
583
|
+
:right => @socket.read_string,
|
584
|
+
:exchange => @socket.read_string,
|
585
|
+
:currency => @socket.read_string,
|
586
|
+
:local_symbol => @socket.read_string
|
576
587
|
@execution =
|
577
588
|
Models::Execution.new :order_id => @data[:order_id],
|
578
589
|
:exec_id => @socket.read_string,
|
@@ -648,32 +659,32 @@ module IB
|
|
648
659
|
load_map [:id, :int] # request id
|
649
660
|
|
650
661
|
@contract =
|
651
|
-
Models::Contract.
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
662
|
+
Models::Contract.build :symbol => @socket.read_string,
|
663
|
+
:sec_type => @socket.read_string,
|
664
|
+
:cusip => @socket.read_string,
|
665
|
+
:coupon => @socket.read_decimal,
|
666
|
+
:maturity => @socket.read_string,
|
667
|
+
:issue_date => @socket.read_string,
|
668
|
+
:ratings => @socket.read_string,
|
669
|
+
:bond_type => @socket.read_string,
|
670
|
+
:coupon_type => @socket.read_string,
|
671
|
+
:convertible => @socket.read_boolean,
|
672
|
+
:callable => @socket.read_boolean,
|
673
|
+
:puttable => @socket.read_boolean,
|
674
|
+
:desc_append => @socket.read_string,
|
675
|
+
:exchange => @socket.read_string,
|
676
|
+
:currency => @socket.read_string,
|
677
|
+
:market_name => @socket.read_string,
|
678
|
+
:trading_class => @socket.read_string,
|
679
|
+
:con_id => @socket.read_int,
|
680
|
+
:min_tick => @socket.read_decimal,
|
681
|
+
:order_types => @socket.read_string,
|
682
|
+
:valid_exchanges => @socket.read_string,
|
683
|
+
:valid_next_option_date => @socket.read_string,
|
684
|
+
:valid_next_option_type => @socket.read_string,
|
685
|
+
:valid_next_option_partial => @socket.read_string,
|
686
|
+
:notes => @socket.read_string,
|
687
|
+
:long_name => @socket.read_string
|
677
688
|
end
|
678
689
|
end # BondContractData
|
679
690
|
|
@@ -698,17 +709,17 @@ module IB
|
|
698
709
|
|
699
710
|
@data[:results] = Array.new(@data[:count]) do |index|
|
700
711
|
{:rank => @socket.read_int,
|
701
|
-
:contract => Contract.
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
+
:contract => Contract.build(:con_id => @socket.read_int,
|
713
|
+
:symbol => @socket.read_str,
|
714
|
+
:sec_type => @socket.read_str,
|
715
|
+
:expiry => @socket.read_str,
|
716
|
+
:strike => @socket.read_decimal,
|
717
|
+
:right => @socket.read_str,
|
718
|
+
:exchange => @socket.read_str,
|
719
|
+
:currency => @socket.read_str,
|
720
|
+
:local_symbol => @socket.read_str,
|
721
|
+
:market_name => @socket.read_str,
|
722
|
+
:trading_class => @socket.read_str),
|
712
723
|
:distance => @socket.read_str,
|
713
724
|
:benchmark => @socket.read_str,
|
714
725
|
:projection => @socket.read_str,
|
@@ -765,10 +776,10 @@ module IB
|
|
765
776
|
super
|
766
777
|
load_map [:id, :int] # request id
|
767
778
|
|
768
|
-
@contract = Models::Contract.
|
769
|
-
|
770
|
-
|
771
|
-
|
779
|
+
@contract = Models::Contract.build :under_comp => true,
|
780
|
+
:under_con_id => @socket.read_int,
|
781
|
+
:under_delta => @socket.read_decimal,
|
782
|
+
:under_price => @socket.read_decimal
|
772
783
|
end
|
773
784
|
end # DeltaNeutralValidation
|
774
785
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'ib-ruby/models/contract'
|
2
|
+
|
3
|
+
module IB
|
4
|
+
module Models
|
5
|
+
class Contract
|
6
|
+
# "BAG" is not really a contract, but a combination (combo) of securities.
|
7
|
+
# AKA basket or bag of securities. Individual securities in combo are represented
|
8
|
+
# by ComboLeg objects.
|
9
|
+
class Bag < Contract
|
10
|
+
|
11
|
+
def initialize opts = {}
|
12
|
+
super opts
|
13
|
+
@sec_type = IB::SECURITY_TYPES[:bag]
|
14
|
+
end
|
15
|
+
|
16
|
+
def description
|
17
|
+
@description || to_human
|
18
|
+
end
|
19
|
+
|
20
|
+
def to_human
|
21
|
+
"<Bag: " + [symbol, exchange, currency].join(" ") + " legs: " +
|
22
|
+
(@combo_legs_description ||
|
23
|
+
@combo_legs.map do |leg|
|
24
|
+
"#{leg.action} #{leg.ratio} * #{leg.con_id}"
|
25
|
+
end.join('|')) + ">"
|
26
|
+
end
|
27
|
+
|
28
|
+
end # class Bag
|
29
|
+
TYPES[IB::SECURITY_TYPES[:bag]] = Bag
|
30
|
+
end # class Contract
|
31
|
+
end # module Models
|
32
|
+
end # module IB
|
@@ -13,12 +13,6 @@ module IB
|
|
13
13
|
self.local_symbol = value.sub(/ /, ' '*(22-value.size))
|
14
14
|
end
|
15
15
|
|
16
|
-
def initialize opts = {}
|
17
|
-
super opts
|
18
|
-
@sec_type = IB::SECURITY_TYPES[:option]
|
19
|
-
@description ||= osi ? osi : "#{symbol} #{strike} #{right} #{expiry}"
|
20
|
-
end
|
21
|
-
|
22
16
|
# Make valid IB Contract definition from OSI (Option Symbology Initiative) code.
|
23
17
|
# NB: Simply making a new Contract with *local_symbol* (osi) property set to a
|
24
18
|
# valid OSI code works just as well, just do NOT set *expiry*, *right* or
|
@@ -48,7 +42,18 @@ module IB
|
|
48
42
|
:strike => strike
|
49
43
|
end
|
50
44
|
|
45
|
+
def initialize opts = {}
|
46
|
+
super opts
|
47
|
+
@sec_type = IB::SECURITY_TYPES[:option]
|
48
|
+
@description ||= osi ? osi : "#{symbol} #{strike} #{right} #{expiry}"
|
49
|
+
end
|
50
|
+
|
51
|
+
def to_human
|
52
|
+
"<Option: " + [symbol, expiry, right, strike, exchange, currency].join("-") + ">"
|
53
|
+
end
|
51
54
|
end # class Option
|
55
|
+
|
56
|
+
TYPES[IB::SECURITY_TYPES[:option]] = Option
|
52
57
|
end # class Contract
|
53
58
|
end # module Models
|
54
59
|
end # module IB
|
@@ -6,7 +6,27 @@ module IB
|
|
6
6
|
module Models
|
7
7
|
class Contract < Model
|
8
8
|
|
9
|
-
|
9
|
+
# Specialized Contract subclasses representing different security types
|
10
|
+
TYPES = {}
|
11
|
+
#BAG_SEC_TYPE = "BAG"
|
12
|
+
|
13
|
+
# This returns a Contract initialized from the serialize_ib_ruby format string.
|
14
|
+
def self.build opts = {}
|
15
|
+
type = opts[:sec_type]
|
16
|
+
if TYPES[type]
|
17
|
+
TYPES[type].new opts
|
18
|
+
else
|
19
|
+
Contract.new opts
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# This returns a Contract initialized from the serialize_ib_ruby format string.
|
24
|
+
def self.from_ib_ruby string
|
25
|
+
c = Contract.new
|
26
|
+
c.symbol, c.sec_type, c.expiry, c.strike, c.right, c.multiplier,
|
27
|
+
c.exchange, c.primary_exchange, c.currency, c.local_symbol = string.split(":")
|
28
|
+
c
|
29
|
+
end
|
10
30
|
|
11
31
|
# Fields are Strings unless noted otherwise
|
12
32
|
attr_accessor :con_id, # int: The unique contract identifier.
|
@@ -206,14 +226,6 @@ module IB
|
|
206
226
|
serialize.join(":")
|
207
227
|
end
|
208
228
|
|
209
|
-
# This returns a Contract initialized from the serialize_ib_ruby format string.
|
210
|
-
def self.from_ib_ruby string
|
211
|
-
c = Contract.new
|
212
|
-
c.symbol, c.sec_type, c.expiry, c.strike, c.right, c.multiplier,
|
213
|
-
c.exchange, c.primary_exchange, c.currency, c.local_symbol = string.split(":")
|
214
|
-
c
|
215
|
-
end
|
216
|
-
|
217
229
|
# Serialize under_comp parameters
|
218
230
|
def serialize_under_comp *args
|
219
231
|
# EClientSocket.java, line 471:
|
@@ -238,18 +250,28 @@ module IB
|
|
238
250
|
combo_legs.map { |leg| leg.serialize *fields }]
|
239
251
|
end
|
240
252
|
|
253
|
+
def to_s
|
254
|
+
"<Contract: " + instance_variables.map do |key|
|
255
|
+
unless key == :@summary
|
256
|
+
value = send(key[1..-1])
|
257
|
+
" #{key}=#{value}" unless value.nil? || value == '' || value == 0
|
258
|
+
end
|
259
|
+
end.compact.join(',') + " >"
|
260
|
+
end
|
261
|
+
|
241
262
|
def to_human
|
242
|
-
"<Contract: " + [symbol,
|
263
|
+
"<Contract: " + [symbol, sec_type, expiry, strike, right, exchange, currency].join("-") + ">"
|
243
264
|
end
|
244
265
|
|
245
266
|
def to_short
|
246
267
|
"#{symbol}#{expiry}#{strike}#{right}#{exchange}#{currency}"
|
247
268
|
end
|
248
269
|
|
249
|
-
def to_s
|
250
|
-
to_human
|
251
|
-
end
|
252
|
-
|
253
270
|
end # class Contract
|
254
271
|
end # module Models
|
255
272
|
end # module IB
|
273
|
+
|
274
|
+
# TODO Where should we require this?
|
275
|
+
require 'ib-ruby/models/contract/option'
|
276
|
+
require 'ib-ruby/models/contract/bag'
|
277
|
+
|
data/lib/ib-ruby/models/order.rb
CHANGED
@@ -337,13 +337,16 @@ module IB
|
|
337
337
|
end
|
338
338
|
|
339
339
|
def to_s #human
|
340
|
-
"<Order
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
end.compact.join(',') + " >"
|
340
|
+
"<Order:" + instance_variables.map do |key|
|
341
|
+
value = instance_variable_get(key)
|
342
|
+
" #{key}=#{value}" unless value.nil? || value == '' || value == 0
|
343
|
+
end.compact.join(',') + " >"
|
345
344
|
end
|
346
345
|
|
346
|
+
def to_human
|
347
|
+
"<Order: #{@status} #{@order_type} #{@action} #{@total_quantity} @ #{@limit_price}" +
|
348
|
+
" #{@tif} id/perm: #{@id}/#{@perm_id}>"
|
349
|
+
end
|
347
350
|
end # class Order
|
348
351
|
end # module Models
|
349
352
|
end # module IB
|
@@ -12,8 +12,7 @@
|
|
12
12
|
module IB
|
13
13
|
module Symbols
|
14
14
|
|
15
|
-
# Get the next valid quarter month >= today, for finding the
|
16
|
-
# front month of quarterly futures.
|
15
|
+
# Get the next valid quarter month >= today, for finding the front month of quarterly futures.
|
17
16
|
#
|
18
17
|
# N.B. This will not work as expected near/after expiration during that month, as
|
19
18
|
# volume rolls over to the next quarter even though the current month is still valid!
|
@@ -29,7 +28,6 @@ module IB
|
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
32
|
-
#
|
33
31
|
# WARNING: This is currently broken. It returns the next
|
34
32
|
# quarterly expiration month after the current month. Many futures
|
35
33
|
# instruments have monthly contracts for the near months. This
|
@@ -45,14 +43,13 @@ module IB
|
|
45
43
|
"#{ self.next_quarter_year(time) }#{ self.next_quarter_month(time) }"
|
46
44
|
end
|
47
45
|
|
48
|
-
#
|
49
46
|
# Convenience method; generates a Models::Contract instance for a futures
|
50
47
|
# contract with the given parameters.
|
51
48
|
#
|
52
49
|
# If expiry is nil, it will use the end month of the current
|
53
50
|
# quarter. This will be wrong for most contracts most of the time,
|
54
51
|
# since most contracts have the majority of their volume in a
|
55
|
-
# nearby intraquarter month.
|
52
|
+
# nearby intraquarter month.
|
56
53
|
#
|
57
54
|
# It is recommended that you specify an expiration date manually
|
58
55
|
# until next_expiry is fixed. Expiry should be a string in the
|
@@ -68,7 +65,6 @@ module IB
|
|
68
65
|
:description => description)
|
69
66
|
end
|
70
67
|
|
71
|
-
|
72
68
|
Futures ={
|
73
69
|
:ym => Models::Contract.new(:symbol => "YM",
|
74
70
|
:expiry => self.next_expiry(Time.now),
|
data/lib/ib-ruby.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: ib-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.5.
|
5
|
+
version: 0.5.10
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Paul Legato
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-12-
|
14
|
+
date: 2011-12-19 00:00:00 -08:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
@@ -47,6 +47,7 @@ executables:
|
|
47
47
|
- global_cancel
|
48
48
|
- historic_data
|
49
49
|
- historic_data_cli
|
50
|
+
- list_orders
|
50
51
|
- market_data
|
51
52
|
- option_data
|
52
53
|
- place_order
|
@@ -63,6 +64,7 @@ files:
|
|
63
64
|
- bin/global_cancel
|
64
65
|
- bin/historic_data
|
65
66
|
- bin/historic_data_cli
|
67
|
+
- bin/list_orders
|
66
68
|
- bin/market_data
|
67
69
|
- bin/option_data
|
68
70
|
- bin/place_order
|
@@ -75,6 +77,7 @@ files:
|
|
75
77
|
- lib/ib-ruby/messages.rb
|
76
78
|
- lib/ib-ruby/models/bar.rb
|
77
79
|
- lib/ib-ruby/models/combo_leg.rb
|
80
|
+
- lib/ib-ruby/models/contract/bag.rb
|
78
81
|
- lib/ib-ruby/models/contract/option.rb
|
79
82
|
- lib/ib-ruby/models/contract.rb
|
80
83
|
- lib/ib-ruby/models/execution.rb
|