Alpaca Account API

Trading account details, configuration, and activities.

Operations 2

GET /account Get account #
GET /account/activities Get account activities #

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-markets-account-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

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.

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

OpenAPI Specification

alpaca-markets-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Alpaca API (Trading, Market Data, Broker) Account API
  description: A grounded, curated OpenAPI description of Alpaca's public REST surface. Alpaca is a developer-first, commission-free brokerage whose stock, ETF, options, and crypto trading and market data are exposed entirely through APIs. This document covers the three REST products - the Trading API (api.alpaca.markets/v2, with a free paper sandbox at paper-api.alpaca.markets/v2), the Market Data API (data.alpaca.markets, with v2 stocks, v1beta3 crypto, and v1beta1 options/news/screener namespaces), and the Broker API (broker-api.alpaca.markets/v1). Real-time WebSocket streaming for market data is described in the companion AsyncAPI document at asyncapi/alpaca-markets-asyncapi.yml. Trading and Market Data authenticate with the APCA-API-KEY-ID and APCA-API-SECRET-KEY headers (or OAuth2 for third-party apps); the Broker API uses HTTP Basic auth. This spec is a representative subset of the full API for discovery purposes, not an exhaustive vendor specification.
  version: '1.0'
  contact:
    name: Alpaca
    url: https://alpaca.markets
  license:
    name: API documentation - Alpaca Terms of Service
    url: https://alpaca.markets/terms
servers:
- url: https://api.alpaca.markets/v2
  description: Trading API - live
- url: https://paper-api.alpaca.markets/v2
  description: Trading API - paper (free sandbox)
- url: https://data.alpaca.markets
  description: Market Data API
- url: https://broker-api.alpaca.markets/v1
  description: Broker API - production
security:
- apcaKey: []
  apcaSecret: []
tags:
- name: Account
  description: Trading account details, configuration, and activities.
paths:
  /account:
    get:
      operationId: getAccount
      tags:
      - Account
      summary: Get account
      description: Returns the authenticated trading account's details, balances, and status.
      responses:
        '200':
          description: The trading account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /account/activities:
    get:
      operationId: getAccountActivities
      tags:
      - Account
      summary: Get account activities
      description: Returns account activity entries (fills, dividends, transfers, fees).
      parameters:
      - name: activity_types
        in: query
        schema:
          type: string
        description: Comma-separated activity types to filter by (for example FILL, DIV).
      responses:
        '200':
          description: A list of account activities.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
components:
  schemas:
    Account:
      type: object
      description: A trading account.
      properties:
        id:
          type: string
          description: Account UUID.
        account_number:
          type: string
          description: The account number.
        status:
          type: string
          description: Account status, for example ACTIVE.
        currency:
          type: string
          description: Account currency, for example USD.
        cash:
          type: string
          description: Cash balance.
        portfolio_value:
          type: string
          description: Total value of cash and holdings.
        buying_power:
          type: string
          description: Current buying power.
        pattern_day_trader:
          type: boolean
          description: Whether the account is flagged as a pattern day trader.
    Error:
      type: object
      properties:
        code:
          type: integer
          description: Alpaca error code.
        message:
          type: string
          description: Human-readable error message.
  responses:
    Unauthorized:
      description: Authentication failed or credentials missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apcaKey:
      type: apiKey
      in: header
      name: APCA-API-KEY-ID
      description: Alpaca API key ID. Paired with APCA-API-SECRET-KEY.
    apcaSecret:
      type: apiKey
      in: header
      name: APCA-API-SECRET-KEY
      description: Alpaca API secret key. Paired with APCA-API-KEY-ID.
    brokerBasic:
      type: http
      scheme: basic
      description: Broker API HTTP Basic auth using your Broker API key as username and secret as password.