'WebSocket Get Futures Realtime Price Binance

This is how I established a real-time price WebSocket price for Spot Market, but how do I get the real-time price for Futures BTCUSDT?

socket = f"wss://stream.binance.com:9443/ws/dotusdt@kline_1m"

def on_message(ws, message):
    print(message)

def on_close(ws):
    print("Connection closed")

ws = websocket.WebSocketApp(socket, on_message=on_message, on_close=on_close)

Looked for answers but couldn't find any favorable ones. Thanks!



Solution 1:[1]

socket = f"wss://fstream.binance.com:9443/ws/dotusdt@kline_1m"

you need to add "f" before "stream"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rondha Server