stock_snapshot_quote
Latest NBBO (National Best Bid and Offer) quote snapshot for one or more stocks.
FreeValueStandardPro
Code Example
rust
let quotes: Vec<QuoteTick> = tdx.stock_snapshot_quote(&["AAPL", "MSFT", "GOOGL"]).await?;
for q in "es {
println!("bid={} ask={} spread={:.4}",
q.bid_price(), q.ask_price(),
q.ask_price() - q.bid_price());
}python
quotes = tdx.stock_snapshot_quote(["AAPL", "MSFT", "GOOGL"])
for q in quotes:
print(f"bid={q['bid']:.2f} ask={q['ask']:.2f}")go
quotes, err := client.StockSnapshotQuote([]string{"AAPL", "MSFT", "GOOGL"})
if err != nil {
log.Fatal(err)
}
for _, q := range quotes {
fmt.Printf("bid=%.2f ask=%.2f\n", q.Bid, q.Ask)
}cpp
auto quotes = client.stock_snapshot_quote({"AAPL", "MSFT", "GOOGL"});
for (auto& q : quotes) {
std::cout << "bid=" << q.bid << " ask=" << q.ask << std::endl;
}Parameters
symbolsstring[]requiredOne or more ticker symbols
venuestringoptionalData venue filter
min_timestringoptionalMinimum time of day as milliseconds from midnight ET
Response Fields (QuoteTick)
ms_of_dayi32Milliseconds since midnight ET
bid_size / ask_sizei32Quote sizes
bid_exchange / ask_exchangei32Exchange codes
bid / aski32Fixed-point prices. Use
bid_price(), ask_price(), midpoint_price() for decoded values.bid_condition / ask_conditioni32Condition codes
price_typei32Decimal type for price decoding
datei32Date as
YYYYMMDD integerHelper methods: bid_price(), ask_price(), midpoint_price(), midpoint_value()
Notes
- Accepts multiple symbols in a single call. Batch requests to reduce round-trips.
- The NBBO represents the best bid and ask across all exchanges.
- Use
midpoint_price()to get the midpoint between bid and ask.