stock_history_trade_quote
Combined trade + quote ticks for a stock on a given date. Each row contains the full trade data plus the prevailing NBBO quote at the time of the trade.
FreeValueStandardPro
Code Example
rust
let data = tdx.stock_history_trade_quote("SPY", "20260315").await?;
for t in &data {
println!("date={} ms_of_day={} trade_price={:.2} size={} bid={:.2} ask={:.2} exchange={}",
t.date, t.ms_of_day, t.trade_price, t.size, t.bid, t.ask, t.exchange);
}python
data = tdx.stock_history_trade_quote("SPY", "20260315")
for t in data:
print(f"date={t.date} ms_of_day={t.ms_of_day} trade_price={t.trade_price:.2f} "
f"size={t.size} bid={t.bid:.2f} ask={t.ask:.2f} exchange={t.exchange}")typescript
const data = tdx.stockHistoryTradeQuote('SPY', '20260315');
for (const t of data) {
console.log(`date=${t.date} ms_of_day=${t.ms_of_day} trade_price=${t.trade_price} size=${t.size} bid=${t.bid} ask=${t.ask}`);
}cpp
auto data = client.stock_history_trade_quote("SPY", "20260315");
for (const auto& t : data) {
printf("date=%d ms_of_day=%d trade_price=%.2f size=%d bid=%.2f ask=%.2f exchange=%d\n",
t.date, t.ms_of_day, t.trade_price, t.size, t.bid, t.ask, t.exchange);
}Parameters
symbolstringrequiredTicker symbol
datestringrequiredDate in
YYYYMMDD formatstart_timestringoptionalStart time as milliseconds from midnight ET
end_timestringoptionalEnd time as milliseconds from midnight ET
exclusivebooloptionalUse exclusive time bounds
venuestringoptionalData venue filter
Response Fields (TradeQuoteTick)
Combined trade + quote tick (25 fields). Contains the full trade data plus the prevailing NBBO quote at the time of the trade.
Sample Response
json
[
{"date": 20260402, "ms_of_day": 34200015, "trade_price": 646.42, "size": 100, "bid": 646.40, "ask": 646.42, "exchange": 4},
{"date": 20260402, "ms_of_day": 34200023, "trade_price": 646.43, "size": 200, "bid": 646.41, "ask": 646.43, "exchange": 73},
{"date": 20260402, "ms_of_day": 34200031, "trade_price": 646.41, "size": 50, "bid": 646.40, "ask": 646.42, "exchange": 12}
]Each row pairs the trade with the prevailing NBBO quote at execution time.
Notes
- This endpoint merges trade and quote streams so each trade row includes the best bid/ask at the time of execution. Useful for computing effective spread, price improvement, and trade classification.
- Returns an array of TradeQuoteTick records (typed per SDK).
- This is a Pro-tier endpoint. Value and Standard subscriptions do not have access.
- The response can be very large for active symbols. Consider filtering with
start_time/end_timeor using date ranges that cover only the session you need.