Alpaca
Stock and crypto trading platform with commission-free trading, real-time market data, and algorithmic trading capabilities
Verdict
Common use cases
- Check portfolio value before daily standup
- Place limit orders from Slack threads
- Liquidate all positions during market volatility
- Build watchlists from analyst research notes
- Cancel open orders after strategy pivot
Integration
- Vendor
- Alpaca
- Category
- other
- Auth
- API_KEY
- Tools
- 50
- Composio slug
alpaca
Tools
- Add Asset to Watchlist
Adds a symbol to an existing watchlist in the authenticated account. Use when you need to track a new security in an existing watchlist. This action appends the specified symbol to the end of the watchlist's asset list. The watchlist_id can
- Add Asset to Watchlist by Name
Add an asset to a watchlist by name. Use when you need to add a symbol to a specific watchlist identified by its name. If a watchlist with the specified name does not exist, it will be created automatically and the symbol will be added to i
- Create Watchlist
Create a new watchlist for the authenticated account. Use when you need to create a watchlist to track specific securities. The name must contain only alphanumeric characters (no spaces or special characters).
- Create Watchlist
Creates a new watchlist for the authenticated account. Use this action when you need to: - Create a new watchlist to track specific securities - Set up initial symbols for a watchlist at creation time - Organize tracked symbols under a name
- Delete All Open Positionsdestructive
Liquidates all open positions by closing them at market price. This action is irreversible and will permanently close all positions in the account. Use when you need to quickly exit all positions, such as before closing an account or in eme
- Delete All Orders for Accountdestructive
Attempts to cancel all open orders for a specified trading account. A response will be provided for each order that is attempted to be cancelled. This action is irreversible for individual orders that are successfully cancelled.
- Delete Unsubscribe Accountdestructive
Delete a rebalancing subscription to unsubscribe an account. This action permanently removes the specified subscription. Use when you need to unsubscribe an account from rebalancing services. This action is irreversible once executed. Note:
- Delete Watchlist By IDdestructive
Delete a watchlist by its unique identifier. Use when you need to remove an entire watchlist that is no longer needed. This action is irreversible once executed — the watchlist and all its contents cannot be recovered. Note: If the watchlis
- Get Account
Retrieves account information for the authenticated Alpaca account. Use this action when you need to check account status, available buying power, cash balance, equity, margin information, day trade count, or other account details. This is
- Get Account Activities
Retrieves account activities for the authenticated Alpaca account. Use this action when you need to retrieve transaction history, dividend payments, interest payments, fees, transfers, or other account-related activities. Supports filtering
- Get Account Activities By Activity Type
Retrieves account activities of a specific type for the authenticated Alpaca account. Use when you need to filter account activities by a specific type such as trade fills, dividends, interest payments, fees, or transfers. Supports date ran
- Get Account Activities V2
Retrieves account activities of one type for the authenticated Alpaca account using the v2 API. Use this action when you need to retrieve transaction history, dividend payments, interest payments, fees, transfers, or order fill activities.
- Get Account Configurations
Retrieves the current trading account configuration settings for the authenticated Alpaca account. Use this action when you need to check the current trading account settings such as day-trading margin call (DTMC) checks, fractional trading
- Get Account Portfolio History
Retrieves the portfolio history statistics for an Alpaca trading account. Portfolio history provides a time series of equity values, profit/loss metrics, and other performance data over a specified time period. Use when you need to analyze
- Get Account Portfolio History
Retrieves the portfolio history statistics for a trading account. Portfolio history provides a time series of equity values, profit/loss metrics, and optionally cashflow data over a specified time period. Use when you need to analyze accoun
- Get All Account Positions
Bulk fetches all open positions for the authenticated account. Use when you need to retrieve all current positions, monitor overall portfolio holdings, or check unrealized P&L across the entire account. This action does not require an accou
- Get All Open Positions
Retrieves all open positions for the authenticated Alpaca trading account. Use this action when you need to retrieve all current positions, monitor portfolio holdings, or check unrealized P&L across the entire account. This action does not
- Get All Orders
Retrieves all orders for an account based on specified filter criteria. Returns a list of orders with their current status, filled quantity, prices, and any nested legs for complex orders. Use when you need to query historical or current or
- Get Calendar
Retrieves market calendar information for trading days from the Alpaca Trading API. Use this action when you need to: - Get market open and close times for specific dates - Check trading session times - Verify market operating hours for dat
- Get Clock
Retrieves the current market clock information from the Alpaca Trading API. Use this action when you need to: - Check if the market is currently open - Determine when the next market open or close will occur - Plan trading activities based
- Get Crypto Bars for Multiple Symbols
Retrieves OHLCV (Open, High, Low, Close, Volume) bars for multiple crypto symbols. Use this action when you need to: - Get historical price data for multiple crypto symbols - Analyze price trends over a specific timeframe - Fetch aggregated
- Get Crypto Latest Orderbooks
Retrieves the latest bid and ask orderbook data for specified crypto symbols. Use when you need real-time orderbook data for cryptocurrency trading, such as checking current market depth before placing orders or analyzing liquidity. Returns
- Get Crypto Latest Quotes
Retrieves the latest bid and ask prices for specified crypto symbols at a specific location. Use when you need real-time quote data for cryptocurrency trading, such as checking current market prices before placing orders or monitoring price
- Get Crypto Perp Latest Bars
Retrieves the latest OHLCV (Open, High, Low, Close, Volume) bars for crypto perpetual futures symbols. Use this action when you need real-time or near real-time price data for crypto perpetual futures contracts for a specific location (e.g.
- Get Crypto Perp Latest Orderbooks
Retrieves the latest bid and ask orderbook data for specified crypto perpetual futures symbols. Use when you need real-time orderbook data for crypto perpetual futures trading, such as checking current market depth before placing orders or
- Get Crypto Perp Latest Pricing
Retrieves the latest pricing data for specified crypto perpetual futures symbols. Use when you need real-time pricing data for crypto perpetual futures trading, such as checking current market prices, index prices, mark prices, funding rate
- Get Crypto Perp Latest Quotes
Retrieves the latest bid and ask prices for specified crypto perpetual futures symbols for a specific location. Use when you need real-time quote data for crypto perpetual futures trading, such as checking current market prices before placi
- Get Crypto Perp Latest Trades
Retrieves the latest trade data for specified crypto perpetual futures symbols. Use when you need real-time trade data for crypto perpetual futures trading, such as monitoring recent trades, analyzing price movements, or tracking trading vo
- Get Crypto Perps Global Latest Bars
Retrieves the latest OHLCV (Open, High, Low, Close, Volume) bars for crypto perpetual futures symbols. Use this action when you need real-time or near real-time price data for crypto perpetual futures contracts. Returns the most recent bar
- Get Crypto Perps Global Latest Pricing
Returns the latest pricing data for crypto perpetual futures symbols. Use this action when you need to retrieve current market data for crypto perpetual futures contracts including mark price, index price, open interest, and funding rate.
- Get Crypto Perps Global Latest Quotes
Retrieves the latest bid and ask prices for specified crypto perpetual futures symbols. Use when you need real-time quote data for crypto perpetual futures trading, such as checking current market prices before placing orders or monitoring
- Get Crypto Perps Global Latest Trades
Retrieves the latest trade data for specified crypto perpetual futures symbols. Use when you need real-time trade data for crypto perpetual futures trading, such as monitoring recent trades, analyzing price movements, or tracking trading vo
- Get Crypto Snapshots
Retrieves snapshots (latest trade, latest quote, minute bar, daily bar, and previous daily bar) for multiple cryptocurrency symbols in a specific location. Use this action when you need comprehensive real-time market data for crypto symbols
- Get Crypto US Historical Quotes
Retrieves historical quote data (bid/ask prices) for specified crypto symbols on US exchanges. Returns quotes sorted by symbol first, then by timestamp. Use when you need: - Historical bid/ask price data for cryptocurrency pairs - Analyzing
- Get Crypto US Latest Bars
Retrieves the latest OHLCV (Open, High, Low, Close, Volume) bars for US crypto symbols. Use this action when you need real-time or near real-time price data for multiple crypto trading pairs. Returns the most recent bar for each requested s
- Get Crypto US Latest Orderbooks
Retrieves the latest bid and ask orderbook data for specified crypto symbols in the US market. Use when you need real-time orderbook data for cryptocurrency trading in the US market, such as checking current market depth before placing orde
- Get Crypto US Latest Quotes
Retrieves the latest bid and ask prices for specified crypto symbols in the US location. Use when you need real-time quote data for cryptocurrency trading in the US market, such as checking current market prices before placing orders or mon
- Get Crypto US Latest Trades
Retrieves the latest trade data for specified crypto symbols in the US location. Use when you need real-time trade data for cryptocurrency trading, such as monitoring recent trades, analyzing price movements, or tracking trading volume.
- Get Crypto US Snapshots
Retrieves snapshots (latest trade, latest quote, minute bar, daily bar, and previous daily bar) for multiple cryptocurrency symbols in the US market location. Use this action when you need comprehensive real-time market data for multiple cr
- Get Crypto US Trades
Retrieves historical trade data for specified US crypto symbols. Use when you need to: - Get historical trade data for US crypto symbols at once - Analyze trading volume and price movements over time - Build datasets for backtesting or rese
- Get Exchanges
Retrieves a list of supported stock exchanges with their short codes and full names from the Alpaca Market Data API. Use this action when you need to: - Get the mapping between exchange codes and full names - Understand what exchange codes
- Get Historical Bars for Stock Symbol
Retrieves historical OHLCV (Open, High, Low, Close, Volume) bars for a single stock symbol. Use this action when you need to analyze historical price movements and trading activity for a specific stock ticker over a given timeframe. The bar
- Get Historical Crypto US Bars
Retrieves historical OHLCV (Open, High, Low, Close, Volume) bars for crypto symbols in a specific US location. Use this action when you need to analyze historical price movements and trading activity for cryptocurrency pairs over a given ti
- Get Historical Stock Bars
Retrieves historical OHLCV (Open, High, Low, Close, Volume) bars for a single stock symbol. Use this action when you need to analyze historical price movements and trading activity for a specific stock ticker over a given timeframe. The bar
- Get Latest Bar for Stock Symbol
Retrieves the latest OHLCV (Open, High, Low, Close, Volume) bar for a single stock symbol. Use this action when you need real-time or near real-time price bar data for a specific stock trading symbol. This is useful for dashboards, price mo
- Get Latest Bars For Crypto Symbol
Retrieves the latest OHLCV (Open, High, Low, Close, Volume) bar data for a crypto symbol. Use this action when you need real-time or near real-time price data for a specific cryptocurrency pair. Returns the most recent bar including open, h
- Get Latest Bars for Crypto Symbols
Retrieves the latest OHLCV (Open, High, Low, Close, Volume) bars for multiple crypto symbols. Use this action when you need real-time or near real-time price bar data for multiple cryptocurrency pairs simultaneously. This is useful for dash
- Get Latest Bars for Multiple Stock Symbols
Retrieves the latest OHLCV (Open, High, Low, Close, Volume) bars for multiple stock symbols. Use this action when you need real-time or near real-time price bar data for multiple stock trading symbols simultaneously. This is useful for dash
- Get Stock Bars for Multiple Symbols
Retrieves OHLCV (Open, High, Low, Close, Volume) bars for multiple stock symbols. Use this action when you need to: - Get historical price data for multiple stock symbols - Analyze price trends over a specific timeframe - Fetch aggregated b
- Get Stock Conditions
Retrieves the mapping of condition codes to their names from Alpaca Markets API for the specified type (trade or quote conditions) and tape. Use this action when you need to: - Decode condition codes from stock market data - Get the list of
Setup
Setup guide
- 11. In Switchy, open your workspace settings and navigate to Integrations. 2. Search for Alpaca and click Connect. 3. You'll be prompted to paste your Alpaca API key — generate one from your Alpaca dashboard under Account > API Keys (choose paper trading for testing or live trading for real execution). 4. Copy the key and secret, paste them into Switchy, and click Authorize. 5. Switchy confirms the connection and lists available tools. 6. Open any Project, type '@Alpaca what's my current portfolio value?' and send. 7. If the response includes account data, the connection works. 8. To test a write action, create a watchlist: '@Alpaca create a watchlist named TestList with symbols AAPL, MSFT'. 9. Check your Alpaca dashboard to verify the watchlist appears.
What teammates see: by default, memories from Alpaca are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Projects have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Portfolio Snapshot
@Alpaca show me my current account balance, total equity, and available buying power
Create Sector Watchlist
@Alpaca create a watchlist called TechQ1 and add AAPL, MSFT, GOOGL, NVDA, and TSLA
Place Market Order
@Alpaca place a market order to buy 10 shares of AAPL
Cancel All Orders
@Alpaca cancel all open orders for my account
Liquidate Positions
@Alpaca liquidate all my open positions right now
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@alpaca what positions do I currently hold, and what's my unrealized P&L on each?
Based on your Alpaca account, you currently hold 3 open positions: 50 shares of AAPL (avg cost $178.23, current $182.45, unrealized gain +$211.00), 25 shares of MSFT (avg cost $412.80, current $408.12, unrealized loss -$117.00), and 100 shares of SPY (avg cost $485.60, current $487.22, unrealized gain +$162.00). Your total unrealized P&L across all positions is +$256.00. All prices reflect the most recent market data available through Alpaca's API at the time of this query.
This example shows read-only account inspection — no trades are executed. Requires API key with account:read scope. P&L figures reflect live market conditions and will differ from what you see in your actual account. Alpaca's data freshness depends on market hours and your subscription tier (real-time vs. 15-minute delayed).
@alpaca create a watchlist called 'Tech2024' and add NVDA, AMD, and TSLA to it
I've created a new watchlist named 'Tech2024' in your Alpaca account and added three symbols: NVDA (NVIDIA Corporation), AMD (Advanced Micro Devices), and TSLA (Tesla, Inc.). The watchlist ID is wl_abc123xyz and now contains these three assets in the order specified. You can view this watchlist in your Alpaca dashboard or query it through this integration. Note that watchlist names must be alphanumeric only — spaces and special characters aren't supported by Alpaca's API.
This demonstrates a write action that modifies your Alpaca account state. The MCP creates persistent data (the watchlist) that survives beyond this conversation. Requires API key with account:write scope. If a watchlist named 'Tech2024' already exists, Alpaca's API will return an error — the MCP doesn't automatically deduplicate or merge.
@alpaca review my watchlist 'Growth' and tell me which stocks are up more than 5% today
I retrieved your 'Growth' watchlist, which contains 8 symbols. Checking today's performance: SHOP is up 7.2% (currently $68.45), ROKU is up 6.8% ($74.12), and SQ is up 5.4% ($62.89). The remaining five symbols (DKNG, COIN, RBLX, PLTR, SNOW) are either flat or down for the day. This analysis uses Alpaca's latest market data, which may be delayed 15 minutes depending on your subscription. Keep in mind that intraday moves can be volatile — these percentages reflect the snapshot at query time.
This example pairs the MCP's data retrieval (fetching watchlist contents and price data) with the AI's analytical reasoning (filtering by percentage threshold). Requires both account:read and market_data:read scopes. Performance calculations depend on Alpaca's definition of 'today' (market open to current time) and may not match other platforms' methodologies if you're querying outside regular trading hours.
Use-case deep-dives
When Alpaca wins for daily client portfolio checks
A 3-person RIA firm runs a 9am standup where each advisor reviews overnight moves in client portfolios. Alpaca's watchlist tools (create, add asset, delete by ID) let the team build per-client symbol lists that mirror their actual holdings, then query positions and orders in real time. The 50-tool scope means you can script the full workflow—pull overnight P&L, flag margin calls, cancel stale limit orders—without switching tabs. This works if your clients hold liquid US equities and you're comfortable with API-key auth (no OAuth, so credential rotation is on you). If you manage 50+ accounts or need multi-custodian aggregation, you'll hit rate limits and want a dedicated portfolio-management platform instead. For small teams tracking under 30 accounts with Alpaca as the primary custodian, this MCP turns standup into a 10-minute data pull.
Why Alpaca fits single-developer strategy testing
A solo quant developer is backtesting a mean-reversion strategy on SPY and wants to validate order execution assumptions against live market data. Alpaca's order-management tools (delete all orders, delete all positions) let you script teardown between test runs, and the watchlist actions help you isolate the 10-15 tickers your strategy actually trades. The MCP's 50-tool count covers the full CRUD loop for orders, positions, and account state, so you can run a backtest, liquidate, and reset without leaving your notebook. This setup breaks down if you're testing multi-asset strategies (crypto, options, futures) or need sub-millisecond fills—Alpaca is retail-grade execution, not institutional. For a single developer prototyping equity strategies with under $100k in paper capital, this MCP is the fastest path from idea to live test.
When Alpaca helps support reps troubleshoot user accounts
A 6-person support team at a micro-investing app fields tickets about stuck orders and missing positions. Alpaca's account-level tools (delete all orders, delete unsubscribe) give reps the ability to force-cancel bad states or remove rebalancing subscriptions that users can't self-serve. The watchlist actions are less relevant here, but the order and position tools cover 80% of escalations. API-key auth means you'll need a shared credential vault and audit logging to track who did what. This works if your app is Alpaca-native and your support volume is under 50 tickets/day—beyond that, you want a purpose-built admin panel with role-based access. For early-stage fintechs where support doubles as ops, this MCP turns a 20-minute escalation into a 2-minute script.
Frequently asked
What does the Alpaca MCP let me do in Switchy?
It connects your Alpaca brokerage account so AI agents can read positions, place trades, manage watchlists, and cancel orders. You can ask an agent to check your portfolio balance, add a stock to a watchlist, or liquidate all open positions. The MCP exposes 50 tools covering account management, order execution, and market data retrieval.
Do I need a live Alpaca trading account or will paper trading work?
Both work. You provide an API key when connecting the MCP, and Alpaca issues separate keys for paper (sandbox) and live accounts. If you're testing workflows or building prompts, use the paper key. Switch to the live key only when you're ready to execute real trades. The MCP doesn't distinguish between the two — the key you paste determines the environment.
Can the Alpaca MCP execute options trades or only stocks?
It depends on what Alpaca's API supports for your account type. The MCP calls Alpaca's REST endpoints, so if your account has options approval and Alpaca exposes options order routes, the MCP can place those trades. Check Alpaca's documentation for your account tier. The MCP itself doesn't filter asset classes — it passes through whatever the API allows.
Why use this MCP instead of logging into Alpaca's web dashboard?
The MCP lets AI agents act on your behalf inside Switchy's shared workspace. Instead of manually checking positions and placing orders, you describe what you want in natural language and the agent executes it. Useful for routine tasks like rebalancing a watchlist, closing all positions at once, or pulling account data into a report. The dashboard is still better for detailed charting and account settings.
Who on my team should connect the Alpaca MCP?
Whoever holds the Alpaca API key and is comfortable granting AI agents trade execution permissions. This is typically a portfolio manager or trader, not a general team member. Once connected, any Switchy user in your workspace can invoke the MCP's tools, so treat the connection like handing out brokerage credentials. Limit access to people who understand the risk of automated trading.