title: Cannot connect to Binance websocket. I get: WebSocketBadStatusException: Handshake status 400 Bad Request
body: <p>I am trying to connect to the Binance websocket stream.
  Following <a href="https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams" rel="nofollow noreferrer">their documentation</a> I use the below code to establish the connection:</p>
  
  <pre><code>from websocket import create_connection
  
  ws = create_connection('wss://fstream.binance.com/')
  </code></pre>
  
  <p>When running it though, I get the following error:</p>
  
  <pre><code>WebSocketBadStatusException: Handshake status 400 Bad Request
  </code></pre>
  
  <p>I could not find any info on the web about this error.</p>
  
  <p>Does anyone know how to fix this?</p>