Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remains is not defined #26

Closed
sterlinglemon opened this issue Aug 14, 2019 · 1 comment
Closed

remains is not defined #26

sterlinglemon opened this issue Aug 14, 2019 · 1 comment

Comments

@sterlinglemon
Copy link

There is a Reference not defined exception at: alpaca-trade-api-js/lib/resources/websockets.js Line 172.

Change
remains = Object.keys(this.subscriptionState)
To
let remains = Object.keys(this.subscriptionState)

This fixes the exception, however the client still is subscribed to the given keys after calling the unsubscribe method. All this method seems to do is alter the subscription list but it fails to fully unsubscribe from the given keys.

@ttt733
Copy link
Contributor

ttt733 commented Aug 15, 2019

Thanks for pointing this out. Unsubscription is currently not actually supported by the Alpaca API, only by Polygon. I'll be removing this misleading method in our next release.

@ttt733 ttt733 closed this as completed Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants