> For the complete documentation index, see [llms.txt](https://docs.infoway.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infoway.io/en-docs/rest-api/get-basic-info/get-market-trading-days.md).

# GET Market Trading Days

## Overview

This API retrieves trading day information for different markets, including **full trading days** and **half trading days**.

It is split into two endpoints depending on the market type:

| Market Type                              | Endpoint                                 |
| ---------------------------------------- | ---------------------------------------- |
| Stock Market                             | `/common/basic/markets/trading_days`     |
| Other Markets (FX, Metals, Crypto, etc.) | `/common/basic/markets/trading_schedule` |

### Request Frequency

Shares the **same rate limit** as all other APIs. The exact requests-per-second depends on your subscription plan. See the *Rate Limit* documentation for details.

### Error Codes

See the *HTTP Error Codes* documentation.

### Base URL

```
https://data.infoway.io
```

***

## Stock Market — Trading Days

Returns the list of trading days for a stock market.

| Item      | Value                                                       |
| --------- | ----------------------------------------------------------- |
| Base Path | `/common/basic/markets/trading_days`                        |
| Full URL  | `https://data.infoway.io/common/basic/markets/trading_days` |
| Method    | GET                                                         |
| Headers   | *See Headers section of the official documentation*         |

### Request Parameters

> The source documentation does not enumerate the request parameters. Common parameters typically include a market/region identifier and a date range. Refer to the official API docs for the authoritative list.

### Response Example

```json
{
  "ret": 200,
  "msg": "success",
  "traceId": "46fbf427-a30e-48ff-8760-9fb20025c667",
  "data": {
    "trade_days": [
      "20230221",
      "20230222",
      "20230223",
      "20230224",
      "20230227",
      "20230228",
      "20230301"
    ],
    "half_trade_days": []
  }
}
```

### Response Fields — `data`

| Field             | Type           | Required | Description                                                                                | Example                         |
| ----------------- | -------------- | -------- | ------------------------------------------------------------------------------------------ | ------------------------------- |
| `trade_days`      | array\<string> | Yes      | List of **full** trading days, formatted as `YYYYMMDD`.                                    | `["20230221", "20230222", ...]` |
| `half_trade_days` | array\<string> | Yes      | List of **half-day** trading days (early close), formatted as `YYYYMMDD`. Empty when none. | `[]`                            |

***

## Other Markets — Trading Schedule

Returns the trading schedule (session hours, holidays, breaks) for non-stock markets such as FX, Metals, Crypto, etc.

| Item      | Value                                                           |
| --------- | --------------------------------------------------------------- |
| Base Path | `/common/basic/markets/trading_schedule`                        |
| Full URL  | `https://data.infoway.io/common/basic/markets/trading_schedule` |
| Method    | GET                                                             |
| Headers   | *See Headers section of the official documentation*             |

### Request Parameters

| param name | type   | required | description | example                                         |
| ---------- | ------ | -------- | ----------- | ----------------------------------------------- |
| `type`     | String | false    | type        | `ENERGY`, `FOREX`, `FUTURES`, `METAL`，`INDICES` |

### Response Example

```json
{
    "ret": 200,
    "msg": "success",
    "traceId": "9ae7a566-0a08-4ecb-b0ed-da0d90c1e88c",
    "data": [
        {
            "symbol": "XAGEUR",
            "type": "METAL",
            "name": "白银/欧元",
            "timezone": "America/New_York",
            "session": "1700-1700",
            "holidays": {
                "summary": "",
                "dates": []
            },
            "symbol_code": "OANDA:XAGEUR",
            "is_24_7": false,
            "trading_hours": {
                "summary": "(GMT 0)\nSummer Time (from the 2nd Sunday of March) Sunday-Friday (24h continuous)\nWinter Time (from the 1st Sunday of November) Sunday-Friday (24h continuous)",
                "segments": [
                    {
                        "days": "周日至周五",
                        "overnight": true,
                        "gmt0": {
                            "summer": { "start": "21:00", "end": "21:00" },
                            "winter": { "start": "22:00", "end": "22:00" }
                        },
                        "days_en": "Sunday-Friday",
                        "continuous_24h": true,
                        "native": { "start": "17:00", "end": "17:00" }
                    }
                ],
                "is_dst": true
            },
            "break_time": {
                "summary": "",
                "windows": []
            }
        }
    ]
}
```

### Top-level Response Fields

| Field     | Type           | Required | Description                                       |
| --------- | -------------- | -------- | ------------------------------------------------- |
| `ret`     | integer        | Yes      | Return code. `200` indicates success.             |
| `msg`     | string         | Yes      | Status message, e.g. `"success"`.                 |
| `traceId` | string         | Yes      | Unique request trace ID for troubleshooting.      |
| `data`    | array\<object> | Yes      | List of market schedule objects (one per symbol). |

### `data[]` Item Fields

| Field           | Type    | Required | Description                                                          | Example              |
| --------------- | ------- | -------- | -------------------------------------------------------------------- | -------------------- |
| `symbol`        | string  | Yes      | Trading symbol code (without the data-source prefix).                | `"XAGEUR"`           |
| `type`          | string  | Yes      | Instrument category (METAL / FX / STOCK, etc.).                      | `"METAL"`            |
| `name`          | string  | Yes      | Display name of the instrument.                                      | `"白银/欧元"`            |
| `timezone`      | string  | Yes      | Native quote timezone (IANA timezone name).                          | `"America/New_York"` |
| `session`       | string  | Yes      | Native trading session window, format `HHMM-HHMM`.                   | `"1700-1700"`        |
| `holidays`      | object  | Yes      | Holiday / market-closed information container. See holidays.         |                      |
| `symbol_code`   | string  | Yes      | Full symbol identifier with data-source prefix (TradingView format). | `"OANDA:XAGEUR"`     |
| `is_24_7`       | boolean | Yes      | Whether the instrument trades 24/7 without interruption.             | `false`              |
| `trading_hours` | object  | Yes      | Trading session information container. See trading\_hours.           |                      |
| `break_time`    | object  | No       | Intraday break windows (e.g. midday halt). See break\_time.          |                      |

***

## Field Reference

### holidays

Market holiday (closed-day) information.

| Field              | Type           | Required | Description                                                 | Example |
| ------------------ | -------------- | -------- | ----------------------------------------------------------- | ------- |
| `holidays.summary` | string         | No       | Short description of the holidays (empty string when none). | `""`    |
| `holidays.dates`   | array\<string> | No       | List of holiday dates (typically `YYYY-MM-DD` or `MM/DD`).  | `[]`    |

### trading\_hours

Trading session definition, broken into segments with DST-aware times.

| Field                    | Type           | Required | Description                                                                                      | Example                      |
| ------------------------ | -------------- | -------- | ------------------------------------------------------------------------------------------------ | ---------------------------- |
| `trading_hours.summary`  | string         | No       | Human-readable summary of the session (may be multi-line).                                       | `"(GMT 0)\nSummer Time ..."` |
| `trading_hours.segments` | array\<object> | Yes      | List of trading-session segments. Each segment describes one day-group's rules. See segments\[]. |                              |
| `trading_hours.is_dst`   | boolean        | Yes      | Whether Daylight Saving Time is currently in effect (affects which session times apply).         | `true`                       |

### break\_time

Intraday break (e.g. midday halt / auction) windows.

| Field                | Type           | Required | Description                                              | Example |
| -------------------- | -------------- | -------- | -------------------------------------------------------- | ------- |
| `break_time.summary` | string         | No       | Description of the break (empty string when none).       | `""`    |
| `break_time.windows` | array\<object> | No       | List of break windows (structure similar to `segments`). | `[]`    |

### trading\_hours.segments\[]

Each array element describes one trading-day group's session rules:

| Field                          | Type    | Required | Description                                                            | Example                                |
| ------------------------------ | ------- | -------- | ---------------------------------------------------------------------- | -------------------------------------- |
| `segments[].days`              | string  | Yes      | Applicable days of the week (localized, e.g. Chinese).                 | `"周日至周五"`                              |
| `segments[].days_en`           | string  | No       | Applicable days of the week (English).                                 | `"Sunday-Friday"`                      |
| `segments[].overnight`         | boolean | Yes      | Whether the session crosses midnight (end time falls on the next day). | `true`                                 |
| `segments[].continuous_24h`    | boolean | No       | Whether the session runs continuously for 24 hours.                    | `true`                                 |
| `segments[].native`            | object  | No       | Start/end times in the instrument's native timezone.                   | `{ "start": "17:00", "end": "17:00" }` |
| `segments[].native.start`      | string  | No       | Native-timezone session start, `HH:MM`.                                | `"17:00"`                              |
| `segments[].native.end`        | string  | No       | Native-timezone session end, `HH:MM`.                                  | `"17:00"`                              |
| `segments[].gmt0`              | object  | Yes      | Start/end times in the GMT 0 base timezone, split by DST.              | `{ "summer": {...}, "winter": {...} }` |
| `segments[].gmt0.summer`       | object  | No       | GMT 0 start/end under Summer Time.                                     | `{ "start": "21:00", "end": "21:00" }` |
| `segments[].gmt0.summer.start` | string  | No       | Summer Time GMT 0 session start, `HH:MM`.                              | `"21:00"`                              |
| `segments[].gmt0.summer.end`   | string  | No       | Summer Time GMT 0 session end, `HH:MM`.                                | `"21:00"`                              |
| `segments[].gmt0.winter`       | object  | No       | GMT 0 start/end under Winter Time.                                     | `{ "start": "22:00", "end": "22:00" }` |
| `segments[].gmt0.winter.start` | string  | No       | Winter Time GMT 0 session start, `HH:MM`.                              | `"22:00"`                              |
| `segments[].gmt0.winter.end`   | string  | No       | Winter Time GMT 0 session end, `HH:MM`.                                | `"22:00"`                              |

***

## Notes

* **`Required` judgment**: Inferred from the data structure. Identifiers that directly locate the instrument, and core fields that define session semantics, are marked **Yes**. Descriptive fields that may be empty/default (e.g. `summary`, `days_en`, `holidays.dates`, `break_time.windows`) are marked **No**. If you have an explicit JSON Schema, follow its `required` declarations instead.
* **Time formats**: All `HH:MM` / `HHMM` values use the 24-hour clock. Note the two parallel representations — `native` (instrument's native timezone) vs. `gmt0` (unified base timezone).
* **DST switching**: `gmt0` provides both `summer` and `winter` time sets; `is_dst` indicates which one is currently in effect.
* **Date formats**: The `trading_days` endpoint uses `YYYYMMDD` (e.g. `20230221`); `holidays.dates` typically uses `YYYY-MM-DD`.
