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 trades: Vec<TradeTick> = tdx.stock_snapshot_trade(&["AAPL"]).await?;
for t in &trades {
println!("price={} size={}", t.get_price(), t.size);
}python
trades = tdx.stock_snapshot_trade(["AAPL"])
for t in trades:
print(f"price={t['price']:.2f} size={t['size']}")go
trades, err := client.StockSnapshotTrade([]string{"AAPL"})
if err != nil {
log.Fatal(err)
}
for _, t := range trades {
fmt.Printf("price=%.2f size=%d\n", t.Price, t.Size)
}cpp
auto trades = client.stock_snapshot_trade({"AAPL"});
for (auto& t : trades) {
std::cout << "price=" << t.price
<< " size=" << t.size << std::endl;
}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
pricei32Fixed-point price. Use
get_price() for decoded f64.condition_flagsi32Condition flags bitmap
price_flagsi32Price flags bitmap
volume_typei320 = incremental volume, 1 = cumulative volumerecords_backi32Records back count
price_typei32Decimal type for price decoding
datei32Date as
YYYYMMDD integerHelper methods: get_price(), is_cancelled(), regular_trading_hours(), is_seller(), is_incremental_volume()
Notes
- Accepts multiple symbols in a single call.
- Prices are stored as fixed-point integers. Use the
get_price()helper to get the decoded float value.