.env. You connect to the proxy without needing to implement Kalshi’s auth protocol yourself.
Connect
Subscribe to channels
After connecting, send a subscribe command:ticker— price and volume updatesorderbook_delta— orderbook changestrade— trade eventsfill— fill events (requires authentication)
Troubleshooting
401 Unauthorized? Kalshi demo and production use different credentials. If your key is from demo.kalshi.co, set:wss://api.elections.kalshi.com/trade-api/ws/v2