Connect to our real-time stream using the following WebSockets:
Note: Data is streamed in real-time JSON format. No history is stored.
import asyncio
import aiohttp
import json
async def monitor():
url = "wss://crt.foxcore.tech/ws/crt"
async with aiohttp.ClientSession() as session:
async with session.ws_connect(url) as ws:
print(f"Connected to {url}")
async for msg in ws:
if msg.type == aiohttp.WSMsgType.TEXT:
data = json.loads(msg.data)
print(f"[{data['datetime']}] {data['domains'][0]}")
asyncio.run(monitor())