Method: Binance::Client::WebSocket#kline
- Defined in:
- lib/binance/client/websocket.rb
permalink #kline(symbol:, interval:, methods:) ⇒ Object
Public: Create an Kline stream
:symbol - The String symbol the stream will listen to
:interval - The String interval the stream will update with. The
intervals that may be used can be found in the Binance API
docs.
: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 message
:error - The Proc called when a stream receives an error (optional)
:close - The Proc called when a stream is closed (optional)
92 93 94 95 |
# File 'lib/binance/client/websocket.rb', line 92 def kline(symbol:, interval:, methods:) single stream: { symbol: symbol, type: 'kline', interval: interval }, methods: methods end |