Method: Bitmex::Chat#stats

Defined in:
lib/bitmex/chat.rb

#stats {|Hash| ... } ⇒ Bitmex::Mash

Get connected users

Yields:

  • (Hash)

    the stats

Returns:

  • (Bitmex::Mash)

    an array with browser users in the first position and API users (bots) in the second position.



32
33
34
35
36
37
38
# File 'lib/bitmex/chat.rb', line 32

def stats(&ablock)
  if block_given?
    websocket.listen connected: nil, &ablock
  else
    rest.get chat_path(:connected)
  end
end