Sha256: 8280ebc5f215ce665bd0bcab79dc9276e6cc224000000acf2c70f20cd606ab00

Contents?: true

Size: 1020 Bytes

Versions: 3

Compression:

Stored size: 1020 Bytes

Contents

class AddComboLegs < ActiveRecord::Migration

  def change
    # ComboLeg objects represent individual security legs in a "BAG"
    create_table(:combo_legs) do |t|
      t.references :combo
      t.references :leg_contract
      t.integer :con_id #  # int: The unique contract identifier specifying the security.
      t.string :side, :limit => 1 # Action/side: BUY/SELL/SSHORT/SSHORTX
      t.integer :ratio, :limit => 2 # int: Select the relative number of contracts for the leg you
      t.string :exchange # String: exchange to which the complete combo order will be routed.
      t.integer :exempt_code, :limit => 2 # int:
      t.integer :short_sale_slot, :limit => 2 # int: 0 - retail(default), 1 = clearing broker, 2 = third party
      t.integer :open_close, :limit => 2 #  SAME = 0; OPEN = 1; CLOSE = 2; UNKNOWN = 3
      t.string :designated_location # Otherwise leave blank or orders will be rejected.:status # String: Displays the order status.Possible values include:
      t.timestamps
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ib-ruby-0.8.1 db/migrate/141_add_combo_legs.rb
ib-ruby-0.8.0 db/migrate/141_add_combo_legs.rb
ib-ruby-0.7.12 db/migrate/141_add_combo_legs.rb