Stock Full Trades
Streams every trade print across the entire stock universe — one subscription, no per-symbol management. For each traded symbol the stream delivers three events, not just the trade: a Quote (the last BBO), an Ohlcvc bar, and then the Trade print itself. Read the symbol off each event's contract.
The snippets below assume a connected client with streaming started — see Getting Started for the connect-and-stream ladder.
use thetadatadx::streaming::SecTypeExt;
use thetadatadx::streaming::{StreamData, StreamEvent};
use thetadatadx::SecType;
client.stream().start_streaming(|event: &StreamEvent| match event {
StreamEvent::Data(StreamData::Quote { contract, bid, ask, .. }) => {
println!("{} quote bid={bid} ask={ask}", contract.symbol);
}
StreamEvent::Data(StreamData::Ohlcvc { contract, open, high, low, close, .. }) => {
println!("{} bar o={open} h={high} l={low} c={close}", contract.symbol);
}
StreamEvent::Data(StreamData::Trade { contract, price, size, .. }) => {
println!("{} trade price={price} size={size}", contract.symbol);
}
_ => {}
})?;
let sub = SecType::Stock.full_trades();
client.stream().subscribe(sub.clone())?;
// Remove this stream; the session stays open for other subscriptions.
client.stream().unsubscribe(sub)?;What the stream delivers
This is not a trade-only feed. For every traded contract the stream delivers three event types: a Quote, an Ohlcvc bar, and the Trade print. The Quote (the last BBO) and the Ohlcvc bar are sent automatically before the trade occurs, then the Trade follows. Narrow on event.kind (quote / ohlcvc / trade) to handle each, and read the contract identity off every event's contract.
Per-contract sequence
quote QQQ bid/ask (last BBO)
ohlcvc QQQ open/high/low/close, volume, count
trade QQQ price, size, exchange, conditionOHLC bars
The Ohlcvc bars on this stream come from upstream automatically — one is sent for each traded contract before its trade, you do not subscribe to them separately.
Before you subscribe
- This stream requires a Stocks Pro subscription.
- Each new stream request must use a higher
idthan the last; reusing anidstops the terminal from automatically resubscribing your earlier streams after a reconnect. The SDK manages theidfor you; the WebSocket envelope sets it explicitly.
Quote event fields
Each update arrives as a Quote event with these fields:
| Field | Type | Description |
|---|---|---|
contract | contract | Resolved contract identity (symbol, security type, and option fields). |
ms_of_day | i32 | Milliseconds since midnight Eastern Time. |
bid_size | i32 | Last BBO bid size. |
bid_exchange | i32 | Exchange code of the BBO bid. |
bid | f64 | Last BBO bid price. |
bid_condition | i32 | Quote condition code on the bid side. |
ask_size | i32 | Last BBO ask size. |
ask_exchange | i32 | Exchange code of the BBO ask. |
ask | f64 | Last BBO ask price. |
ask_condition | i32 | Quote condition code on the ask side. |
date | i32 | Trading date as a YYYYMMDD integer. |
received_at_ns | u64 | Local receive timestamp, nanoseconds since the Unix epoch. |
The contract field carries symbol, the security type, and — for options — expiration, right, and the strike. See Handling Events for the full event catalogue and per-language field shapes.
Ohlcvc event fields
Each update arrives as a Ohlcvc event with these fields:
| Field | Type | Description |
|---|---|---|
contract | contract | Resolved contract identity (symbol, security type, and option fields). |
ms_of_day | i32 | Milliseconds since midnight Eastern Time. |
open | f64 | Opening trade price of the bar. |
high | f64 | Highest traded price of the bar. |
low | f64 | Lowest traded price of the bar. |
close | f64 | Closing traded price of the bar. |
volume | i64 | Number of contracts or shares traded in the bar. |
count | i64 | Number of trades in the bar. |
date | i32 | Trading date as a YYYYMMDD integer. |
received_at_ns | u64 | Local receive timestamp, nanoseconds since the Unix epoch. |
The contract field carries symbol, the security type, and — for options — expiration, right, and the strike. See Handling Events for the full event catalogue and per-language field shapes.
Trade event fields
Each update arrives as a Trade event with these fields:
| Field | Type | Description |
|---|---|---|
contract | contract | Resolved contract identity (symbol, security type, and option fields). |
ms_of_day | i32 | Milliseconds since midnight Eastern Time. |
sequence | i32 | Exchange-assigned trade sequence number. |
condition | i32 | Trade condition code. |
size | i32 | Number of contracts or shares traded. |
exchange | i32 | Exchange code where the trade executed. |
price | f64 | Trade price. |
date | i32 | Trading date as a YYYYMMDD integer. |
received_at_ns | u64 | Local receive timestamp, nanoseconds since the Unix epoch. |
The contract field carries symbol, the security type, and — for options — expiration, right, and the strike. See Handling Events for the full event catalogue and per-language field shapes.
WebSocket frame
The native SDK callbacks (Rust/Python/TypeScript/C++) receive every field above. Each raw WebSocket frame (the Server tab) is { "header": {…}, "contract": {…}, "trade": {…} }: header and contract are always present, while the trade payload object carries only the terminal-compatible subset: ms_of_day, sequence, size, condition, price, exchange, date. The remaining event fields are delivered to the SDK callbacks, not the trade payload object.