Class: Em::Nordnet::Feed::Public
- Inherits:
-
DSL
- Object
- DSL
- Em::Nordnet::Feed::Public
show all
- Defined in:
- lib/em-nordnet/feed/public.rb
Instance Attribute Summary
Attributes inherited from DSL
#callbacks, #session, #socket
Instance Method Summary
collapse
Methods inherited from DSL
#add_callback, #initialize, #on_heartbeat
Instance Method Details
#hostname ⇒ Object
9
10
11
|
# File 'lib/em-nordnet/feed/public.rb', line 9
def hostname
Nordnet.api.public_feed[:hostname]
end
|
#on_depth(&block) ⇒ Object
25
26
27
|
# File 'lib/em-nordnet/feed/public.rb', line 25
def on_depth &block
add_callback :depth, block
end
|
#on_index(&block) ⇒ Object
29
30
31
|
# File 'lib/em-nordnet/feed/public.rb', line 29
def on_index &block
add_callback :index, block
end
|
#on_news(&block) ⇒ Object
33
34
35
|
# File 'lib/em-nordnet/feed/public.rb', line 33
def on_news &block
add_callback :news, block
end
|
#on_price(&block) ⇒ Object
17
18
19
|
# File 'lib/em-nordnet/feed/public.rb', line 17
def on_price &block
add_callback :price, block
end
|
#on_trade(&block) ⇒ Object
21
22
23
|
# File 'lib/em-nordnet/feed/public.rb', line 21
def on_trade &block
add_callback :trade, block
end
|
#on_trading_status(&block) ⇒ Object
37
38
39
|
# File 'lib/em-nordnet/feed/public.rb', line 37
def on_trading_status &block
add_callback :trading_status, block
end
|
#port ⇒ Object
13
14
15
|
# File 'lib/em-nordnet/feed/public.rb', line 13
def port
Nordnet.api.public_feed[:port]
end
|
#types ⇒ Object
5
6
7
|
# File 'lib/em-nordnet/feed/public.rb', line 5
def types
[:price, :depth, :trade, :index, :news, :trading_status]
end
|