Alpaca Clock API

The Clock API from Alpaca — 2 operation(s) for clock.

GitHub OpenAPI

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/clock Get the US market clock · Get US Market Clock #
Ask an LLM
“Is the US stock market open right now?”
“When does the US market open and close today?”
Tell an agent
Get the US market clock.
Tell me whether the US market is open.
GET /v3/clock Get the clock for multiple markets · Get Market Clock #
Ask an LLM
“What phase is the US market in right now?”
“Can I check the market clock for a specific time?”
Tell an agent
Get the market clock for {markets}.
Check the market clock at {time}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/alpaca:alpaca-clock-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

alpaca-clock-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@alpaca.markets
    name: Alpaca Support
    url: https://alpaca.markets/support
  description: Alpaca's Trading API is a modern platform for algorithmic trading.
  termsOfService: https://s3.amazonaws.com/files.alpaca.markets/disclosures/library/TermsAndConditions.pdf
  title: Trading Clock API
  version: 2.0.1
servers:
- description: Paper
  url: https://paper-api.alpaca.markets
- description: Live
  url: https://api.alpaca.markets
security:
- API_Key: []
  API_Secret: []
tags:
- name: Clock
paths:
  /v2/clock:
    get:
      description: 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.
      operationId: LegacyClock
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/legacy_clock'
          description: OK
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/ratelimit_limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/ratelimit_remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/ratelimit_reset'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      summary: Get US Market Clock
      tags:
      - Clock
  /v3/clock:
    get:
      description: 'This API serves information about multiple markets: the current time, if it''s a market day, the current phase of the market, etc.'
      operationId: Clock
      parameters:
      - $ref: '#/components/parameters/markets'
      - $ref: '#/components/parameters/time'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/clock_resp'
          description: OK
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/ratelimit_limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/ratelimit_remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/ratelimit_reset'
        '400':
          $ref: '#/components/responses/400'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      summary: Get Market Clock
      tags:
      - Clock
components:
  schemas:
    bic:
      description: Business Identifier Code (BIC/SWIFT).
      example: IRVTUS3NXXX
      maxLength: 11
      minLength: 11
      pattern: ^[A-Z0-9]{11}$
      type: string
    market_acronym:
      description: The acronym of the market.
      example: NYSE
      type: string
    market_name:
      description: The full name of the market.
      example: New York Stock Exchange
      type: string
    clock:
      properties:
        is_market_day:
          description: Whether the clock is on a market day.
          type: boolean
        market:
          $ref: '#/components/schemas/public_market'
        next_market_close:
          description: Next market close timestamp
          format: date-time
          type: string
        next_market_open:
          description: Next market open timestamp
          format: date-time
          type: string
        phase:
          $ref: '#/components/schemas/phase'
        phase_until:
          description: The end of the current phase.
          format: date-time
          type: string
        timestamp:
          description: The time on the clock.
          format: date-time
          type: string
      required:
      - market
      - timestamp
      - is_market_day
      - next_market_open
      - next_market_close
      - phase
      - phase_until
      type: object
    public_market:
      description: A market.
      properties:
        acronym:
          $ref: '#/components/schemas/market_acronym'
        bic:
          $ref: '#/components/schemas/bic'
        mic:
          $ref: '#/components/schemas/mic'
        name:
          $ref: '#/components/schemas/market_name'
        timezone:
          $ref: '#/components/schemas/market_timezone'
      required:
      - acronym
      - name
      - timezone
      type: object
    clock_resp:
      description: Clock response.
      properties:
        clocks:
          items:
            $ref: '#/components/schemas/clock'
          type: array
      required:
      - clocks
      type: object
    phase:
      enum:
      - closed
      - pre
      - core
      - lunch
      - post
      type: string
    market_timezone:
      description: The timezone of the market.
      example: America/New_York
      type: string
    mic:
      description: Market identifier code (ISO 10383).
      example: XNYS
      maxLength: 4
      minLength: 4
      pattern: ^[A-Z0-9]{4}$
      type: string
    legacy_clock:
      example:
        is_open: true
        next_close: '2025-06-24T16:00:00-04:00'
        next_open: '2025-06-25T09:30:00-04:00'
        timestamp: '2025-06-24T14:15:22-04:00'
      properties:
        is_open:
          description: Whether or not the market is open.
          type: boolean
        next_close:
          description: Next market close timestamp.
          format: date-time
          type: string
        next_open:
          description: Next market open timestamp.
          format: date-time
          type: string
        timestamp:
          description: Current timestamp.
          format: date-time
          type: string
      required:
      - timestamp
      - is_open
      - next_open
      - next_close
      title: Clock
      type: object
  headers:
    ratelimit_reset:
      description: The UNIX epoch when the remaining quota changes.
      example: 1674044551
      schema:
        type: integer
    ratelimit_remaining:
      description: Request limit per minute remaining.
      example: 90
      schema:
        type: integer
    ratelimit_limit:
      description: Request limit per minute.
      example: 100
      schema:
        type: integer
  parameters:
    markets:
      description: '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.

        '
      example: NYSE,LSE
      in: query
      name: markets
      schema:
        type: string
    time:
      description: Instead of the current time, use this time for the clock.
      in: query
      name: time
      required: false
      schema:
        format: date-time
        type: string
  responses:
    '500':
      description: 'Internal server error. We recommend retrying these later. If the issue persists, please contact us on Slack or on the Community Forum.

        '
    '429':
      description: 'Too many requests. You hit the rate limit. Use the X-RateLimit-... response headers to make sure you''re under the rate limit.

        '
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/ratelimit_limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/ratelimit_remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/ratelimit_reset'
    '400':
      description: 'One of the request parameters is invalid. See the returned message for details.

        '
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/ratelimit_limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/ratelimit_remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/ratelimit_reset'
  securitySchemes:
    API_Key:
      description: ''
      in: header
      name: APCA-API-KEY-ID
      type: apiKey
    API_Secret:
      description: ''
      in: header
      name: APCA-API-SECRET-KEY
      type: apiKey
x-readme:
  explorer-enabled: true
  proxy-enabled: false