Skip to content

Commit 7d3326c

Browse files
authored
Individual symbol ticker stream to websockets.
1 parent 2c3f1bb commit 7d3326c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

binance/websockets.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,24 @@ def start_symbol_ticker_futures_socket(self, symbol, callback):
529529
]
530530
"""
531531
return self._start_futures_socket(symbol.lower() + '@bookTicker', callback)
532+
533+
def start_individual_symbol_ticker_futures_socket(self, symbol, callback):
534+
"""Start a futures websocket for a single symbol's ticker data
535+
https://binance-docs.github.io/apidocs/futures/en/#individual-symbol-ticker-streams
536+
:param symbol: required
537+
:type symbol: str
538+
:param callback: callback function to handle messages
539+
:type callback: function
540+
:returns: connection key string if successful, False otherwise
541+
.. code-block:: python
542+
{
543+
"e": "24hrTicker", // Event type
544+
"E": 123456789, // Event time
545+
"s": "BTCUSDT", // Symbol
546+
"p": "0.0015", // Price change
547+
}
548+
"""
549+
return self._start_futures_socket(symbol.lower() + '@ticker', callback)
532550

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

0 commit comments

Comments
 (0)