---
title: Alpaca API Integration on Truto
slug: alpaca
category: Banking
canonical: "https://truto.one/integrations/detail/alpaca/"
---

# Alpaca API Integration on Truto



**Category:** Banking  
**Status:** Generally available

## MCP-ready AI tools

Truto exposes 74 tools for Alpaca that AI agents can call directly.

- **list_all_alpaca_stocks_bars** — List aggregate historical OHLCV bar data for multiple stock symbols in Alpaca over a specified time period. Returns bars keyed by symbol, each with t (timestamp), o (open), h (high), l (low), c (close), v (volume), n (trade count), and vw (volume-weighted average price). Required: symbols.
- **list_all_alpaca_stock_bars** — List aggregate historical bars for a single stock symbol in Alpaca. Returns: bars, symbol. Required: symbol.
- **list_all_alpaca_stocks_trades** — List historical trade data for multiple Alpaca stock symbols over a specified time period. Returns: trades, next_page_token. Required: symbols.
- **list_all_alpaca_stock_trades** — Trades. Required: symbol.
- **list_all_alpaca_stocks_quotes** — List NBBO quotes for multiple Alpaca stock symbols over a specified time period. Returns the quotes object — a map of symbol to arrays of NBBO quote objects including t, ax, ap, as, bx, bp, bs, c, z — plus next_page_token. Required: symbols. Results sorted by symbol then timestamp; the first page may contain only one symbol if it fills the page limit.
- **list_all_alpaca_stock_quotes** — List NBBO quotes for a single stock symbol in Alpaca. Returns: t, ax, ap, as, bx, bp, bs, c, z. Required: symbol.
- **list_all_alpaca_stocks_snapshots** — List snapshots for multiple stock symbols in Alpaca, providing the latest trade, latest quote, minute bar, daily bar, and previous daily bar for each requested ticker. Returns: latestTrade, latestQuote, minuteBar, dailyBar, prevDailyBar. Required: symbols.
- **list_all_alpaca_stock_snapshots** — Get a market data snapshot for a single Alpaca stock symbol, including the latest trade, latest quote, minute bar, daily bar, and previous daily bar. Returns: symbol, latestTrade, latestQuote, minuteBar, dailyBar, prevDailyBar. Required: symbol.
- **list_all_alpaca_crypto_trades** — List historical crypto trades from Alpaca's US crypto venue (v1beta3) for one or more pairs (BASE/QUOTE, e.g. BTC/USD) between start and end. Returns trades keyed by symbol with t, p (price), s (size), i (id), tks (taker side); paginates with next_cursor. Required: symbols.
- **list_all_alpaca_crypto_bars** — List historical crypto bars (OHLCV aggregates) from Alpaca's US crypto venue (v1beta3) for one or more pairs between start and end at the given timeframe. Symbols use BASE/QUOTE form such as BTC/USD. Returns bars keyed by symbol with t, o, h, l, c, v, n, vw; paginates with next_cursor. Required: symbols, timeframe.
- **list_all_alpaca_crypto_quotes** — List historical crypto quotes (best bid and ask) from Alpaca's US crypto venue (v1beta3) for one or more pairs (BASE/QUOTE, e.g. BTC/USD) between start and end. Returns quotes keyed by symbol with t, bp, bs, ap, as; paginates with next_cursor. Required: symbols.
- **list_all_alpaca_crypto_snapshots** — Get snapshots for one or more crypto pairs (BASE/QUOTE, e.g. BTC/USD) from Alpaca's US crypto venue (v1beta3): latest trade, latest quote, latest minute bar, latest daily bar and previous daily bar per symbol. Required: symbols.
- **list_all_alpaca_news** — List latest news articles across stocks and crypto from Alpaca. Returns articles with id, headline, author, created_at, updated_at, summary, content, url, images, symbols, and source. By default returns the latest 10 articles.
- **list_all_alpaca_movers** — List top market movers (gainers and losers) by market type from Alpaca. Returns: gainers, losers, market_type, last_updated. Required: market_type. The optional top parameter controls how many of each to fetch (maximum 50, defaults to 10).
- **list_all_alpaca_logos** — Get the logo image for a crypto or stock symbol from Alpaca. Returns the requested logo as a binary image file (e.g., PNG, SVG). When placeholder is true (the default), Alpaca generates a placeholder image if no logo is found for the symbol; a 404 is only returned when placeholder is false. Required: crypto_or_stock_symbol.
- **list_all_alpaca_meta_exchanges** — List the stock exchanges supported by Alpaca. Returns a map of exchange short-form codes (A, B, C, N, Q, V, etc.) to their respective full names.
- **list_all_alpaca_meta_conditions** — List Alpaca trade and quote condition codes mapped to plain text descriptions for a given condition type and tape. Returns a JSON object mapping condition codes (e.g. " ", "4", "F") to description strings. Required: type, tape.
- **alpaca_assets_list_trading** — List Alpaca assets available for trade and data consumption, sorted by asset class, exchange and symbol. Returns: id, issuer, network. Filter by status, asset_class, exchange, and attributes.
- **alpaca_assets_get_trading** — Get a single Alpaca asset by symbol, asset_id or CUSIP for US equities. Returns: id, issuer, network. Required: asset_id.
- **list_all_alpaca_corporate_actions_announcements** — List corporate actions from Alpaca market data (GET /v1/corporate-actions): dividends, splits, mergers, spin-offs, name changes and more, filtered by symbols, cusips, types, ids and a process_date range. Returns corporate_actions grouped by type; paginates with next_cursor. Replaces the retired /v1/corporate_actions/announcements endpoint.
- **list_all_alpaca_account** — Get your Alpaca trading account details. Returns: id, account_number, status, cash, equity, buying_power, portfolio_value. No parameters required.
- **alpaca_account_get_config** — Get the current Alpaca account configuration values controlling trading settings. Returns: disable_overnight_trading, fractional_trading, max_margin_multiplier, max_options_trading_level, no_shorting, ptp_no_exception_entry, suspend_trade, trade_confirm_email.
- **alpaca_account_bulk_update** — Update Alpaca account configuration settings such as fractional trading, margin multiplier, and options trading level. Returns: disable_overnight_trading, fractional_trading, max_margin_multiplier, max_options_trading_level, no_shorting, ptp_no_exception_entry, suspend_trade, trade_confirm_email.
- **list_all_alpaca_option_contracts** — List Alpaca option contracts with filtering by underlying symbol, status, expiration date range, strike price range, type, style, root symbol, and penny-program eligibility. Returns: id, symbol, underlying_symbol, root_symbol, expiration_date, strike_price, type, style, status, deliverables, ppind. Max 10000 contracts per page.
- **get_single_alpaca_option_contract_by_id** — Get a single Alpaca option contract by its symbol or contract ID. Returns the contract object including id, symbol, status, type, style, strike_price, expiration_date, underlying_symbol, root_symbol, ppind, and deliverables. Required: id.
- **create_a_alpaca_order** — Create a new order in Alpaca. Returns the created order object including id, client_order_id, status, symbol, qty, side, type, time_in_force, created_at, and submitted_at. Required: type, time_in_force.
- **list_all_alpaca_orders** — List orders in Alpaca filtered by status, symbols, side, asset class, and submission time. Returns an array of order objects with id, client_order_id, status, symbol, qty, side, type, time_in_force, created_at, and submitted_at. Max 500 per page.
- **alpaca_orders_delete_all** — Cancel all open orders in Alpaca. Returns an array of objects with id and status for each cancellation attempt.
- **alpaca_orders_get_by_client_order_id** — Get a single Alpaca order by its client-assigned order ID. Returns: id, client_order_id, created_at, updated_at, submitted_at, filled_at, expired_at, canceled_at, failed_at, replaced_at, replaced_by, replaces, asset_id, symbol, asset_class, notional, qty, filled_qty, filled_avg_price, order_class, order_type, type, side, time_in_force, limit_price, stop_price, status, extended_hours, legs,…
- **get_single_alpaca_order_by_id** — Get a single Alpaca order by its server-assigned order ID. Returns: id, client_order_id, created_at, updated_at, submitted_at, filled_at, expired_at, canceled_at, failed_at, replaced_at, replaced_by, replaces, asset_id, symbol, asset_class, notional, qty, filled_qty, filled_avg_price, order_class, order_type, type, side, time_in_force, limit_price, stop_price, status, extended_hours, legs,…
- **update_a_alpaca_order_by_id** — Replace a single Alpaca order by id with updated parameters. Returns the new Order object including id, client_order_id, status, symbol, qty, side, type, time_in_force, and created_at. Required: id. qty and notional are mutually exclusive; notional is only valid for IPO indications of interest.
- **delete_a_alpaca_order_by_id** — Cancel an open Alpaca order by id. Returns an empty 204 response on success. Required: id. The order must be in a cancelable status; a 422 is returned if the order status is not cancelable.
- **list_all_alpaca_positions** — List all open positions in an Alpaca trading account. Returns: asset_id, symbol.
- **alpaca_positions_delete_all** — Close (liquidate) all open long and short positions in an Alpaca account, optionally canceling open orders first. Returns an array of PositionClosed responses, each containing symbol, status, and the order body.
- **get_single_alpaca_position_by_id** — Get a single open position in an Alpaca account by symbol or asset id. Returns: asset_id, symbol. Required: id.
- **delete_a_alpaca_position_by_id** — Close (liquidate) an open position in an Alpaca account by symbol or asset id, optionally specifying a quantity or percentage to liquidate. Returns the order created to close the position including id, symbol, qty, side, and status. Required: id. qty and percentage are mutually exclusive.
- **alpaca_positions_exercise_option** — Exercise an options position in an Alpaca account by contract symbol or ID. Returns: message. Required: symbol_or_asset_id.
- **alpaca_positions_do_not_exercise** — Submit a do-not-exercise (DNE) instruction for a held option contract in Alpaca to prevent automatic exercise at expiry. Returns a success confirmation. Required: symbol_or_asset_id.
- **alpaca_account_portfolio_get_history** — Get timeseries equity and profit/loss (P/L) history for the Alpaca account over a requested timespan. Returns: timestamp, equity, profit_loss, profit_loss_pct, base_value, base_value_asof, timeframe. Only two of start, end, and period may be specified simultaneously; intraday timeframes (<1D) are limited to 30 days or less.
- **list_all_alpaca_watchlists** — List all watchlists registered under the account in Alpaca. Returns: id, account_id, name, assets, created_at, updated_at.
- **create_a_alpaca_watchlist** — Create a new watchlist in Alpaca with an initial set of asset symbols. Returns the created watchlist object including its id, name, account_id, assets, created_at, and updated_at. Required: name.
- **get_single_alpaca_watchlist_by_id** — Get a single Alpaca watchlist by its id. Returns the full watchlist object including its id, account_id, name, and the array of assets it contains. Required: id.
- **update_a_alpaca_watchlist_by_id** — Update the name and/or content of an Alpaca watchlist by id. Returns the updated watchlist object including its id, name, and asset symbols. Required: id. The request body accepts a new watchlist name and a list of asset symbols to replace the current contents.
- **alpaca_watchlists_add_asset** — Add an asset to an existing Alpaca watchlist by appending its symbol to the end of the watchlist's asset list. Returns the updated watchlist including its id, account_id, name, created_at, updated_at, and assets. Required: watchlist_id, symbol.
- **delete_a_alpaca_watchlist_by_id** — Delete an Alpaca watchlist by id. This is a permanent deletion. Returns an empty 204 response on success. Required: id.
- **alpaca_watchlists_get_by_name** — Get an Alpaca watchlist by its name. Returns: account_id, id, name, created_at, updated_at, assets. Required: name.
- **alpaca_watchlists_add_asset_by_name** — Add an asset to an Alpaca watchlist identified by name, appending the symbol to the end of the watchlist's asset list. Returns the updated watchlist including account_id, id, name, created_at, updated_at, and assets. Required: name, symbol.
- **alpaca_watchlists_delete_by_name** — Delete an Alpaca watchlist by name. This is a permanent deletion. Returns an empty 204 response on success. Required: name.
- **alpaca_watchlists_remove_asset** — Remove an asset from an Alpaca watchlist by symbol. Returns the updated watchlist including its id, account_id, name, created_at, updated_at, and assets. Required: watchlist_id, symbol.
- **alpaca_watchlists_bulk_update** — Update the name and/or content of a watchlist in Alpaca by watchlist name. Returns the updated watchlist object including id, account_id, name, created_at, updated_at, and assets. Required: name.
- **alpaca_account_activities_list_activities** — List Alpaca account activities with optional filtering by activity type, category, order, or date range. Returns an array of activities with id, activity_type, and created_at. The category and activity_types parameters are mutually exclusive. Max 100 entries per page.
- **alpaca_account_activities_list_activities_by_type** — List Alpaca account activities filtered by a specific activity type. Returns an array of activities with id, activity_type, and created_at. Required: activity_type.
- **alpaca_calendar_get_calendar** — Get the Alpaca market calendar of trading days from 1970 to 2029, optionally filtered by a start and end date range. Returns: date, open, close.
- **alpaca_calendar_get_clock** — Get the Alpaca market clock showing the current market timestamp and whether the market is open. Returns: timestamp, is_open, next_open, next_close.
- **alpaca_crypto_wallets_list_wallets** — List crypto funding wallets for the Alpaca account. If an asset is specified and no matching wallet exists, one will be created. Returns: id, address, asset, chain, created_at, updated_at. Supports optional filtering by asset and chain. Available on live accounts only; paper accounts return not found.
- **alpaca_crypto_wallets_list_transfers** — List all crypto wallet transfers for the Alpaca account across all wallets. Returns: id, transfer_id, address, amount, asset, chain, created_at, updated_at. Available on live accounts only; paper accounts return not found.
- **alpaca_crypto_wallets_create_withdrawal** — Create a crypto withdrawal from an Alpaca wallet to a whitelisted destination address. Returns: id, transfer_id, address, amount, asset, chain, created_at, updated_at. Required: address, amount, asset. Withdrawals must be sent to a whitelisted address. Creates POST /v2/wallets/transfers. Available on live accounts only; paper accounts return not found.
- **alpaca_crypto_wallets_get_transfer** — Get a specific Alpaca crypto wallet transfer by its transfer ID. Returns a single crypto transfer object including id, created_at, and updated_at. Required: transfer_id. Available on live accounts only; paper accounts return not found.
- **alpaca_crypto_wallets_list_whitelisted_addresses** — List whitelisted withdrawal addresses for your Alpaca account. Returns an array of whitelisted address objects, each including id, address, asset, and chain. Available on live accounts only; paper accounts return not found.
- **alpaca_crypto_wallets_create_whitelisted_address** — Create a whitelisted crypto withdrawal address for your Alpaca account. Returns: id, address, asset, chain. Required: address, asset. Available on live accounts only; paper accounts return not found.
- **alpaca_crypto_wallets_delete_whitelisted_address** — Delete a whitelisted crypto withdrawal address from your Alpaca account. Returns an empty 204 response on success. Required: whitelisted_addresse_id. Available on live accounts only; paper accounts return not found.
- **alpaca_crypto_wallets_get_transfer_estimate** — Estimate the network (gas) fee for a proposed crypto withdrawal from an Alpaca crypto funding wallet. GET /v2/wallets/fees/estimate with asset, from_address, to_address and amount. Available on live accounts only; paper accounts return not found. Required: asset, from_address, to_address, amount.
- **alpaca_corporate_actions_list_announcements** — List Alpaca corporate action announcements filtered by type and date range. Returns: id, ca_type, symbol, cusip, declaration_date, ex_date, record_date, payable_date. Required: ca_types, since, until. The date range is limited to 90 days. This endpoint is deprecated.
- **alpaca_corporate_actions_get_announcement** — Get a single Alpaca corporate action announcement by id. Returns: id, ca_type, symbol, cusip, declaration_date, ex_date, record_date, payable_date. Required: announcement_id. This endpoint is deprecated.
- **list_all_alpaca_stocks_bars_latests** — Get the latest minute bar for one or more stock symbols. Returns bars keyed by symbol with t, o, h, l, c, v, n, vw. Required: symbols.
- **list_all_alpaca_stock_bars_latests** — Get the latest bar for a single Alpaca stock symbol. Returns: symbol, bar. Required: symbol.
- **list_all_alpaca_crypto_bars_latests** — Get the latest minute bar for one or more crypto pairs (BASE/QUOTE, e.g. BTC/USD) from Alpaca's US crypto venue (v1beta3). Returns bars keyed by symbol with t, o, h, l, c, v, n, vw. Required: symbols.
- **list_all_alpaca_stocks_trades_latests** — Get the latest trade for one or more stock symbols. Returns trades keyed by symbol with t, p, s, x (exchange), c (conditions), z (tape). Required: symbols.
- **list_all_alpaca_stock_trades_latests** — Get the latest trade data for a single stock symbol in Alpaca. Returns: symbol, trade. Required: symbol.
- **list_all_alpaca_crypto_trades_latests** — Get the latest trade for one or more crypto pairs (BASE/QUOTE, e.g. BTC/USD) from Alpaca's US crypto venue (v1beta3). Returns trades keyed by symbol with t, p, s, i, tks. Required: symbols.
- **list_all_alpaca_stocks_quotes_latests** — Get the latest best bid and ask quote for one or more stock symbols. Returns quotes keyed by symbol with t, bp, bs, bx, ap, as, ax, c, z. Required: symbols.
- **list_all_alpaca_stock_quotes_latests** — Get the latest quote for a single stock symbol in Alpaca. Returns: symbol, quote. Required: symbol.
- **list_all_alpaca_crypto_quotes_latests** — Get the latest bid and ask quote for one or more crypto pairs (BASE/QUOTE, e.g. BTC/USD) from Alpaca's US crypto venue (v1beta3). Returns quotes keyed by symbol with t, bp, bs, ap, as. Required: symbols.
- **list_all_alpaca_crypto_orderbooks_latests** — Get the latest order book (bids and asks with price p and size s) for one or more crypto pairs (BASE/QUOTE, e.g. BTC/USD) from Alpaca's US crypto venue (v1beta3). Replaces the retired XBBO endpoint. Required: symbols.

## How it works

1. **Link your customer's Alpaca account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach Alpaca.** The Proxy API is a 1-to-1 mapping of the Alpaca API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Launch an algorithmic trading platform** — Let your users connect their Alpaca accounts via OAuth so your SaaS can execute strategy-driven trades on their behalf. Truto handles the auth handshake and normalizes order placement, position reads, and execution events.
- **Embed US stock investing in a global fintech app** — Use Alpaca as your clearing broker to onboard end users, run KYC, link banks, and offer fractional US equity trading. Truto lets you ship account creation, ACH linking, and order flows without building direct Alpaca plumbing.
- **Power a portfolio analytics or advisor dashboard** — Pull positions, portfolio history, and account activities from users' Alpaca accounts to generate performance reports, risk metrics, and client-facing dashboards. Truto normalizes read access so you can focus on analytics, not API quirks.
- **Run a treasury and journaling layer for sub-accounts** — For SaaS platforms operating pooled accounts, use Alpaca journals to move funds between master and end-user sub-accounts for rewards, referrals, or fractional allocation — all orchestrated through Truto.
- **Build a market data–driven screener or charting product** — Use Alpaca's historical bars, quotes, trades, snapshots, and news through Truto to power screeners, charts, and research tools without operating a market data pipeline yourself.

## What you can build

- **OAuth-based Alpaca account linking** — Let end users securely connect their existing Alpaca brokerage accounts to your product using Alpaca's OAuth authorize and token endpoints.
- **Multi-asset order placement and management** — Submit, update, and cancel equity, options, and crypto orders — including fractional and notional orders — with a normalized order model across asset classes.
- **Automated account onboarding and KYC** — Programmatically create brokerage accounts, upload identity documents, and link ACH relationships to onboard end users into a fully-disclosed embedded brokerage.
- **Positions and portfolio history sync** — Continuously read positions, account balances, and portfolio equity/P&L history to display real-time portfolio health inside your app.
- **Trade execution and account status event feeds** — Subscribe to Alpaca's trade event and account status streams to react to fills, cancellations, and KYC approvals as they happen.
- **Watchlists and options chain browsing** — Let users build and manage watchlists, browse option contracts, and issue locate requests for short-selling workflows directly from your UI.

## FAQs

### How do end users authenticate their Alpaca account through Truto?

Truto supports Alpaca's OAuth flow via the authorize and token endpoints, so end users can connect their existing Alpaca accounts without sharing API keys. For embedded brokerage setups where you operate as the broker partner, Truto also supports programmatic account creation using your Alpaca Broker API credentials.

### Which Alpaca product surfaces are covered — Trading API, Broker API, or Market Data?

Truto exposes tools across all three: Trading API (orders, positions, watchlists, account config, portfolio history), Broker API (accounts, documents, ACH relationships, journals, transfers, activities), and Market Data (stocks, crypto, options bars/quotes/trades/snapshots, news, movers, and corporate actions).

### Can we place fractional, notional, and options orders?

Yes. Order creation tools support the full Alpaca order model, including fractional shares, notional (dollar-based) orders, stop/limit types, time-in-force modifiers, and multi-leg options via the option contracts endpoints. Position-level actions like exercise and do-not-exercise are also available.

### How do we get real-time updates on fills and account status changes?

Alpaca exposes Server-Sent Events for trade execution events and account status changes. Truto provides tools to consume these streams (trade events, account status, journal status, transfer status), so you can react to fills and KYC approvals without polling.

### Can we move funds between accounts for rewards or sub-account funding?

Yes. Truto exposes Alpaca's journal endpoints, including single and batch journal creation, so you can move cash or securities between master and end-user sub-accounts for rewards, fractional allocation, or treasury workflows.

### Does Truto support Alpaca's crypto and tokenization endpoints?

Yes. Crypto wallets, transfers, whitelisted addresses, withdrawal creation, transfer estimates, and tokenization mint/lookup endpoints are all available as tools, alongside crypto market data (bars, quotes, trades, snapshots, and cross-exchange BBO).

## Related reading

- [Connect Alpaca to ChatGPT: Stream Market Data and Automate Trading](https://truto.one/blog/connect-alpaca-to-chatgpt-stream-market-data-and-automate-trading/) — Learn how to connect Alpaca to chatgpt using Truto. Step-by-step guide to tool calling, API quirks, and autonomous workflows.
- [Connect Alpaca to Claude: Manage Brokerage Accounts & Asset Trading](https://truto.one/blog/connect-alpaca-to-claude-manage-brokerage-accounts-and-asset-trading/) — Learn how to build a secure, managed MCP server to connect Alpaca to Claude. Automate trading workflows, manage brokerage accounts, and stream market data.
- [Connect Alpaca to AI Agents: Automate Market Data & Portfolio Ops](https://truto.one/blog/connect-alpaca-to-ai-agents-automate-market-data-and-portfolio-ops/) — Learn how to connect Alpaca to AI agents using Truto's tools endpoint to automate market data, portfolio management, and autonomous trading workflows.
