Package markets.alpaca.client.ws
Class StockSubscription
java.lang.Object
markets.alpaca.client.ws.StockSubscription
Describes which stock data channels and symbols to subscribe to (or unsubscribe from).
Use builder() to construct an instance. Each field is a set of symbols; an empty set
means "no change for this channel". Use "*" to subscribe to all available symbols.
Subscribing to trades automatically subscribes to corrections and cancel-errors for the
same symbols.
var sub = StockSubscription.builder()
.trades("AAPL", "TSLA")
.quotes("AAPL")
.bars("*")
.build();
stream.subscribe(sub);
-
Method Details
-
trades
-
quotes
-
bars
-
dailyBars
-
updatedBars
-
statuses
-
lulds
-
isEmpty
public boolean isEmpty()Returnstrueif this subscription contains at least one symbol in any channel. -
builder
-