alpacahq / alpaca-ts

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

Cannot discern which stock the bar update is for with stream API #67

Closed aechan closed 3 years ago

aechan commented 3 years ago

Description When I subscribe to the "bars" updates for a set of stocks, I want to be able to listen to updates with stream.on("bar", (bar) => {}); but the issue is that the Bar type does not contain any information about which stock this bar is for. So when I listen for bar updates I have no idea which stock these updates are for.

In the alpaca documentation however, it seems to say that the JSON returned for Bar objects contains a property S which is the symbol name.

117 commented 3 years ago

Yeah it appears they did not have that field at the time of initial beta release. I've added it in the latest version and tested locally to confirm.

aechan commented 3 years ago

Thanks for the quick turnaround!