Skip to content

Commit

Permalink
Individual symbol ticker stream to websockets.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luminous13 authored Mar 28, 2021
1 parent 2c3f1bb commit 7d3326c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions binance/websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,24 @@ def start_symbol_ticker_futures_socket(self, symbol, callback):
]
"""
return self._start_futures_socket(symbol.lower() + '@bookTicker', callback)

def start_individual_symbol_ticker_futures_socket(self, symbol, callback):
"""Start a futures websocket for a single symbol's ticker data
https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
:param symbol: required
:type symbol: str
:param callback: callback function to handle messages
:type callback: function
:returns: connection key string if successful, False otherwise
.. code-block:: python
{
"e": "24hrTicker", // Event type
"E": 123456789, // Event time
"s": "BTCUSDT", // Symbol
"p": "0.0015", // Price change
}
"""
return self._start_futures_socket(symbol.lower() + '@ticker', callback)

def start_all_ticker_futures_socket(self, callback):
"""Start a websocket for all ticker data
Expand Down

0 comments on commit 7d3326c

Please sign in to comment.