Expand description
HTTP chunked-transfer streaming for TradeStation v3.
TradeStation uses HTTP streaming (NOT WebSocket):
- Content-Type:
application/vnd.tradestation.streams.v3+json - Newline-delimited JSON objects
StreamStatusmessages signal snapshot boundaries (EndSnapshot) and reconnect requests (GoAway)
All stream methods return a BoxStream of typed updates that can be
consumed with futures::StreamExt.
§Example
use futures::StreamExt;
let mut stream = client.stream_quotes(&["AAPL"]).await?;
while let Some(result) = stream.next().await {
let quote = result?;
if !quote.is_status() {
println!("{}: {}", quote.symbol.as_deref().unwrap_or("?"), quote.last.as_deref().unwrap_or("?"));
}
}Structs§
- Stream
Bar - A streaming bar (OHLCV) update.
- Stream
Market Depth Aggregate - A streaming market depth aggregate summary.
- Stream
Market Depth Quote - A streaming market depth (Level 2) quote.
- Stream
Option Chain - A streaming option chain update.
- Stream
Option Quote - A streaming option quote update.
- Stream
Order - A streaming order status update.
- Stream
Position - A streaming position update.
- Stream
Quote - A streaming quote update.
- Stream
Status - Stream status messages from TradeStation.
Type Aliases§
- BoxStream
- Type alias for a boxed async stream of results.