Commerce & Payments · Developer Tools

Alpaca

Stock and crypto trading platform with commission-free trading, real-time market data, and algorithmic trading capabilities

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Add Asset to Watchlist

    Adds a ticker symbol to an existing watchlist identified by ID, for tracking a security. With Alpaca's standard live API configuration, the target is the paper account's watchlist.

  • 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 it. The asset will be appended to the end of the watchlist's asset list.

  • 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 named watchlist Note: This action creates a watchlist at the account level (using v2 API). The name must be unique within the account and contain only alphanumeric characters, spaces, hyphens, and underscores (up to 64 characters).

  • Create Watchlist

    Creates a watchlist for the authenticated account using the supplied name and symbols. An account ID is required as input but does not select the account.

  • Delete All Open Positions

    Liquidates all open positions at market, with an option to cancel open orders first. Results report individual liquidation attempts; partial success is possible. With Alpaca's standard live API configuration, the target is the paper account.

  • Delete All Orders for Account

    Attempts to cancel all open orders for a specified trading account and returns per-order results when provided. A 404 response is returned as an empty results list with HTTP status 404; successfully cancelled orders cannot be restored.

  • Delete Unsubscribe Account

    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: If the subscription_id is invalid, a 400 error is returned. If the subscription does not exist, a 404 error is returned.

  • Delete Watchlist By ID

    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 watchlist_id is invalid or does not exist, a 404 error is returned.

  • 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 a read-only operation that returns the current state of the authenticated account. The response includes important account flags such as trading_blocked, account_blocked, pattern_day_trader, and shorting_enabled which indicate any restrictions on the account's trading capabilities.

  • 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 by date range, account ID, and sorting direction. Results are paginated using page_token for efficient retrieval of large datasets.

  • Get Account Activities V2

    Retrieves account activities for the authenticated Alpaca account using the v2 API, including trade fills and non-trade activities. Supports date range and activity type filters, sorting, and page-token pagination; multiple activity types can be requested.

  • 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 range filtering, pagination, and sorting. This endpoint is useful for retrieving a specific category of account transactions rather than all activities. Note: date parameter cannot be used with 'after' parameter. Use 'date' for a single day or 'until'/'after' for date ranges.

  • 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 status, shorting permissions, trade suspension status, and trade confirmation email preferences. This is a read-only operation that returns the current configuration without any modifications. The account is determined from the authentication credentials.

  • 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 account performance over time, track equity curves, or review historical P&L. Note: The timeframe parameter auto-selects based on the period: 1Min for <7 days, 15Min for <30 days, or 1D otherwise.

  • 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 account performance over time, track equity curves, or review historical P&L. Note: The timeframe parameter auto-selects based on the period: 1Min for <7 days, 15Min for <30 days, or 1D otherwise.

  • 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 account_id parameter as it automatically uses the account associated with the API credentials. Note: This action returns positions for the account associated with the authenticated API key. Use this read-only action to get a complete view of the account's open positions.

  • Get All Open Positions

    Retrieves all open positions for the authenticated Alpaca trading account, including holdings and unrealized P&L. This read-only action uses the account associated with the credentials.

  • 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 orders for a trading account, such as checking open positions or reviewing trade history. By default, only open orders are returned. Use status='all' to include closed orders, or status='closed' for only closed/canceled orders.

  • Get Historical Crypto US Bars

    Retrieves historical OHLCV bars for crypto symbols at a selected location, aggregated by the specified timeframe. Results are sorted by symbol, then timestamp.

  • Get Crypto Bars for Multiple Symbols

    Retrieves historical OHLCV bars for multiple crypto symbols from the US market data location. Results are sorted by symbol and then timestamp; use the returned next page token to continue through available bars.

Page 1 / 5Next