Paper Environment Crypto Not Authorized

I have monthly subscription active,

For Live environment when I call
socket is opened and is Authorized

But when I call this on Paper environment
socket is opened and but it is Unauthorized

Anybody having this issue in Crypto Paper environment

I assume that you’re using the different key/secret pair for different environments and you are able to request the crypto historical data on the Paper environment. In fact, there is only one Crypto streaming endpoint and authorization depends only on crypto enablement attached to your key/secret pair.
In most cases, the account reset and key/secret re-generation for the Paper account solve the problem.

I am using different key/secret pair for Paper and Live environment.

In live environment I have no issue connecting to alpacaStreamingClient, alpacaDataStreamingClient and alpacaCryptoStreamingClient.

On the paper environment there is no issue connecting to alpacaStreamingClient and alpacaDataStreamingClient, but when I try to connect to alpacaCryptoStreamingClient it show socket opened but comes as UnAuthorized.
I event tried resetting the paper environment but still same issue.
I am able to get snapshot and historical bars for the crypto asset in paper environment with no issues.

I also see this message “Exception Writing is not allowed after writer was completed” error on the OnError event for the alpacaCryptoStreamingClient.

Please, open the issue on GitHub and provide all required information - stack trace, Alpaca SDK version, .NET SDK version, your OS version/bitness, minimal code for reproducing the error. It would be much easier for me to track this problem on GitHub.


Thank you for contributing! We have a dedicated discord focused solely on Crypto related queries with an active community and more engagement. Feel free to join via the invite link below;