Get Trading Calendar
The market data request is not supported via Webull OpenAPI at the moment. Please keep tuned.Interface Description
Function description:
Get the trading calendar for the specified market.
Trading days are obtained by excluding weekends and public holidays, the dates of temporary market closures are not excluded.
The query start and end dates cannot be greater than 30 days.
Request URL: /trade/calendar
Request method: GET
Frequency limit: The calling frequency of each App ID is limited to 30 times in 30 seconds.
Request Parameters
Parameter | Type | Required fields | Description |
---|---|---|---|
market | String | Yes | Markets, enumeration, reference: Markets |
start | String | Yes | Start date, eg: "2023-01-01" |
end | String | Yes | End date, eg: "2023-01-01" |
Response Parameter
Field | Type | Description |
---|---|---|
trade_day | String | Trading day, eg: "2023-01-01" |
trade_date_type | String | Types of trading date, enumeration, reference: TradingDateType |
Request Example
- Python
- Java
from webullsdktrade.api import API
from webullsdkcore.client import ApiClient
from webullsdkcore.common.region import Region
from webullsdktrade.common.markets import Markets
api_client = ApiClient(your_app_key, your_app_secret, Region.HK.value)
api = API(api_client)
response = api.trade_calendar.get_trade_calendar(Markets.HK.name, start, end)
if response.status_code == 200:
calendar = response.json()
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey(Env.APP_KEY)
.appSecret(Env.APP_SECRET)
.regionId(Region.us.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
List<TradeCalendar> tradeCalendars = apiService.getTradeCalendar(Markets.US.name(), "2023-01-01", "2023-01-10");
Response Example
[
{
"tradeDay": "2023-01-02",
"tradeDateType": "FULL_DAY"
},
{
"tradeDay": "2023-01-03",
"tradeDateType": "FULL_DAY"
},
{
"tradeDay": "2023-01-04",
"tradeDateType": "FULL_DAY"
},
{
"tradeDay": "2023-01-05",
"tradeDateType": "FULL_DAY"
},
{
"tradeDay": "2023-01-06",
"tradeDateType": "FULL_DAY"
},
{
"tradeDay": "2023-01-09",
"tradeDateType": "FULL_DAY"
},
{
"tradeDay": "2023-01-10",
"tradeDateType": "FULL_DAY"
}
]