Trading schedule
get_trading_scheduleGet an instrument's trading sessions for recent days: start, end, trading date, exchange timezone offset, with holidays, early closes, and overnight sessions visible.
Instructions
Return an instrument's trading sessions (start, end, trading date) for recent days.
Times are in the exchange's time zone with the offset included, so holidays, early
closes and overnight sessions show up as they really were. For the upcoming
sessions, get_contract_details also lists trading and liquid hours. Counts toward
IBKR's historical-data limits.
Errors: not_found (no such contract, or no sessions in the range).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Last day to cover, ISO 8601 (no offset means UTC). Omit for now. | |
| use_rth | No | True: regular trading hours only. False: include pre-market, after-hours and overnight data. | |
| contract | Yes | The instrument. A con_id alone is unambiguous; otherwise give symbol and sec_type, plus expiry, strike and right for options. | |
| num_days | No | How many days of sessions, ending at end (1-30). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End of the covered range. | |
| start | No | Start of the covered range. | |
| use_rth | Yes | True: regular hours only; false: including extended hours. | |
| contract | Yes | ||
| sessions | Yes | Oldest first. | |
| time_zone | Yes | The exchange's time zone, as IBKR names it. |