Get Trading Calendar
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.hk.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
List<TradeCalendar> tradeCalendars = apiService.getTradeCalendar(Markets.US.name(), "2023-01-01", "2023-01-10");