Class CalendarApi
java.lang.Object
markets.alpaca.client.openapi.trading.api.CalendarApi
Generated client for CalendarApi operations.
This class is generated from the configured OpenAPI spec. Operation method Javadocs include OAS summaries, descriptions, parameters, return types, response details, and external documentation links when present in the spec.
Operations
calendar: Get Market CalendarlegacyCalendar: Get US Market Calendar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet Market Calendar This endpoint returns the market calendar.okhttp3.CallcalendarAsync(Market market, LocalDate start, LocalDate end, String timezone, ApiCallback<PublicCalendarResp> _callback) Get Market Calendar (asynchronously) This endpoint returns the market calendar.okhttp3.CallcalendarCall(Market market, LocalDate start, LocalDate end, String timezone, ApiCallback _callback) Build call for calendarcalendarWithHttpInfo(Market market, LocalDate start, LocalDate end, String timezone) Get Market Calendar This endpoint returns the market calendar.intlegacyCalendar(OffsetDateTime start, OffsetDateTime end, String dateType) Get US Market Calendar The calendar API serves the full list of market days from 1970 to 2029.okhttp3.CalllegacyCalendarAsync(OffsetDateTime start, OffsetDateTime end, String dateType, ApiCallback<List<LegacyCalendarDay>> _callback) Get US Market Calendar (asynchronously) The calendar API serves the full list of market days from 1970 to 2029.okhttp3.CalllegacyCalendarCall(OffsetDateTime start, OffsetDateTime end, String dateType, ApiCallback _callback) Build call for legacyCalendarlegacyCalendarWithHttpInfo(OffsetDateTime start, OffsetDateTime end, String dateType) Get US Market Calendar The calendar API serves the full list of market days from 1970 to 2029.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
CalendarApi
public CalendarApi() -
CalendarApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
calendarCall
public okhttp3.Call calendarCall(@Nonnull Market market, @Nullable LocalDate start, @Nullable LocalDate end, @Nullable String timezone, ApiCallback _callback) throws ApiException Build call for calendar- Parameters:
market- The market identifier. MIC, BIC, or acronym. Available market codes by region: **United States** - `BMO`: Bank of Montreal. US banking calendar (US operations). - `BNYM`: The Bank of New York Mellon. US banking calendar. - `BOATS`: Blue Ocean Alternative Trading System. US overnight trading. - `IEX`: Investors Exchange. US equities. - `IEXG`: Investors Exchange. US equities. - `NASDAQ`: National Association of Securities Dealers Automated Quotations. US equities. - `NYSE`: New York Stock Exchange. US equities. - `OCEA`: BlueOcean ATS. US overnight trading. - `OPRA`: Options Price Reporting Authority. US options. - `OTC`: Over-The-Counter. US OTC equities. - `OTCM`: OTC Markets. US OTC equities. - `SIFMA`: Securities Industry and Financial Markets Association. US bonds. - `XNAS`: NASDAQ. US equities. - `XNYS`: New York Stock Exchange. US equities. **Europe** - `CEUX`: Cboe CEUX Europe. European equities (Cboe Netherlands). - `CHIX`: Cboe CHIX Europe. European equities (Cboe UK). - `ISE`: Euronext Dublin. Irish equities. - `LSE`: London Stock Exchange. UK equities. - `MTA`: Euronext Milan. Italian equities. - `MTAA`: Euronext Milan. Italian equities. - `XAMS`: Euronext Amsterdam. Dutch equities. - `XBRU`: Euronext Brussels. Belgian equities. - `XDUB`: Euronext Dublin. Irish equities. - `XETR`: Frankfurt Stock Exchange. German equities. - `XETRA`: Frankfurt Stock Exchange. German equities. - `XLIS`: Euronext Lisbon. Portuguese equities. - `XLON`: London Stock Exchange. UK equities. - `XPAR`: Euronext Paris. French equities. **Asia & Middle East** - `HKEX`: Hong Kong Stock Exchange. Hong Kong equities. - `JPX`: Japan Exchange Group. Japanese equities. - `TADAWUL`: Saudi Stock Exchange. Saudi equities. - `XHKG`: Hong Kong Stock Exchange. Hong Kong equities. - `XSAU`: Saudi Stock Exchange. Saudi equities. - `XTKS`: Japan Exchange Group. Japanese equities. (required)start- The first date to retrieve data for (inclusive). Default: today. (optional)end- The last date to retrieve data for (inclusive). Default: one week from the start date. (optional)timezone- Timezone of the times. Default: the timezone of the market. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
calendar
public PublicCalendarResp calendar(@Nonnull Market market, @Nullable LocalDate start, @Nullable LocalDate end, @Nullable String timezone) throws ApiException Get Market Calendar This endpoint returns the market calendar.- Parameters:
market- The market identifier. MIC, BIC, or acronym. Available market codes by region: **United States** - `BMO`: Bank of Montreal. US banking calendar (US operations). - `BNYM`: The Bank of New York Mellon. US banking calendar. - `BOATS`: Blue Ocean Alternative Trading System. US overnight trading. - `IEX`: Investors Exchange. US equities. - `IEXG`: Investors Exchange. US equities. - `NASDAQ`: National Association of Securities Dealers Automated Quotations. US equities. - `NYSE`: New York Stock Exchange. US equities. - `OCEA`: BlueOcean ATS. US overnight trading. - `OPRA`: Options Price Reporting Authority. US options. - `OTC`: Over-The-Counter. US OTC equities. - `OTCM`: OTC Markets. US OTC equities. - `SIFMA`: Securities Industry and Financial Markets Association. US bonds. - `XNAS`: NASDAQ. US equities. - `XNYS`: New York Stock Exchange. US equities. **Europe** - `CEUX`: Cboe CEUX Europe. European equities (Cboe Netherlands). - `CHIX`: Cboe CHIX Europe. European equities (Cboe UK). - `ISE`: Euronext Dublin. Irish equities. - `LSE`: London Stock Exchange. UK equities. - `MTA`: Euronext Milan. Italian equities. - `MTAA`: Euronext Milan. Italian equities. - `XAMS`: Euronext Amsterdam. Dutch equities. - `XBRU`: Euronext Brussels. Belgian equities. - `XDUB`: Euronext Dublin. Irish equities. - `XETR`: Frankfurt Stock Exchange. German equities. - `XETRA`: Frankfurt Stock Exchange. German equities. - `XLIS`: Euronext Lisbon. Portuguese equities. - `XLON`: London Stock Exchange. UK equities. - `XPAR`: Euronext Paris. French equities. **Asia & Middle East** - `HKEX`: Hong Kong Stock Exchange. Hong Kong equities. - `JPX`: Japan Exchange Group. Japanese equities. - `TADAWUL`: Saudi Stock Exchange. Saudi equities. - `XHKG`: Hong Kong Stock Exchange. Hong Kong equities. - `XSAU`: Saudi Stock Exchange. Saudi equities. - `XTKS`: Japan Exchange Group. Japanese equities. (required)start- The first date to retrieve data for (inclusive). Default: today. (optional)end- The last date to retrieve data for (inclusive). Default: one week from the start date. (optional)timezone- Timezone of the times. Default: the timezone of the market. (optional)- Returns:
- PublicCalendarResp
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
calendarWithHttpInfo
public ApiResponse<PublicCalendarResp> calendarWithHttpInfo(@Nonnull Market market, @Nullable LocalDate start, @Nullable LocalDate end, @Nullable String timezone) throws ApiException Get Market Calendar This endpoint returns the market calendar.- Parameters:
market- The market identifier. MIC, BIC, or acronym. Available market codes by region: **United States** - `BMO`: Bank of Montreal. US banking calendar (US operations). - `BNYM`: The Bank of New York Mellon. US banking calendar. - `BOATS`: Blue Ocean Alternative Trading System. US overnight trading. - `IEX`: Investors Exchange. US equities. - `IEXG`: Investors Exchange. US equities. - `NASDAQ`: National Association of Securities Dealers Automated Quotations. US equities. - `NYSE`: New York Stock Exchange. US equities. - `OCEA`: BlueOcean ATS. US overnight trading. - `OPRA`: Options Price Reporting Authority. US options. - `OTC`: Over-The-Counter. US OTC equities. - `OTCM`: OTC Markets. US OTC equities. - `SIFMA`: Securities Industry and Financial Markets Association. US bonds. - `XNAS`: NASDAQ. US equities. - `XNYS`: New York Stock Exchange. US equities. **Europe** - `CEUX`: Cboe CEUX Europe. European equities (Cboe Netherlands). - `CHIX`: Cboe CHIX Europe. European equities (Cboe UK). - `ISE`: Euronext Dublin. Irish equities. - `LSE`: London Stock Exchange. UK equities. - `MTA`: Euronext Milan. Italian equities. - `MTAA`: Euronext Milan. Italian equities. - `XAMS`: Euronext Amsterdam. Dutch equities. - `XBRU`: Euronext Brussels. Belgian equities. - `XDUB`: Euronext Dublin. Irish equities. - `XETR`: Frankfurt Stock Exchange. German equities. - `XETRA`: Frankfurt Stock Exchange. German equities. - `XLIS`: Euronext Lisbon. Portuguese equities. - `XLON`: London Stock Exchange. UK equities. - `XPAR`: Euronext Paris. French equities. **Asia & Middle East** - `HKEX`: Hong Kong Stock Exchange. Hong Kong equities. - `JPX`: Japan Exchange Group. Japanese equities. - `TADAWUL`: Saudi Stock Exchange. Saudi equities. - `XHKG`: Hong Kong Stock Exchange. Hong Kong equities. - `XSAU`: Saudi Stock Exchange. Saudi equities. - `XTKS`: Japan Exchange Group. Japanese equities. (required)start- The first date to retrieve data for (inclusive). Default: today. (optional)end- The last date to retrieve data for (inclusive). Default: one week from the start date. (optional)timezone- Timezone of the times. Default: the timezone of the market. (optional)- Returns:
- ApiResponse<PublicCalendarResp>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
calendarAsync
public okhttp3.Call calendarAsync(@Nonnull Market market, @Nullable LocalDate start, @Nullable LocalDate end, @Nullable String timezone, ApiCallback<PublicCalendarResp> _callback) throws ApiException Get Market Calendar (asynchronously) This endpoint returns the market calendar.- Parameters:
market- The market identifier. MIC, BIC, or acronym. Available market codes by region: **United States** - `BMO`: Bank of Montreal. US banking calendar (US operations). - `BNYM`: The Bank of New York Mellon. US banking calendar. - `BOATS`: Blue Ocean Alternative Trading System. US overnight trading. - `IEX`: Investors Exchange. US equities. - `IEXG`: Investors Exchange. US equities. - `NASDAQ`: National Association of Securities Dealers Automated Quotations. US equities. - `NYSE`: New York Stock Exchange. US equities. - `OCEA`: BlueOcean ATS. US overnight trading. - `OPRA`: Options Price Reporting Authority. US options. - `OTC`: Over-The-Counter. US OTC equities. - `OTCM`: OTC Markets. US OTC equities. - `SIFMA`: Securities Industry and Financial Markets Association. US bonds. - `XNAS`: NASDAQ. US equities. - `XNYS`: New York Stock Exchange. US equities. **Europe** - `CEUX`: Cboe CEUX Europe. European equities (Cboe Netherlands). - `CHIX`: Cboe CHIX Europe. European equities (Cboe UK). - `ISE`: Euronext Dublin. Irish equities. - `LSE`: London Stock Exchange. UK equities. - `MTA`: Euronext Milan. Italian equities. - `MTAA`: Euronext Milan. Italian equities. - `XAMS`: Euronext Amsterdam. Dutch equities. - `XBRU`: Euronext Brussels. Belgian equities. - `XDUB`: Euronext Dublin. Irish equities. - `XETR`: Frankfurt Stock Exchange. German equities. - `XETRA`: Frankfurt Stock Exchange. German equities. - `XLIS`: Euronext Lisbon. Portuguese equities. - `XLON`: London Stock Exchange. UK equities. - `XPAR`: Euronext Paris. French equities. **Asia & Middle East** - `HKEX`: Hong Kong Stock Exchange. Hong Kong equities. - `JPX`: Japan Exchange Group. Japanese equities. - `TADAWUL`: Saudi Stock Exchange. Saudi equities. - `XHKG`: Hong Kong Stock Exchange. Hong Kong equities. - `XSAU`: Saudi Stock Exchange. Saudi equities. - `XTKS`: Japan Exchange Group. Japanese equities. (required)start- The first date to retrieve data for (inclusive). Default: today. (optional)end- The last date to retrieve data for (inclusive). Default: one week from the start date. (optional)timezone- Timezone of the times. Default: the timezone of the market. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
legacyCalendarCall
public okhttp3.Call legacyCalendarCall(@Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable String dateType, ApiCallback _callback) throws ApiException Build call for legacyCalendar- Parameters:
start- The first date to retrieve data for (inclusive). (optional)end- The last date to retrieve data for (inclusive). (optional)dateType- Indicates what start and end mean. Default: TRADING. If TRADING is specified, returns a calendar whose trading date matches start, end. If SETTLEMENT is specified, returns the calendar whose settlement date matches start and end. (optional)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
legacyCalendar
public List<LegacyCalendarDay> legacyCalendar(@Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable String dateType) throws ApiException Get US Market Calendar The calendar API serves the full list of market days from 1970 to 2029. It can also be queried by specifying a start and/or end time to narrow down the results. In addition to the dates, the response also contains the specific open and close times for the market days, taking into account early closures.- Parameters:
start- The first date to retrieve data for (inclusive). (optional)end- The last date to retrieve data for (inclusive). (optional)dateType- Indicates what start and end mean. Default: TRADING. If TRADING is specified, returns a calendar whose trading date matches start, end. If SETTLEMENT is specified, returns the calendar whose settlement date matches start and end. (optional)- Returns:
- List<LegacyCalendarDay>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
legacyCalendarWithHttpInfo
public ApiResponse<List<LegacyCalendarDay>> legacyCalendarWithHttpInfo(@Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable String dateType) throws ApiException Get US Market Calendar The calendar API serves the full list of market days from 1970 to 2029. It can also be queried by specifying a start and/or end time to narrow down the results. In addition to the dates, the response also contains the specific open and close times for the market days, taking into account early closures.- Parameters:
start- The first date to retrieve data for (inclusive). (optional)end- The last date to retrieve data for (inclusive). (optional)dateType- Indicates what start and end mean. Default: TRADING. If TRADING is specified, returns a calendar whose trading date matches start, end. If SETTLEMENT is specified, returns the calendar whose settlement date matches start and end. (optional)- Returns:
- ApiResponse<List<LegacyCalendarDay>>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-
legacyCalendarAsync
public okhttp3.Call legacyCalendarAsync(@Nullable OffsetDateTime start, @Nullable OffsetDateTime end, @Nullable String dateType, ApiCallback<List<LegacyCalendarDay>> _callback) throws ApiException Get US Market Calendar (asynchronously) The calendar API serves the full list of market days from 1970 to 2029. It can also be queried by specifying a start and/or end time to narrow down the results. In addition to the dates, the response also contains the specific open and close times for the market days, taking into account early closures.- Parameters:
start- The first date to retrieve data for (inclusive). (optional)end- The last date to retrieve data for (inclusive). (optional)dateType- Indicates what start and end mean. Default: TRADING. If TRADING is specified, returns a calendar whose trading date matches start, end. If SETTLEMENT is specified, returns the calendar whose settlement date matches start and end. (optional)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object- HTTP Response Details:
Response Details Status Code Description Response Headers 200 OK * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
400 One of the request parameters is invalid. See the returned message for details. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
429 Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you're under the rate limit. * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-RateLimit-Reset -
500 Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum. -
-