Skip to content

stock_list_dates

List available dates for a stock filtered by request type. Use this to discover what date range is available before requesting historical data.

FreeValueStandardPro

Code Example

rust
let data = tdx.stock_list_dates("TRADE", "SPY").await?;
for item in &data {
    println!("{}", item);
}
python
data = tdx.stock_list_dates("TRADE", "SPY")
for item in data:
    print(item)
typescript
const data = tdx.stockListDates('TRADE', 'SPY');
console.log(data);
cpp
auto data = client.stock_list_dates("TRADE", "SPY");
for (const auto& item : data) {
    printf("%s\n", item.c_str());
}

Parameters

request_typestringrequired
Data type: "TRADE", "QUOTE", or "OHLC"
symbolstringrequired
Ticker symbol (e.g. "AAPL")

Response

List of date strings in YYYYMMDD format, sorted chronologically.

Sample Response

json
["20040101", "20040102", "20040105", "...", "20260401", "20260402"]

Returns all available dates sorted chronologically. Shown cropped.

Notes

  • The available date range varies by request type.
  • Use this endpoint to validate date ranges before making history requests.

Released under the Apache-2.0 License.