Skip to content

Instantly share code, notes, and snippets.

@oliver-zehentleitner
Last active June 22, 2025 17:13
Show Gist options
  • Select an option

  • Save oliver-zehentleitner/5a5d739710400c8fbd9f04833c4bf1dc to your computer and use it in GitHub Desktop.

Select an option

Save oliver-zehentleitner/5a5d739710400c8fbd9f04833c4bf1dc to your computer and use it in GitHub Desktop.
Initiate UNICORN Binance WebSocket API
from unicorn_binance_websocket_api import BinanceWebSocketApiManager
def handle_socket_message(data):
print(f"Received data:\r\n{data}\r\n")
ubwa = BinanceWebSocketApiManager(exchange="binance.com",
process_stream_data=handle_socket_message,
output_default="dict")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment