# Disconnected (code: 1006, reason: "")

**URL:** <https://forum.alpaca.markets/t/disconnected-code-1006-reason/3546>\
**Category:** Alpaca Account Troubleshooting\
**Created:** [December 7, 2020, 5:41pm UTC](https://forum.alpaca.markets/t/disconnected-code-1006-reason/3546 "2020-12-07T17:41:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_X](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/anthony_x/32/1674_2.png) [@Anthony\_X](https://forum.alpaca.markets/u/Anthony_X)\
**Post date:** [December 7, 2020, 5:41pm UTC](https://forum.alpaca.markets/t/disconnected-code-1006-reason/3546/1 "2020-12-07T17:41:43Z")

</div>

## Environment

**Language**  
_Let us know what language you’re writing your code in. Please include the version number you’re running, if possible._  
Python 3

**Alpaca SDK Version**  
_If you’re using an SDK library to interface with the Alpaca API, please include the version number you have installed in your environment._  
API v2

 ![authERRORCapture3](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/c/c0785c0675f356bf2cf5a73e6f921ef5cc55d755.png)  
**Other Environment Details**  
_If there’s anything else you’d like to include about the environment you’re running your code in - operating System, cloud provider, etc. - list it here._

## Problem

**Summary**  
Trying to Real-Time Streaming Stock Market Data with Python and Websockets

_Describe the problem you’re running into here._  
After typing in VS code terimal & conntecting through this command:  
wscat -c wss://data.alpaca.markets/stream  
I get connected but then after I try typing my API key: {“action”:“auth”,“params”:"\*\*\*\*\*\*\*"}  
I get Disconnected (code: 1006, reason: “”)  
**Paper or Live Trading?**  
_Let us know if you’re using the paper trading simulator or the live trading API._

```
       Paper

```

**Example Code**  
`If you have code that reproduces the problem or will make your issue more clear, please include it here`

```
        Screenshot attached here is best
```
