Class: IB::Future

Inherits:
Contract show all
Defined in:
lib/models/ib/future.rb

Constant Summary

Constants inherited from Contract

Contract::Subclasses

Instance Attribute Summary

Attributes inherited from Contract

#description

Instance Method Summary collapse

Methods inherited from Contract

#==, #bag?, #bond?, build, #essential, #expiry, #index?, #merge, #option?, #order_requirements, #serialize, #serialize_ib_ruby, #serialize_legs, #serialize_long, #serialize_short, #serialize_supershort, #serialize_under_comp, #stock?, #table_header, #table_row, #to_s, #to_short, #verify

Methods included from BaseProperties

#==, #as_table, #content_attributes, #invariant_attributes, #set_attribute_defaults, #table_header, #table_row, #update_missing

Instance Method Details

#default_attributesObject



6
7
8
# File 'lib/models/ib/future.rb', line 6

def default_attributes
  super.merge :sec_type => :future, currency:'USD'
end

#to_humanObject



9
10
11
# File 'lib/models/ib/future.rb', line 9

def to_human
  "<Future: " + [symbol, expiry, currency].join(" ") + ">"
end