Product
Jentic OSThe workplace. An in-house AI platform for every employeeJentic OneSafe access. Agents reach your systems without holding keysJentic AIRThe foundation. Gets your existing platforms ready for AI
Pricing
Developers

GET STARTED

API DirectoryBrowse 10,000+ APIs Ready For AI Agent IntegrationDocumentationGuides and API reference

TOOLS

API ScoringCheck your AI Readiness using our scorecardArazzo UIVisualize Arazzo Workflows As Interactive DocumentationArazzo EditorBuild And Edit Multi-Step API Workflows Visually

COMMUNITY

GitHubOpen source projects and examplesOpen StandardsBuilt on open specs. Never locked in.
Resources
Company
About UsOur mission and teamCareersJoin our teamContactGet in touch
Try it now
Jentic OSJentic OneJentic AIR
Pricing
API DirectoryDocumentationAPI ScoringArazzo UIArazzo EditorGitHubOpen Standards
Resources
About UsCareersContact
Try it now
JenticJentic
Products
  • Jentic OS
  • Jentic One
  • Jentic AIR
For Developers
  • API Directory
  • Documentation
  • GitHub
Company
  • About Jentic
  • Careers
  • Contact Us
  • Trust Centre
ISO/IEC 27001:2022 certification badge issued by Prescient SecurityISO/IEC 27001:2022 certification badge issued by Prescient Security

Information Security Management System

Certified to ISO/IEC 27001:2022 by Prescient Security

Terms & Conditions•Privacy Policy•
© 2026 Jentic Technology Ltd. All rights reserved.
Switch to light modeSwitch to dark mode
APIs / Finance / Alpaca Markets / Alpaca Trading API
Alpaca Trading API logo

Alpaca Markets Alpaca Trading API

Browse all Alpaca Markets APIs
65
AI ReadinessAI-Aware (B)65/100
See full scorecard
Official vendor OpenAPI document · agent-readyFinanceBankingapiKey44 EndpointsREST

For Agents

Run a self-directed Alpaca account: place and cancel orders, manage positions and watchlists, read account activities, and check the market calendar through one set of API keys.

Use for: I need to place a market buy order for 10 shares of AAPL, Cancel all open orders on my account, Close all open positions immediately, Get my current portfolio history for the last month

Not supported: Does not handle market data feeds, customer account opening, or KYC - use for self-directed order placement, position and watchlist management, and account activities only.

The Alpaca Trading API is the self-directed trading surface of the Alpaca platform, designed for individual developers and algorithmic traders running their own brokerage account. It exposes orders, positions, watchlists, account configurations, account activities, market calendar and clock, assets, options contracts, corporate actions, crypto funding wallets, and portfolio history. Authentication uses APCA-API-KEY-ID and APCA-API-SECRET-KEY headers, and live and paper environments are exposed at api.alpaca.markets and paper-api.alpaca.markets respectively. With 44 endpoints, this API is focused on trading, not on opening or managing customer accounts.

Jentic One on GithubView OpenAPI Document

Install Jentic One Beta

Connect the Alpaca Trading API to your agent

Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Alpaca Trading API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.

Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.

1

Step 1: Jentic One Host machine

# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Falpaca.markets%2Ftrading" | sh
2

Step 2: Agent machine

# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Falpaca.markets%2Ftrading" | sh
jentic register       # connects your agent to your Jentic One instance

Jentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.

Capabilities

What an agent can do with Alpaca Trading API.

Place, replace, and cancel stock, options, and crypto orders

List open positions and close one or all of them

Exercise a held options position on request

Create, update, and delete watchlists by ID or by name

Read account activities, configurations, and portfolio history

Look up assets by symbol or ID and read option contracts

Manage crypto funding wallets, transfers, and whitelisted addresses

Use Cases

Patterns agents use Alpaca Trading API for, with concrete tasks.

★ Algorithmic order placement

Trading bots place orders via POST /v2/orders, replace open orders via PATCH /v2/orders/{order_id}, and cancel via DELETE /v2/orders/{order_id} or DELETE /v2/orders for all open orders. The same surface covers stock, options, and crypto orders, so a single integration handles cross-asset strategies.

Place a market buy order for 5 shares of NVDA via POST /v2/orders, then poll GET /v2/orders/{order_id} until status is filled.

Position management and risk control

Risk controls call GET /v2/positions to read current exposure, DELETE /v2/positions to flatten the book, or DELETE /v2/positions/{symbol_or_asset_id} to close a single position. Combined with GET /v2/account/portfolio/history, this lets a daily risk job evaluate drawdown and rebalance without leaving the API.

If end-of-day drawdown exceeds 2 percent, call DELETE /v2/positions to close all open positions on the account.

Options trading workflow

Options traders look up contracts via GET /v2/options/contracts, place orders for chosen contracts via POST /v2/orders, and exercise positions via POST /v2/positions/{symbol_or_contract_id}/exercise. The trading surface mirrors the stock workflow which keeps the option logic small.

Find SPY put contracts expiring this Friday via GET /v2/options/contracts, then place a buy-to-open order for the chosen strike.

Watchlist and market context

Apps maintain user-curated watchlists via /v2/watchlists and the by-name variant /v2/watchlists:by_name, then check the market clock via GET /v2/clock and the calendar via GET /v2/calendar to schedule trading windows. Asset metadata via /v2/assets fills out symbol details for the UI.

Add AAPL to the watchlist named 'tech-picks' via POST /v2/watchlists:by_name, then check GET /v2/clock to confirm the market is open.

AI agent self-directed trading

An AI agent assistant can suggest trades, place them after explicit confirmation, and read back portfolio history to summarise performance. Through Jentic the agent searches by intent, loads the order schema, and executes - the APCA keys stay encrypted in your own Jentic One instance and never enter the prompt context.

Use Jentic to search 'place an Alpaca order', execute POST /v2/orders after the user confirms, and report the fill via GET /v2/orders/{order_id}.

Key Endpoints

44 endpoints — the alpaca trading api is the self-directed trading surface of the alpaca platform, designed for individual developers and algorithmic traders running their own brokerage account.

METHOD

PATH

DESCRIPTION

POST

/v2/orders

Create an order

GET

/v2/orders

List orders

DELETE

/v2/orders/{order_id}

Cancel an order

GET

/v2/positions

List open positions

DELETE

/v2/positions

Close all positions

GET

/v2/account/portfolio/history

Account portfolio history

GET

/v2/clock

Market clock

GET

/v2/options/contracts

List option contracts

POST

/v2/orders

Create an order

GET

/v2/orders

List orders

DELETE

/v2/orders/{order_id}

Cancel an order

GET

/v2/positions

List open positions

DELETE

/v2/positions

Close all positions

GET

/v2/account/portfolio/history

Account portfolio history

GET

/v2/clock

Market clock

GET

/v2/options/contracts

List option contracts

Jentic AI Readiness Score

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

T

Trading API

- AI-Aware (B)
65/100
85
Foundational Compliance
61
Developer Experience & Jentic Compatibility
51
AI-Readiness & Agent Experience
94
Agent Usability
50
Security
71
AI Discoverability
Powered by JenticScoring Framework 1.0.0 | Scoring Engine 0.4.0
Show dimension breakdown
85

Foundational Compliance

Base layer of spec validity and structural soundness.

Grade: ASignals: 4
97%

Lint Results

Aggregated quality score from linter diagnostics, weighted by severity.

100%

Resolution Completeness

Percentage of `$ref` references that resolve successfully.

100%

Specification Validity

Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).

42%

Structural Integrity

Structural correctness score based on schema issues using logarithmic dampening.

61

Developer Experience & Jentic Compatibility

Clarity, completeness, and ingestion readiness for developers and tooling.

Grade: B-Signals: 4
16%

Example Density

How richly the API is illustrated with examples.

100%

Example Validity

Percentage of examples that conform to their schemas.

30%

Response Coverage

Percentage of operations with complete response definitions (success, client error, server error).

100%

Tooling Readiness

Health of API ingestion, bundling, and resolution within Jentic pipelines.

51

AI-Readiness & Agent Experience

Semantic breadth, depth, and agent comprehension for AI systems.

Grade: C-Signals: 4
63%

Description Coverage

Coverage of descriptions across API elements.

0%

Error Standardization

Coverage of RFC 9457 Problem Details for error responses.

86%

OperationId Quality

Coverage, uniqueness, and casing consistency of operationIds for AI inference.

56%

Summary Coverage

Coverage of summaries across operations/tags/info.

94

Agent Usability

Functional utility, complexity comfort, and AI orchestration readiness.

Grade: A+Signals: 1
94%

Complexity Comfort

Agent comfort level based on API operational and structural complexity.

50

Security

Trust, risk posture, and security compliance.

Grade: C-Signals: 1
50%

Authentication Strength

Average quality of security schemes based on authentication method strength (weakest link for OAuth2).

71

AI Discoverability

Findability, semantic richness, and reasoning readiness.

Grade: A-Signals: 1
71%

Descriptive Richness

Clarity and depth of descriptions across API elements.

View full reportHow the score is calculatedMore about the dimensions

Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

Score your own APIScoring CLI agent skill
npx @jentic/api-scorecard-cli score <openapi-url>

Why Jentic?

What agents get from Jentic-routed access to this vendor.

Setup

Wiring the Alpaca Trading API by hand means sending its API key headers to api.alpaca.markets and coordinating order, position, and account-activity calls with your own retry handling. Through Jentic you install once, import the Alpaca Trading API from the API Directory, store the API key once, and your agent calls it.

Permission scoping

The Alpaca Trading API puts the order id in the URL path (/v2/orders/{order_id}) while position closes and order creation are collection-level, so a rule can pin your agent to reading orders and the clock. You choose the operations it may call, so placing orders or closing positions is not included unless you add them.

Credential isolation

Your Alpaca Trading API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.

Intent-based discovery

Agents search Jentic by intent such as 'place a buy order' or 'read open positions', and Jentic returns the matching Alpaca Trading operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

Related APIs

Alternatives and complements available in the Jentic catalogue.

Complementary

Alpaca Market Data API

→

Market Data feeds the prices that drive Trading orders

Use Alpaca Market Data alongside Trading when the agent needs live or historical prices to decide on orders

Alternative

Alpaca Broker API

→

Broker is the multi-account, branded brokerage variant of Trading

Choose Alpaca Broker when trading on behalf of customer accounts; choose Trading for the developer's own account

Complementary

Plaid

→

Plaid links a bank account for funding the Alpaca brokerage

Use Plaid when bank verification or balance checks are needed before sending funds into Alpaca

Complementary

OpenAI

→

OpenAI summarises market context that informs Trading API calls

Use OpenAI when natural-language reasoning over market data should drive a confirmed order via Alpaca Trading

FAQs

Specific to using Alpaca Trading API through Jentic.

What authentication does the Alpaca Trading API use?

Two header-based API keys: APCA-API-KEY-ID and APCA-API-SECRET-KEY. Through Jentic, both values are stored encrypted by your own Jentic One instance and injected at execution time, so they never appear in agent prompts or logs. Alpaca's docs also describe an OAuth 2.0 authorization-code flow for third-party apps calling the Trading API on an end user's behalf, with account:write and trading scopes and a bearer access token; the OpenAPI description behind this page declares the two key headers and not that flow.

Can I place options orders through the Trading API?

Yes. Look up contracts via GET /v2/options/contracts, then place an order with POST /v2/orders specifying the contract symbol. Exercise an options position via POST /v2/positions/{symbol_or_contract_id}/exercise.

How do I cancel all open orders via Jentic?

Ask your agent to cancel your open Alpaca orders and your self-hosted Jentic One instance resolves that to DELETE /v2/orders, which cancels every open order on the authenticated account. You choose the operations the agent may call, so DELETE /v2/orders has to be in its allowed set first.

Is there an Alpaca Trading MCP server?

Yes. Alpaca publishes an MCP server, and its docs state the server exposes 65 tools across the Trading and Market Data APIs, with an ALPACA_TOOLSETS environment variable that limits which toolsets load. You can also connect the Alpaca Trading API directly through Jentic: your agent gets the full 44-endpoint surface from the spec and discovers operations on demand instead of loading another server's tool definitions into its context, and your APCA-API-KEY-ID and APCA-API-SECRET-KEY are injected at call time by your own self-hosted Jentic One instance instead of sitting in an MCP client config file.

Is there a paper trading endpoint?

Yes. The spec lists https://paper-api.alpaca.markets alongside the live https://api.alpaca.markets endpoint. Use the paper URL to develop and test without placing real orders.

Can I read portfolio history for performance reporting?

Yes. GET /v2/account/portfolio/history returns equity and profit and loss values across a chosen period, suitable for daily or weekly performance summaries.

Does the Trading API include market data?

No. Use the separate Alpaca Market Data API for bars, quotes, trades, and snapshots. The Trading API exposes asset metadata and the market clock but not pricing data.

Can I limit what my agent is allowed to do with the Alpaca Trading API?

Yes. Because Jentic One is self-hosted, your own rules decide which Alpaca Trading operations and credentials the agent may use, so you can pin it to read-only calls like GET /v2/orders and GET /v2/clock. Order creation and closing positions are collection-level operations such as POST /v2/orders and DELETE /v2/positions, so the agent cannot place or flatten trades unless you add those operations to its allowed set. Individual actions keyed by path, like canceling a specific order via DELETE /v2/orders/{order_id}, can be scoped in the same way.

GET STARTED

Start building with Alpaca Trading API

Explore with Jentic One
View OpenAPI Document