stock_snapshot_trade
Latest trade snapshot for one or more stocks. Returns the most recent trade execution for each symbol.
FreeValueStandardPro
Code Example
rust
let data = tdx.stock_snapshot_trade(&["SPY"]).await?;
for t in &data {
println!("date={} ms_of_day={} price={:.2} size={} exchange={} condition={}",
t.date, t.ms_of_day, t.price, t.size, t.exchange, t.condition);
}python
data = tdx.stock_snapshot_trade(["SPY"])
for t in data:
print(f"date={t.date} ms_of_day={t.ms_of_day} price={t.price:.2f} "
f"size={t.size} exchange={t.exchange} condition={t.condition}")typescript
const data = tdx.stockSnapshotTrade(['SPY']);
for (const t of data) {
console.log(`date=${t.date} ms_of_day=${t.ms_of_day} price=${t.price} size=${t.size} exchange=${t.exchange} condition=${t.condition}`);
}cpp
auto data = client.stock_snapshot_trade({"SPY"});
for (const auto& t : data) {
printf("date=%d ms_of_day=%d price=%.2f size=%d exchange=%d condition=%d\n",
t.date, t.ms_of_day, t.price, t.size, t.exchange, t.condition);
}Parameters
symbolsstring[]requiredOne or more ticker symbols
venuestringoptionalData venue filter
min_timestringoptionalMinimum time of day as milliseconds from midnight ET
Response Fields (TradeTick)
ms_of_dayi32Milliseconds since midnight ET
sequencei32Sequence number
ext_condition1 through ext_condition4i32Extended trade condition codes
conditioni32Trade condition code
sizei32Trade size in shares
exchangei32Exchange code
pricef64Trade price (decoded at parse time).
condition_flagsi32Condition flags bitmap
price_flagsi32Price flags bitmap
volume_typei320 = incremental volume, 1 = cumulative volumerecords_backi32Records back count
datei32Date as
YYYYMMDD integerHelper methods: is_cancelled(), regular_trading_hours(), is_seller(), is_incremental_volume()
Sample Response
json
[
{"date": 20260402, "ms_of_day": 71983113, "price": 255.35, "size": 50, "exchange": 0, "condition": 1},
{"date": 20260402, "ms_of_day": 71998357, "price": 655.94, "size": 50, "exchange": 0, "condition": 1}
]Notes
- Accepts multiple symbols in a single call.
- All price fields are
f64-- decoded during parsing.