stock_history_quote
NBBO quotes for a stock on a given date, sampled at a configurable interval. Use "0" as the interval to get every quote change.
FreeValueStandardPro
Code Example
rust
// 1-minute sampled quotes
let quotes: Vec<QuoteTick> = tdx.stock_history_quote("AAPL", "20240315", "60000").await?;
// Every quote change (stream variant for large responses)
tdx.stock_history_quote_stream("AAPL", "20240315", "0", |chunk| {
println!("Got {} quotes in this chunk", chunk.len());
Ok(())
}).await?;python
# 1-minute sampled quotes
quotes = tdx.stock_history_quote("AAPL", "20240315", "60000")
# Every quote change as DataFrame
df = tdx.stock_history_quote_df("AAPL", "20240315", "0")
print(f"{len(df)} quote changes")go
// 1-minute sampled quotes
quotes, err := client.StockHistoryQuote("AAPL", "20240315", "60000")
if err != nil {
log.Fatal(err)
}
fmt.Printf("%d quotes\n", len(quotes))cpp
// 1-minute sampled quotes
auto quotes = client.stock_history_quote("AAPL", "20240315", "60000");
std::cout << quotes.size() << " quotes" << std::endl;Parameters
symbolstringrequiredTicker symbol
datestringrequiredDate in
YYYYMMDD formatintervalstringrequiredSampling interval in milliseconds. Use
"0" to get every quote change.start_timestringoptionalStart time as milliseconds from midnight ET
end_timestringoptionalEnd time as milliseconds from midnight ET
venuestringoptionalData venue filter
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
- Setting
intervalto"0"returns every NBBO change, which can produce hundreds of thousands of rows for active symbols. Use the Rust_streamvariant for large responses. - Python users can use the
_dfvariant for direct DataFrame output:tdx.stock_history_quote_df(...). - Common intervals:
"60000"(1 min),"300000"(5 min),"3600000"(1 hour).