import asyncio
import websockets
import json

async def test():
    uri = "wss://ws.derivws.com/websockets/v3?app_id=1"
    
    async with websockets.connect(uri) as ws:
        # Try cashier call without auth
        await ws.send(json.dumps({"cashier": "deposit", "provider": "doughflow"}))
        resp = json.loads(await asyncio.wait_for(ws.recv(), timeout=5))
        print("cashier unauthenticated:", json.dumps(resp, indent=2)[:500])
        
        # Try get_limits without auth
        await ws.send(json.dumps({"get_limits": 1}))
        resp = json.loads(await asyncio.wait_for(ws.recv(), timeout=5))
        print("\nget_limits:", json.dumps(resp, indent=2)[:500])

asyncio.run(test())
