Get market trading hours
tossinvest_get_market_calendarCheck Korean or US market trading hours for the previous, current, and next business days. Use it to see if the market is open, when it opens, or why an order was rejected outside trading hours.
Instructions
Get trading-session hours for the Korean or US market across three business days: previous, current and next.
Use this to answer "is the market open?", "when does it open?", or to explain an order-hours-closed rejection. All times are ISO 8601 in KST (+09:00) for BOTH markets — US session times are already converted to Korean time.
Args:
country ('KR' | 'US'): which market.
date (string, optional): YYYY-MM-DD reference date. Omit for today. For US, this is the US local date.
response_format ('markdown' | 'json'): default 'markdown'.
Returns { country, previousBusinessDay, today, nextBusinessDay }, each { date, ...sessions }.
KR: an 'integrated' object (KRX + NXT combined) holding preMarket / regularMarket / afterMarket, each { startTime, endTime }. After-hours single-price and closing-price sessions are excluded.
US: dayMarket, preMarket, regularMarket, afterMarket, each { startTime, endTime } or null. On a holiday all four are null.
Errors: none specific; an invalid date format returns 400 invalid-request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Reference date (YYYY-MM-DD). Omit for today. | |
| country | Yes | 'KR' for the Korean market (KRX/NXT), 'US' for the US market. | |
| response_format | No | Output format: 'markdown' for a compact human-readable summary, 'json' for the complete raw payload. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| today | No | ||
| country | Yes | KR or US | |
| nextBusinessDay | No | ||
| previousBusinessDay | No |