Alpaca · Authentication Profile

Alpaca Authentication

Authentication

Alpaca secures its APIs with apiKey, http, and oauth2 across 5 declared security schemes, as derived from its OpenAPI definitions. OAuth 2.0 is offered via the authorizationCode flow(s).

FintechTradingStocksCryptoBrokerageMarket DataOptions
Methods: apiKey, http, oauth2 Schemes: 5 OAuth flows: authorizationCode API key in: header

Security Schemes

BasicAuth http
scheme: basic
API_Key apiKey
· in: header (APCA-API-KEY-ID)
API_Secret apiKey
· in: header (APCA-API-SECRET-KEY)
ConnectOAuth2 oauth2
· flows: authorizationCode
authx (Broker MCP) oauth2
· flows: authorizationCode

Source

Authentication Profile

Raw ↑
generated: '2026-07-22'
method: searched
source: openapi/alpaca-broker-api-openapi.yml, openapi/alpaca-data-api-openapi.yml, openapi/alpaca-oauth-api-openapi.yml,
  openapi/alpaca-trading-api-openapi.yml
docs: https://docs.alpaca.markets/docs/authentication
summary:
  types:
  - apiKey
  - http
  - oauth2
  api_key_in:
  - header
  oauth2_flows:
  - authorizationCode
schemes:
- name: BasicAuth
  type: http
  scheme: basic
  note: Broker API — API key as username, API secret as password.
  sources:
  - openapi/alpaca-broker-api-openapi.yml
- name: API_Key
  type: apiKey
  in: header
  parameter: APCA-API-KEY-ID
  sources:
  - openapi/alpaca-data-api-openapi.yml
  - openapi/alpaca-oauth-api-openapi.yml
  - openapi/alpaca-trading-api-openapi.yml
- name: API_Secret
  type: apiKey
  in: header
  parameter: APCA-API-SECRET-KEY
  sources:
  - openapi/alpaca-data-api-openapi.yml
  - openapi/alpaca-oauth-api-openapi.yml
  - openapi/alpaca-trading-api-openapi.yml
- name: ConnectOAuth2
  type: oauth2
  flows:
  - flow: authorizationCode
    authorizationUrl: https://app.alpaca.markets/oauth/authorize
    tokenUrl: https://api.alpaca.markets/oauth/token
    scopes: [account:write, trading, data]
  note: >-
    Alpaca Connect — third-party apps act for Alpaca users on the Trading and Market Data APIs
    with a Bearer access token; read-only access is the default when no scope is requested.
    Not declared in the harvested OpenAPI; documented at docs.alpaca.markets. See
    scopes/alpaca-scopes.yml.
  sources:
  - https://docs.alpaca.markets/docs/using-oauth2-and-trading-api
- name: authx (Broker MCP)
  type: oauth2
  flows:
  - flow: authorizationCode
    authorizationUrl: https://authx.alpaca.markets/v1/oauth2/authorize
    tokenUrl: https://authx.alpaca.markets/v1/oauth2/token
  note: >-
    Authorization server fronting the hosted Broker MCP Server (PKCE S256; also client_credentials,
    jwt-bearer, refresh_token grants). Metadata saved in
    well-known/alpaca-authx-oauth-authorization-server.json.
  sources:
  - https://authx.alpaca.markets/v1/.well-known/oauth-authorization-server
paper_trading:
  note: Paper environment uses the same schemes with separate keys against https://paper-api.alpaca.markets.