Sha256: 54cd1b1b2b28d57504d8138e70db318609bebd4130e929bbe5475ca8d836f256
Contents?: true
Size: 1.17 KB
Versions: 5
Compression:
Stored size: 1.17 KB
Contents
class AddExecutions < ActiveRecord::Migration def change create_table(:executions) do |t| # TWS orders have fixed local_id of 0 AND client id of 0 t.references :order t.integer :local_id # TWS orders have a fixed order id of 0 t.integer :client_id # Id of the client that placed the order t.integer :perm_id # Permanent order id, remains the same over TWS sessions t.string :order_ref # Order reference t.string :exec_id # Unique order execution id t.string :side, :limit => 1 # Was the transaction a buy or a sale: BOT|SLD t.integer :quantity # The number of shares filled t.integer :cumulative_quantity # Cumulative quantity t.float :price # double: The order execution price t.float :average_price # double: Average price (for all executions?) t.string :exchange # Exchange that executed the order t.string :account_name # The customer account number t.boolean :liquidation, :limit => 1 # This position to be liquidated last should the need arise t.string :time, :limit => 18 # String! The order execution time t.timestamps end end end
Version data entries
5 entries across 5 versions & 1 rubygems