Discovery needs no key. Ratings and market analysis are Pro.
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. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Broker Clock API
description: Open brokerage accounts, enable crypto and stock trading, and manage the ongoing user experience with Alpaca Broker API
version: 1.0.0
contact:
name: Alpaca Support
email: support@alpaca.markets
url: https://alpaca.markets/support
termsOfService: https://s3.amazonaws.com/files.alpaca.markets/disclosures/library/TermsAndConditions.pdf
servers:
- url: https://broker-api.sandbox.alpaca.markets
description: Sandbox endpoint
- url: https://broker-api.alpaca.markets
description: Production endpoint
security:
- BasicAuth: []
tags:
- name: Clock
paths:
/v1/clock:
get:
tags:
- Clock
summary: Query market clock
responses:
'200':
description: The current market's timestamp
content:
application/json:
schema:
$ref: '#/components/schemas/Clock'
examples: {}
operationId: queryMarketClock
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.
components:
schemas:
Clock:
description: Represents the current market time and open/close events.
type: object
x-examples:
example:
timestamp: '2018-04-01T12:00:00.000Z'
is_open: true
next_open: '2018-04-01T12:00:00.000Z'
next_close: '2018-04-01T12:00:00.000Z'
example-1:
timestamp: '2022-02-16T13:06:05.210563128-05:00'
is_open: true
next_open: '2022-02-17T09:30:00-05:00'
next_close: '2022-02-16T16:00:00-05:00'
title: Clock
properties:
timestamp:
type: string
minLength: 1
format: date-time
description: Current timestamp
example: '2022-02-16T13:06:05.210563128-05:00'
is_open:
type: boolean
description: Whether the market is open or not
next_open:
type: string
minLength: 1
format: date-time
description: Next market open timestamp
next_close:
type: string
minLength: 1
format: date-time
description: Next market close timestamp
required:
- timestamp
- is_open
- next_open
- next_close
securitySchemes:
BasicAuth:
type: http
scheme: basic