Skip to content

Trade

FreeValueStandardPro

Get the latest trade snapshot for one or more stocks.

Returns a real-time last trade from the Nasdaq Basic feed if the account has a stocks standard or pro subscription.

  • Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.
rust
pub fn stock_snapshot_trade(&self, symbols: &[&str]) -> StockSnapshotTradeBuilder<'_>

Optional parameters chain on the builder: .venue(&str), .min_time(&str). Execute with .awaitResult<Vec<TradeTick>, Error>, or decode chunk-by-chunk with .stream(handler).

Example

rust
let rows = tdx.stock_snapshot_trade(&["AAPL"]).await?;
for t in &rows {
    println!("date={} ms_of_day={} price={} size={}", t.date, t.ms_of_day, t.price, t.size);
}

Parameters

NameTypeRequiredDefaultDescription
symbolsymbolsyesComma-separated ticker symbols (e.g. AAPL,MSFT)
venuestringnonqbVenue/exchange filter. Accepted values: nqb, utp_cta.
min_timestringnoMinimum time filter
timeout_msintnoPer-request deadline in milliseconds. 0 means no deadline.

Response

Rows of TradeTick:

FieldTypeDescription
ms_of_dayi32Milliseconds since midnight Eastern Time.
sequencei32Exchange-assigned trade sequence number.
ext_condition1i32Additional trade condition code.
ext_condition2i32Additional trade condition code.
ext_condition3i32Additional trade condition code.
ext_condition4i32Additional trade condition code.
conditioni32Trade condition code.
sizei32Number of contracts or shares traded.
exchangei32Exchange code where the trade executed.
pricef64Trade price.
condition_flagsi32Trade condition flags bitmap.
price_flagsi32Trade price flags bitmap.
volume_typei32Volume reporting mode: 0 = incremental, 1 = cumulative.
records_backi32Offset of this record behind the most recent record.
datei32Trading date as a YYYYMMDD integer.

Released under the Apache-2.0 License.