Class: Em::Nordnet::Feed::Private

Inherits:
DSL
  • Object
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

Constructor Details

This class inherits a constructor from Em::Nordnet::Feed::DSL

Instance Method Details

#hostnameObject



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

#portObject



13
14
15
# File 'lib/em-nordnet/feed/private.rb', line 13

def port
  Nordnet.api.private_feed[:port]
end

#typesObject



5
6
7
# File 'lib/em-nordnet/feed/private.rb', line 5

def types
  [:trade, :order]
end