Alpaca Trading API

The Trading API from Alpaca — 12 operation(s) for trading.

Business capability
Retail Investing AE-190.30

Operations 18

DELETE /v1/trading/accounts/{account_id}/orders Cancel all Open Orders For an Account #
GET /v1/trading/accounts/{account_id}/orders Retrieve a List of Orders #
POST /v1/trading/accounts/{account_id}/orders Create an Order for an Account #
DELETE /v1/trading/accounts/{account_id}/orders/{order_id} Cancel an Open Order #
GET /v1/trading/accounts/{account_id}/orders/{order_id} Retrieve an Order by its ID #
PATCH /v1/trading/accounts/{account_id}/orders/{order_id} Replace an Order #
GET /v1/trading/accounts/{account_id}/orders:by_client_order_id Retrieves a single order specified by the client order ID #
DELETE /v1/trading/accounts/{account_id}/positions Close All Positions for an Account #
GET /v1/trading/accounts/{account_id}/positions List Open Positions for an Account #
DELETE /v1/trading/accounts/{account_id}/positions/{symbol_or_asset_id} Close a Position for an Account #
GET /v1/trading/accounts/{account_id}/positions/{symbol_or_asset_id} Get an Open Position for account by Symbol or AssetId #
GET /v2/events/trades Subscribe to Trade Events (SSE) #
GET /v1/accounts/positions Bulk Fetch All Accounts Positions #
PATCH /v1/trading/accounts/{account_id}/account/configurations Update Trading Configurations for an Account #
GET /v1/trading/accounts/{account_id}/limits Retrieve real-time Trading Limits for an Account #
POST /v1/trading/accounts/{account_id}/orders/estimation Estimate an Order #
POST /v1/trading/accounts/{account_id}/positions/{symbol_or_contract_id}/do-not-exercise Do Not Exercise an Options Position #
POST /v1/trading/accounts/{account_id}/positions/{symbol_or_contract_id}/exercise Exercise an Options Position #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-account-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-order-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-position-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-option-contract-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-assets-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-create-order-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-trade-account-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-account-extended-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-account-creation-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-trade-update-event-v2-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-ipoevent-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-corporate-action-event-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-movers-resp-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-fixed-income-latest-quotes-resp-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-most-actives-resp-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-fixed-income-latest-prices-resp-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-stock-auctions-resp-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-token-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-token-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/alpaca/json-schema/alpaca-corporate-actions-resp-schema.json

Other Resources

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-trading-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

alpaca-trading-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Alpaca Trading API
  version: 1.1.1
  contact:
    email: support@alpaca.markets
    name: Alpaca Support
    url: https://alpaca.markets/support
  description: 'Operations tagged Trading across 2 of this provider''s published API definitions: alpaca-eu-broker-api-openapi.json, alpaca-us-broker-api-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- description: Sandbox endpoint
  url: https://broker-api.sandbox.eu.alpaca.markets
- description: Production endpoint
  url: https://broker-api.eu.alpaca.markets
- description: Sandbox endpoint
  url: https://broker-api.sandbox.alpaca.markets
- description: Production endpoint
  url: https://broker-api.alpaca.markets
security:
- BasicAuth: []
tags:


# --- truncated at 32 KB (122 KB total) ---
# Full source: https://artifacts.apis.io/alpaca/openapi/alpaca-trading-api-openapi.yml