> 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

The **Market Trading Days API** provides the trading day information for different markets. It includes both full trading days and half-day trading sessions. This API allows users to query market-specific trading days within a specified date range.

### Endpoint

* Base Path: `/common/basic/markets/trading_days`
* Full Path: `https://data.infoway.io  /common/basic/markets/trading_days`

### Request Frequency

This API shares the same rate limits as other endpoints. The number of allowed requests per second depends on your subscription plan. Please refer to the [**Rate Limit**](/en-docs/getting-started/api-limitation/rest-api-limitation.md) for details.

### Error Codes

See the [HTTP Error Codes](/en-docs/getting-started/error-codes/rest-api-error-codes.md) section for reference.

### Authentication

Each request must include your **API Key** in the header.

| **Header** | **Type** | **Required** | **Description**                                 |
| ---------- | -------- | ------------ | ----------------------------------------------- |
| `apiKey`   | String   | Yes          | Your API Key associated with your current plan. |

### Request Parameters

| **Parameter** | **Type** | **Required** | **Description**                                                  | **Example** |
| ------------- | -------- | ------------ | ---------------------------------------------------------------- | ----------- |
| `market`      | String   | Yes          | Market code. Options include `US`, `HK`, `CN`, `IN`, `JP`, `KS`. | `US`        |
| `beginDay`    | String   | Yes          | Start date for the query, in `YYYYMMDD` format.                  | `20230101`  |
| `endDay`      | String   | Yes          | End date for the query, in `YYYYMMDD` format.                    | `20230301`  |

### Example Request

```
GET https://data.infoway.io/common/basic/markets/trading_days?market=US&beginDay=20230101&endDay=20230301

```

### Example Response

```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

| **Field**         | **Type** | **Required** | **Description**                                         | **Example / Values**   |
| ----------------- | -------- | ------------ | ------------------------------------------------------- | ---------------------- |
| `trade_days`      | List     | No           | List of full trading days in `YYYYMMDD` format.         | `20230221`, `20230222` |
| `half_trade_days` | List     | No           | List of half-day trading sessions in `YYYYMMDD` format. | `20230201`             |

### Notes

* The `trade_days` field contains the full trading days within the specified date range.
* The `half_trade_days` field lists any half-day trading sessions, if applicable.
* It is important to ensure that the requested date range is correct, as the API will only return trading days within the given timeframe.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.infoway.io/en-docs/rest-api/get-basic-info/get-market-trading-days.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
