Skip to content

Trade

FreeValueStandardPro

Fetch all trades for a stock on a given date.

Returns every trade reported by UTP & CTA. Set the venue parameter to nqb to access current-day real-time historic data from the Nasdaq Basic feed if the account has a stocks standard or pro subscription.

  • Multi-day requests are limited to 1 month of data.
rust
pub fn stock_history_trade(&self, symbol: &str, date: &str) -> StockHistoryTradeBuilder<'_>

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

Example

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

Parameters

NameTypeRequiredDefaultDescription
symbolstringyesTicker symbol (e.g. AAPL)
datedateyesDate YYYYMMDD
start_timestringno09:30:00Start time filter
end_timestringno16:00:00End time filter
venuestringnonqbVenue/exchange filter. Accepted values: nqb, utp_cta.
start_datedatenoStart date YYYYMMDD
end_datedatenoEnd date YYYYMMDD
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.