enhancements

This commit is contained in:
Dobromir Popov
2025-04-01 13:46:53 +03:00
parent a46b2c74f8
commit 73c5ecb0d2
17 changed files with 2279 additions and 736 deletions

19
test_websocket.py Normal file
View File

@@ -0,0 +1,19 @@
import websockets
import asyncio
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
async def test_websocket():
url = "wss://stream.binance.com:9443/ws/btcusdt@trade"
try:
logger.info(f"Connecting to {url}")
async with websockets.connect(url) as ws:
logger.info("Connected successfully")
message = await ws.recv()
logger.info(f"Received message: {message[:200]}...")
except Exception as e:
logger.error(f"Connection failed: {str(e)}")
asyncio.run(test_websocket())