Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Alpaca OAuth API

The Alpaca OAuth API allows third-party applications to authenticate Alpaca users and obtain access tokens for the Trading and Market Data APIs.

Alpaca OAuth API is one of 23 APIs that Alpaca publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include OAuth, Authentication, and Authorization. The published artifact set on APIs.io includes API documentation and an OpenAPI specification.

This API exposes 3 operations across 3 paths, and defines 4 schemas. It is described by OpenAPI 3.0.0, at version 1.0.0.

Requests are made against 2 base URLs: https://broker-api.sandbox.alpaca.markets, https://broker-api.alpaca.markets.

3 operations 3 paths 4 schemas 1 GET2 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
1.0.0
Base URL
https://api.alpaca.markets/oauth
Authentication
HTTP Basic
Terms of Service
Resource Areas
1

Authentication & Security 1

Alpaca OAuth API declares 1 security scheme for authenticating requests. It accepts HTTP basic authentication (BasicAuth). By default, every request must be authenticated.

Paths & Operations 3

Across 3 paths, the API surfaces 3 operations — 1 GET, 2 POST. Each is listed below with its method, path, parameters, and response codes.

OAuth 3
GET
/v1/oauth/clients/{client_id}
Get an OAuth client
getOAuthClient 4 params → 200401
POST
/v1/oauth/token
Issue an OAuth token.
issueOAuthToken body → 200401422
POST
/v1/oauth/authorize
Authorize an OAuth Token
authorizeOAuthToken body → 200401422

Schemas 4

The contract defines 4 schemas that model the data the API accepts and returns. The most detailed are OathClientResponse (9 properties), OAuthTokenRequest (5 properties), AuthorizeOAuthTokenResponse (4 properties), IssueOAuthTokenResponse (3 properties). Each schema is shown below with its type and property counts.

IssueOAuthTokenResponse
object
3 properties 3 required
AuthorizeOAuthTokenResponse
object
4 properties 4 required
OathClientResponse
object
9 properties
OAuthTokenRequest
object
This model is used for both the Issue and Authorize OAuth token routes
5 properties 5 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

alpaca-oauth-api-openapi.yml Raw ↑

Other APIs Alpaca publishes across the network.

Alpaca Trading API
Alpaca Account Activities API
Alpaca Account Configurations API
Alpaca Accounts API
Alpaca Assets API
Alpaca Calendar API
Alpaca Clock API
Alpaca Corporate Actions API
Alpaca Crypto Pricing Data API API
Alpaca Documents API
Alpaca Events API
Alpaca Funding API