Skip to content

Calendar & Rates

Interest Rate Endpoints (1)

rust
let rates: Vec<InterestRateTick> = tdx.interest_rate_history_eod(
    "SOFR", "20240101", "20240301"
).await?;
python
result = tdx.interest_rate_history_eod("SOFR", "20240101", "20240301")
go
result, _ := client.InterestRateHistoryEOD("SOFR", "20240101", "20240301")
cpp
auto result = client.interest_rate_history_eod("SOFR", "20240101", "20240301");

Available Rate Symbols

SymbolDescription
SOFRSecured Overnight Financing Rate
TREASURY_M11-month Treasury
TREASURY_M33-month Treasury
TREASURY_M66-month Treasury
TREASURY_Y11-year Treasury
TREASURY_Y22-year Treasury
TREASURY_Y33-year Treasury
TREASURY_Y55-year Treasury
TREASURY_Y77-year Treasury
TREASURY_Y1010-year Treasury
TREASURY_Y2020-year Treasury
TREASURY_Y3030-year Treasury

TIP

Use interest rate data to set the risk-free rate parameter when computing option Greeks locally.

Calendar Endpoints (3)

rust
let days: Vec<CalendarDay> = tdx.calendar_open_today().await?;
let days: Vec<CalendarDay> = tdx.calendar_on_date("20240315").await?;
let days: Vec<CalendarDay> = tdx.calendar_year("2024").await?;
python
result = tdx.calendar_open_today()
result = tdx.calendar_on_date("20240315")
result = tdx.calendar_year("2024")
go
result, _ := client.CalendarOpenToday()
result, _ = client.CalendarOnDate("20240315")
result, _ = client.CalendarYear("2024")
cpp
auto today = client.calendar_open_today();
auto date_info = client.calendar_on_date("20240315");
auto year_info = client.calendar_year("2024");

Calendar Methods

MethodDescription
calendar_open_todayCheck if the market is open today and get the trading schedule
calendar_on_dateGet the trading schedule for a specific date (regular, early close, or holiday)
calendar_yearGet the full trading calendar for a year, including all holidays and early closes

WARNING

Calendar data reflects NYSE trading hours. Other exchanges may have different schedules.

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