Module: IB::Symbols::Stocks

Extended by:
IB::Symbols
Defined in:
lib/ib/symbols/stocks.rb

Constant Summary

Constants included from IB::Symbols

VERSION

Class Method Summary collapse

Methods included from IB::Symbols

[], add_contract, all, allocate_collection, bunch, contracts, hardcoded?, method_missing, print_all, purge_collection, read_collection, remove_contract, set_origin, store_collection, to_human

Class Method Details

.contractsObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/ib/symbols/stocks.rb', line 8

def self.contracts
 @contracts.presence || super.merge(
	 :ib_smart =>   IB::Stock.new( symbol: 'IBKR', 
													:description  => 'Interactive Brokers Stock with smart exchange setting'),
	 :ib =>   IB::Stock.new( symbol: 'IBKR', exchange: 'ISLAND', 
												 :description  => 'Interactive Brokers Stock'),
	 :aapl => IB::Stock.new(:symbol => "AAPL",
													:currency => "USD",
													:description => "Apple Inc."),

	 :msft => IB::Stock.new( symbol: 'MSFT', primary_exchange: 'ISLAND',
													description: 'Apple, primary trading @ ISLAND'), ## primary exchange set
	 :vxx =>	IB::Stock.new(:symbol => "VXX",
													:exchange => "ARCA",
													:description => "iPath S&P500 VIX short term Futures ETN"),
	 :wfc =>	IB::Stock.new(:symbol => "WFC",
													:exchange => "NYSE",
													:currency => "USD",
													:description => "Wells Fargo"),
	:sie =>		IB::Stock.new( symbol: 'SIE', currency: 'EUR', 
													description: 'Siemes AG'),
	:wrong => IB::Stock.new(:symbol => "QEEUUE",
												:exchange => "NYSE",
												:currency => "USD",
												:description => "Non-existent stock")
											)
end