Class: Em::Nordnet::Feed::Private
- Inherits:
-
DSL
- Object
- DSL
- Em::Nordnet::Feed::Private
show all
- Defined in:
- lib/em-nordnet/feed/private.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/private.rb', line 9
def hostname
Nordnet.api.private_feed[:hostname]
end
|
#on_order(&block) ⇒ Object
21
22
23
|
# File 'lib/em-nordnet/feed/private.rb', line 21
def on_order &block
add_callback :order, block
end
|
#on_trade(&block) ⇒ Object
17
18
19
|
# File 'lib/em-nordnet/feed/private.rb', line 17
def on_trade &block
add_callback :trade, block
end
|
#port ⇒ Object
13
14
15
|
# File 'lib/em-nordnet/feed/private.rb', line 13
def port
Nordnet.api.private_feed[:port]
end
|
#types ⇒ Object
5
6
7
|
# File 'lib/em-nordnet/feed/private.rb', line 5
def types
[:trade, :order]
end
|