Method: Binance::Client::WebSocket#ticker
- Defined in:
- lib/binance/client/websocket.rb
#ticker(symbol:, methods:) ⇒ Object
Public: Create a Ticker stream
:symbol - The String symbol the stream will listen to
:methods - The Hash which contains the event handler methods to pass to
the WebSocket client
:open - The Proc called when a stream is opened (optional)
:message - The Proc called when a stream receives a
:error - The Proc called when a stream receives an error (optional)
:close - The Proc called when a stream is closed (optional)
107 108 109 |
# File 'lib/binance/client/websocket.rb', line 107 def ticker(symbol:, methods:) single stream: { symbol: symbol, type: 'ticker' }, methods: methods end |