alpacahq / alpaca-ts

A TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams.
ISC License
154 stars 42 forks source link

Unnecessary `reconnect` options. #7

Closed aqilc closed 4 years ago

aqilc commented 4 years ago

I am very sure these options only add clutter to the class. Anyone can just put a listener on the close event and just re-initialize anyways, so there is literally no point. I would like to see a use case if otherwise.

aqilc commented 4 years ago

I'm getting rid of this completely from the Streams API in the current pull request that I'm making.

117 commented 4 years ago

Im all for passing reconnection onto the client user.

aqilc commented 4 years ago

what do you mean?

aqilc commented 4 years ago

Sorry, i was cleaning up the stream class xd

aqilc commented 4 years ago

so uh, big mistake of me forgetting authentication. image I'm trying to figure out how to fix.

117 commented 4 years ago

Sorry again that im not able to merge or review these yet. On a long drive today.

aqilc commented 4 years ago

Ohhhh, thats kewl. Have fun :D

aqilc commented 4 years ago

I don't even know if you'll be able to use this but I started the documentation kind of.

aqilc commented 4 years ago

image

aqilc commented 4 years ago

I think this deserves a big version upgrade called 0.2.0 if you do use any of this.

aqilc commented 4 years ago

I don't even know why I am working so much on this, but part of it's definitely that I will have to use this in the future to make bots and I would rather have it be extremely smooth and user-friendly.

aqilc commented 4 years ago

@117 How did you authenticate users before? I don't spot anything special or anything valid.

117 commented 4 years ago

Sends an ‘authentication’ message to the websocket server with key and secret.

aqilc commented 4 years ago

How did you get it before? I didn't spot any Client parameter or key option.

aqilc commented 4 years ago

Sorry for the late response, I took a shower and did some chores xd

117 commented 4 years ago

How did you get it before? I didn't spot any Client parameter or key option.

The client is passed in the Stream constructor.

aqilc commented 4 years ago

oh

aqilc commented 4 years ago

I don't get why this error is happening: image Do you happen to have any clue? I am not assigning the connection to anything else anywhere.

aqilc commented 4 years ago

Ok, fixed it... everything should be done now :D

aqilc commented 4 years ago

Fixed in a new commit, so this should be closed.