title: How do I open a secure WSS websocket in KDB?
body: <p>I'm trying to figure out how to connect to a data feed.</p>
  <p>The data feed is at</p>
  <pre><code>wss: &quot;:wss://stream.data.alpaca.markets/v2/iex&quot;
  .z.ws:{0N!x;}
  r:(`$wss)&quot;&quot;
  </code></pre>
  <p>I have set up TLS in KDB and can access <code>https</code> endpoints just fine. This says <code>OS reports: No route to host</code>.</p>
  <p>The documentation refers to using <code>stunnel</code>, but doesn't clarify whether that's for securing KDB as a server (which is what stunnel looks like it's mainly for), or decrypting a feed as a client.</p>
  <p><a href="https://code.kx.com/q/kb/websockets/#simple-websocket-client-example" rel="nofollow noreferrer">https://code.kx.com/q/kb/websockets/#simple-websocket-client-example</a></p>
  <p>What am I doing wrong?</p>