index_list_dates
FreeValueStandardPro
List all dates for which data is available for a given index symbol.
Code Example
rust
let data = tdx.index_list_dates("SPX").await?;
for item in &data {
println!("{}", item);
}python
data = tdx.index_list_dates("SPX")
for item in data:
print(item)typescript
const data = tdx.indexListDates('SPX');
console.log(data);cpp
auto data = client.index_list_dates("SPX");
for (const auto& item : data) {
printf("%s\n", item.c_str());
}Parameters
symbolstringrequiredIndex symbol (e.g.
"SPX")Response
datesstring[]List of date strings in
YYYYMMDD formatSample Response
json
["20160801", "20160802", "...", "20260401", "20260402"]Returns all dates with data for the specified index. SPX has 2,325 dates available.
Notes
- Use this to determine the date range for which index data is available before making history or EOD calls.
- Dates are returned in ascending order.