Class ClockApi
java.lang.Object
markets.alpaca.client.openapi.trading.api.ClockApi
Generated client for ClockApi 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
clock: Get Market ClocklegacyClock: Get US Market Clock
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclock(String markets, OffsetDateTime time) Get Market Clock This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc.okhttp3.CallclockAsync(String markets, OffsetDateTime time, ApiCallback<ClockResp> _callback) Get Market Clock (asynchronously) This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc.okhttp3.CallclockCall(String markets, OffsetDateTime time, ApiCallback _callback) Build call for clockclockWithHttpInfo(String markets, OffsetDateTime time) Get Market Clock This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc.intGet US Market Clock The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.okhttp3.CalllegacyClockAsync(ApiCallback<LegacyClock> _callback) Get US Market Clock (asynchronously) The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.okhttp3.CalllegacyClockCall(ApiCallback _callback) Build call for legacyClockGet US Market Clock The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex)
-
Constructor Details
-
ClockApi
public ClockApi() -
ClockApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
clockCall
public okhttp3.Call clockCall(@Nullable String markets, @Nullable OffsetDateTime time, ApiCallback _callback) throws ApiException Build call for clock- Parameters:
markets- Comma-separated list of markets. 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. (optional)time- Instead of the current time, use this time for the clock. (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. -
-
clock
Get Market Clock This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc.- Parameters:
markets- Comma-separated list of markets. 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. (optional)time- Instead of the current time, use this time for the clock. (optional)- Returns:
- ClockResp
- 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. -
-
clockWithHttpInfo
public ApiResponse<ClockResp> clockWithHttpInfo(@Nullable String markets, @Nullable OffsetDateTime time) throws ApiException Get Market Clock This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc.- Parameters:
markets- Comma-separated list of markets. 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. (optional)time- Instead of the current time, use this time for the clock. (optional)- Returns:
- ApiResponse<ClockResp>
- 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. -
-
clockAsync
public okhttp3.Call clockAsync(@Nullable String markets, @Nullable OffsetDateTime time, ApiCallback<ClockResp> _callback) throws ApiException Get Market Clock (asynchronously) This API serves information about multiple markets: the current time, if it's a market day, the current phase of the market, etc.- Parameters:
markets- Comma-separated list of markets. 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. (optional)time- Instead of the current time, use this time for the clock. (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. -
-
legacyClockCall
Build call for legacyClock- Parameters:
_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 -
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. -
-
legacyClock
Get US Market Clock The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.- Returns:
- LegacyClock
- 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 -
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. -
-
legacyClockWithHttpInfo
Get US Market Clock The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.- Returns:
- ApiResponse<LegacyClock>
- 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 -
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. -
-
legacyClockAsync
Get US Market Clock (asynchronously) The clock API serves the current market timestamp, whether or not the market is currently open, as well as the times of the next market open and close.- Parameters:
_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 -
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. -
-