Skip to content

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 &quotes {
    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[]required
One or more ticker symbols
venuestringoptional
Data venue filter
min_timestringoptional
Minimum time of day as milliseconds from midnight ET

Response Fields (QuoteTick)

ms_of_dayi32
Milliseconds since midnight ET
bid_size / ask_sizei32
Quote sizes
bid_exchange / ask_exchangei32
Exchange codes
bid / aski32
Fixed-point prices. Use bid_price(), ask_price(), midpoint_price() for decoded values.
bid_condition / ask_conditioni32
Condition codes
price_typei32
Decimal type for price decoding
datei32
Date as YYYYMMDD integer

Helper 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.

Released under the GPL-3.0-or-later License.